Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1232b084
Commit
1232b084
authored
Nov 04, 2008
by
Sergey Khodych
Committed by
Alexandre Julliard
Nov 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: toolbar: Calculate a correct size for empty buttons with the BTNS_AUTOSIZE style.
parent
eb96fbf3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
toolbar.c
dlls/comctl32/tests/toolbar.c
+13
-0
toolbar.c
dlls/comctl32/toolbar.c
+2
-2
No files found.
dlls/comctl32/tests/toolbar.c
View file @
1232b084
...
...
@@ -718,6 +718,9 @@ static tbsize_result_t tbsize_results[] =
{
0
,
0
,
163
,
38
},
{
163
,
0
,
326
,
38
},
{
326
,
0
,
489
,
38
},
{
489
,
0
,
652
,
38
},
{
652
,
0
,
819
,
38
},
{
819
,
0
,
850
,
38
},
},
},
{
{
0
,
0
,
672
,
100
},
{
239
,
102
},
3
,
{
{
0
,
2
,
100
,
102
},
{
100
,
2
,
139
,
102
},
{
139
,
2
,
239
,
102
},
},
},
};
static
int
tbsize_numtests
=
0
;
...
...
@@ -943,6 +946,16 @@ static void test_sizes(void)
SendMessageA
(
hToolbar
,
TB_DELETEBUTTON
,
0
,
0
);
ok
(
SendMessageA
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
)
==
MAKELONG
(
27
,
39
),
"Unexpected button size
\n
"
);
rebuild_toolbar
(
&
hToolbar
);
ok
(
SendMessageA
(
hToolbar
,
TB_SETBITMAPSIZE
,
(
WPARAM
)
0
,
(
LPARAM
)
MAKELONG
(
32
,
32
)
)
==
1
,
"TB_SETBITMAPSIZE failed
\n
"
);
ok
(
SendMessageA
(
hToolbar
,
TB_SETBUTTONSIZE
,
(
WPARAM
)
0
,
(
LPARAM
)
MAKELONG
(
100
,
100
))
==
1
,
"TB_SETBUTTONSIZE failed
\n
"
);
ok
(
SendMessageA
(
hToolbar
,
TB_ADDBUTTONS
,
(
WPARAM
)
1
,
(
LPARAM
)
&
buttons2
[
0
])
==
1
,
"TB_ADDBUTTONS failed
\n
"
);
ok
(
SendMessageA
(
hToolbar
,
TB_ADDBUTTONS
,
(
WPARAM
)
1
,
(
LPARAM
)
&
buttons3
[
2
])
==
1
,
"TB_ADDBUTTONS failed
\n
"
);
ok
(
SendMessageA
(
hToolbar
,
TB_ADDBUTTONS
,
(
WPARAM
)
1
,
(
LPARAM
)
&
buttons3
[
0
])
==
1
,
"TB_ADDBUTTONS failed
\n
"
);
SendMessageA
(
hToolbar
,
TB_AUTOSIZE
,
(
WPARAM
)
0
,
(
LPARAM
)
0
);
check_sizes
();
DestroyWindow
(
hToolbar
);
}
...
...
dlls/comctl32/toolbar.c
View file @
1232b084
...
...
@@ -1598,8 +1598,8 @@ static inline SIZE TOOLBAR_MeasureButton(const TOOLBAR_INFO *infoPtr, SIZE sizeS
{
sizeButton
.
cy
=
sizeString
.
cy
+
infoPtr
->
szPadding
.
cy
+
NONLIST_NOTEXT_OFFSET
;
sizeButton
.
cx
=
2
*
GetSystemMetrics
(
SM_CXEDGE
)
+
infoPtr
->
szPadding
.
cx
+
sizeString
.
cx
;
sizeButton
.
cx
=
infoPtr
->
szPadding
.
cx
+
max
(
2
*
GetSystemMetrics
(
SM_CXEDGE
)
+
sizeString
.
cx
,
infoPtr
->
nBitmapWidth
)
;
}
}
return
sizeButton
;
...
...
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