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
eb8df37a
Commit
eb8df37a
authored
Apr 29, 2015
by
Huw Davies
Committed by
Alexandre Julliard
Apr 30, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Remove button wrap states when TBSTYLE_WRAPABLE is cleared.
parent
8633fd62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
toolbar.c
dlls/comctl32/tests/toolbar.c
+10
-0
toolbar.c
dlls/comctl32/toolbar.c
+11
-0
No files found.
dlls/comctl32/tests/toolbar.c
View file @
eb8df37a
...
...
@@ -1085,6 +1085,7 @@ static void test_sizes(void)
HWND
hToolbar
=
NULL
;
HIMAGELIST
himl
,
himl2
;
TBBUTTONINFOA
tbinfo
;
TBBUTTON
button
;
int
style
;
int
i
;
int
fontheight
=
system_font_height
();
...
...
@@ -1100,9 +1101,13 @@ static void test_sizes(void)
check_sizes
();
SendMessageA
(
hToolbar
,
TB_AUTOSIZE
,
0
,
0
);
check_sizes
();
SendMessageA
(
hToolbar
,
TB_GETBUTTON
,
5
,
(
LPARAM
)
&
button
);
ok
(
button
.
fsState
==
(
TBSTATE_WRAP
|
TBSTATE_ENABLED
),
"got %08x
\n
"
,
button
.
fsState
);
/* after setting the TBSTYLE_WRAPABLE the TBSTATE_WRAP is ignored */
SetWindowLongA
(
hToolbar
,
GWL_STYLE
,
style
|
TBSTYLE_WRAPABLE
);
check_sizes
();
SendMessageA
(
hToolbar
,
TB_GETBUTTON
,
5
,
(
LPARAM
)
&
button
);
ok
(
button
.
fsState
==
TBSTATE_ENABLED
,
"got %08x
\n
"
,
button
.
fsState
);
/* adding new buttons with TBSTYLE_WRAPABLE doesn't add a new row */
SendMessageA
(
hToolbar
,
TB_ADDBUTTONSA
,
2
,
(
LPARAM
)
buttons1
);
check_sizes
();
...
...
@@ -1111,6 +1116,11 @@ static void test_sizes(void)
for
(
i
=
0
;
i
<
15
;
i
++
)
SendMessageA
(
hToolbar
,
TB_ADDBUTTONSA
,
2
,
(
LPARAM
)
buttons1
);
check_sizes_todo
(
0x4
);
SendMessageA
(
hToolbar
,
TB_GETBUTTON
,
31
,
(
LPARAM
)
&
button
);
ok
(
button
.
fsState
==
(
TBSTATE_WRAP
|
TBSTATE_ENABLED
),
"got %08x
\n
"
,
button
.
fsState
);
SetWindowLongA
(
hToolbar
,
GWL_STYLE
,
style
);
SendMessageA
(
hToolbar
,
TB_GETBUTTON
,
31
,
(
LPARAM
)
&
button
);
ok
(
button
.
fsState
==
TBSTATE_ENABLED
,
"got %08x
\n
"
,
button
.
fsState
);
rebuild_toolbar_with_buttons
(
&
hToolbar
);
SendMessageA
(
hToolbar
,
TB_ADDBUTTONSA
,
2
,
(
LPARAM
)
buttons1
);
...
...
dlls/comctl32/toolbar.c
View file @
eb8df37a
...
...
@@ -4918,6 +4918,13 @@ TOOLBAR_SetState (TOOLBAR_INFO *infoPtr, INT Id, LPARAM lParam)
return
TRUE
;
}
static
inline
void
unwrap
(
TOOLBAR_INFO
*
info
)
{
int
i
;
for
(
i
=
0
;
i
<
info
->
nNumButtons
;
i
++
)
info
->
buttons
[
i
].
fsState
&=
~
TBSTATE_WRAP
;
}
static
LRESULT
TOOLBAR_SetStyle
(
TOOLBAR_INFO
*
infoPtr
,
DWORD
style
)
...
...
@@ -4935,7 +4942,11 @@ TOOLBAR_SetStyle (TOOLBAR_INFO *infoPtr, DWORD style)
TOOLBAR_CheckStyle
(
infoPtr
);
if
((
dwOldStyle
^
style
)
&
TBSTYLE_WRAPABLE
)
{
if
(
dwOldStyle
&
TBSTYLE_WRAPABLE
)
unwrap
(
infoPtr
);
TOOLBAR_CalcToolbar
(
infoPtr
);
}
else
if
((
dwOldStyle
^
style
)
&
CCS_VERT
)
TOOLBAR_LayoutToolbar
(
infoPtr
);
...
...
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