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
5de172af
Commit
5de172af
authored
Feb 01, 2009
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Feb 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: toolbar: TB_SETBUTTONINFO should do a relayout instead of a recalc.
parent
ada088e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
toolbar.c
dlls/comctl32/tests/toolbar.c
+10
-0
toolbar.c
dlls/comctl32/toolbar.c
+2
-2
No files found.
dlls/comctl32/tests/toolbar.c
View file @
5de172af
...
...
@@ -1028,6 +1028,8 @@ static BOOL did_recalc(HWND hToolbar)
static
void
test_recalc
(
void
)
{
HWND
hToolbar
;
TBBUTTONINFO
bi
;
CHAR
test
[]
=
"Test"
;
/* Like TB_ADDBUTTONS tested in test_sized, inserting a button without text
* results in a relayout, while adding one with text forces a recalc */
...
...
@@ -1039,6 +1041,14 @@ static void test_recalc(void)
SendMessage
(
hToolbar
,
TB_INSERTBUTTON
,
1
,
(
LPARAM
)
&
buttons3
[
3
]);
ok
(
did_recalc
(
hToolbar
),
"Expected a recalc - adding button with text
\n
"
);
/* TB_SETBUTTONINFO, even when adding a text, results only in a relayout */
prepare_recalc_test
(
&
hToolbar
);
bi
.
cbSize
=
sizeof
(
bi
);
bi
.
dwMask
=
TBIF_TEXT
;
bi
.
pszText
=
test
;
SendMessage
(
hToolbar
,
TB_SETBUTTONINFO
,
1
,
(
LPARAM
)
&
bi
);
ok
(
!
did_recalc
(
hToolbar
),
"Unexpected recalc - setting a button text
\n
"
);
DestroyWindow
(
hToolbar
);
}
...
...
dlls/comctl32/toolbar.c
View file @
5de172af
...
...
@@ -4447,7 +4447,7 @@ TOOLBAR_SetButtonInfoA (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* save the button rect to see if we need to redraw the whole toolbar */
oldBtnRect
=
btnPtr
->
rect
;
TOOLBAR_
Calc
Toolbar
(
hwnd
);
TOOLBAR_
Layout
Toolbar
(
hwnd
);
if
(
!
EqualRect
(
&
oldBtnRect
,
&
btnPtr
->
rect
))
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
...
...
@@ -4500,7 +4500,7 @@ TOOLBAR_SetButtonInfoW (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* save the button rect to see if we need to redraw the whole toolbar */
oldBtnRect
=
btnPtr
->
rect
;
TOOLBAR_
Calc
Toolbar
(
hwnd
);
TOOLBAR_
Layout
Toolbar
(
hwnd
);
if
(
!
EqualRect
(
&
oldBtnRect
,
&
btnPtr
->
rect
))
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
...
...
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