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
7bf7cdd1
Commit
7bf7cdd1
authored
Mar 27, 2007
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Mar 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: toolbar: TB_HIDEBUTTON and TB_MOVEBUTTON shouldn't force a recalc.
parent
23e2cb1f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
toolbar.c
dlls/comctl32/tests/toolbar.c
+12
-0
toolbar.c
dlls/comctl32/toolbar.c
+2
-2
No files found.
dlls/comctl32/tests/toolbar.c
View file @
7bf7cdd1
...
...
@@ -843,6 +843,18 @@ static void test_sizes(void)
SendMessageA
(
hToolbar
,
TB_INSERTBUTTON
,
1
,
(
LPARAM
)
&
buttons2
[
0
]);
ok
(
SendMessageA
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
)
==
MAKELONG
(
23
,
22
),
"Unexpected button size
\n
"
);
/* TB_HIDEBUTTON and TB_MOVEBUTTON doesn't force a recalc */
SendMessageA
(
hToolbar
,
TB_SETBUTTONSIZE
,
0
,
MAKELONG
(
100
,
100
));
ok
(
SendMessageA
(
hToolbar
,
TB_MOVEBUTTON
,
0
,
1
),
"TB_MOVEBUTTON failed
\n
"
);
ok
(
SendMessageA
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
)
==
MAKELONG
(
100
,
100
),
"Unexpected button size
\n
"
);
ok
(
SendMessageA
(
hToolbar
,
TB_HIDEBUTTON
,
20
,
TRUE
),
"TB_HIDEBUTTON failed
\n
"
);
ok
(
SendMessageA
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
)
==
MAKELONG
(
100
,
100
),
"Unexpected button size
\n
"
);
/* however changing the hidden flag with TB_SETSTATE does */
ok
(
SendMessageA
(
hToolbar
,
TB_SETSTATE
,
20
,
TBSTATE_ENABLED
|
TBSTATE_HIDDEN
),
"TB_SETSTATE failed
\n
"
);
ok
(
SendMessageA
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
)
==
MAKELONG
(
100
,
100
),
"Unexpected button size
\n
"
);
ok
(
SendMessageA
(
hToolbar
,
TB_SETSTATE
,
20
,
TBSTATE_ENABLED
),
"TB_SETSTATE failed
\n
"
);
ok
(
SendMessageA
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
)
==
MAKELONG
(
23
,
22
),
"Unexpected button size
\n
"
);
rebuild_toolbar
(
&
hToolbar
);
SendMessageA
(
hToolbar
,
TB_ADDBUTTONS
,
1
,
(
LPARAM
)
&
buttons3
[
3
]);
ok
(
SendMessageA
(
hToolbar
,
TB_GETBUTTONSIZE
,
0
,
0
)
==
MAKELONG
(
27
,
39
),
"Unexpected button size
\n
"
);
...
...
dlls/comctl32/toolbar.c
View file @
7bf7cdd1
...
...
@@ -3757,7 +3757,7 @@ TOOLBAR_HideButton (HWND hwnd, WPARAM wParam, LPARAM lParam)
else
btnPtr
->
fsState
|=
TBSTATE_HIDDEN
;
TOOLBAR_
Calc
Toolbar
(
hwnd
);
TOOLBAR_
Layout
Toolbar
(
hwnd
);
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
...
...
@@ -4099,7 +4099,7 @@ TOOLBAR_MoveButton (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_MoveFixupIndex
(
&
infoPtr
->
nHotItem
,
nIndex
,
nMoveIndex
,
FALSE
);
}
TOOLBAR_
Calc
Toolbar
(
hwnd
);
TOOLBAR_
Layout
Toolbar
(
hwnd
);
TOOLBAR_AutoSize
(
hwnd
);
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