Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f7f1479a
Commit
f7f1479a
authored
Nov 01, 2006
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Nov 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: toolbar: Fix buttons heights.
parent
9ec280c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
toolbar.c
dlls/comctl32/toolbar.c
+13
-6
No files found.
dlls/comctl32/toolbar.c
View file @
f7f1479a
...
...
@@ -125,6 +125,7 @@ typedef struct
INT
nButtonHeight
;
INT
nButtonWidth
;
INT
nBitmapHeight
;
INT
nVBitmapHeight
;
/* see TOOLBAR_Create for an explanation */
INT
nBitmapWidth
;
INT
nIndent
;
INT
nRows
;
/* number of button rows */
...
...
@@ -1553,7 +1554,7 @@ static inline SIZE TOOLBAR_MeasureButton(TOOLBAR_INFO *infoPtr, SIZE sizeString,
if
(
infoPtr
->
dwStyle
&
TBSTYLE_LIST
)
{
/* set button height from bitmap / text height... */
sizeButton
.
cy
=
max
((
bHasBitmap
?
infoPtr
->
nBitmapHeight
:
0
),
sizeButton
.
cy
=
max
((
bHasBitmap
?
infoPtr
->
n
V
BitmapHeight
:
0
),
sizeString
.
cy
);
/* ... add on the necessary padding */
...
...
@@ -1582,8 +1583,9 @@ static inline SIZE TOOLBAR_MeasureButton(TOOLBAR_INFO *infoPtr, SIZE sizeString,
{
if
(
bHasBitmap
)
{
sizeButton
.
cy
=
infoPtr
->
nBitmapHeight
+
1
+
sizeString
.
cy
+
DEFPAD_CY
;
sizeButton
.
cy
=
infoPtr
->
nVBitmapHeight
+
DEFPAD_CY
;
if
(
sizeString
.
cy
>
0
)
sizeButton
.
cy
+=
1
+
sizeString
.
cy
;
sizeButton
.
cx
=
infoPtr
->
szPadding
.
cx
+
max
(
sizeString
.
cx
,
infoPtr
->
nBitmapWidth
);
}
...
...
@@ -4472,8 +4474,7 @@ TOOLBAR_SetBitmapSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
LOWORD
(
lParam
),
HIWORD
(
lParam
));
infoPtr
->
nBitmapWidth
=
(
INT
)
LOWORD
(
lParam
);
infoPtr
->
nBitmapHeight
=
(
INT
)
HIWORD
(
lParam
);
infoPtr
->
nVBitmapHeight
=
infoPtr
->
nBitmapHeight
=
(
INT
)
HIWORD
(
lParam
);
if
((
himlDef
==
infoPtr
->
himlInt
)
&&
(
ImageList_GetImageCount
(
infoPtr
->
himlInt
)
==
0
))
...
...
@@ -4873,6 +4874,7 @@ TOOLBAR_SetImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr
->
nBitmapWidth
=
1
;
infoPtr
->
nBitmapHeight
=
1
;
}
infoPtr
->
nVBitmapHeight
=
infoPtr
->
nBitmapHeight
;
TRACE
(
"hwnd %p, new himl=%p, id = %d, count=%d, bitmap w=%d, h=%d
\n
"
,
hwnd
,
infoPtr
->
himlDef
,
id
,
infoPtr
->
nNumBitmaps
,
...
...
@@ -5338,10 +5340,15 @@ TOOLBAR_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
TRACE
(
"hwnd = %p
\n
"
,
hwnd
);
/* initialize info structure */
infoPtr
->
nButtonWidth
=
23
;
infoPtr
->
nButtonHeight
=
22
;
infoPtr
->
nButtonWidth
=
24
;
infoPtr
->
nBitmapHeight
=
15
;
infoPtr
->
nBitmapWidth
=
16
;
/* By default Windows creates an image list with 16x15 icons but computes the button size as
* if the icons were 16x16. That's why we keep infoPtr->nVBitmapHeight. After a call to
* TB_SETBITMAPSIZE or TB_SETIMAGELIST the nVBitmapHeight = nBitmapHeight.
*/
infoPtr
->
nVBitmapHeight
=
16
;
infoPtr
->
nMaxTextRows
=
1
;
infoPtr
->
cxMin
=
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment