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
e82b9dc3
Commit
e82b9dc3
authored
Apr 28, 2015
by
Huw Davies
Committed by
Alexandre Julliard
Apr 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Move the style change code to the TB_SETSTYLE handler.
parent
d6802318
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
24 deletions
+22
-24
toolbar.c
dlls/comctl32/toolbar.c
+22
-24
No files found.
dlls/comctl32/toolbar.c
View file @
e82b9dc3
...
@@ -4922,7 +4922,28 @@ TOOLBAR_SetState (TOOLBAR_INFO *infoPtr, INT Id, LPARAM lParam)
...
@@ -4922,7 +4922,28 @@ TOOLBAR_SetState (TOOLBAR_INFO *infoPtr, INT Id, LPARAM lParam)
static
LRESULT
static
LRESULT
TOOLBAR_SetStyle
(
TOOLBAR_INFO
*
infoPtr
,
DWORD
style
)
TOOLBAR_SetStyle
(
TOOLBAR_INFO
*
infoPtr
,
DWORD
style
)
{
{
DWORD
dwOldStyle
=
infoPtr
->
dwStyle
;
TRACE
(
"new style 0x%08x
\n
"
,
style
);
if
(
style
&
TBSTYLE_LIST
)
infoPtr
->
dwDTFlags
=
DT_LEFT
|
DT_VCENTER
|
DT_SINGLELINE
|
DT_END_ELLIPSIS
;
else
infoPtr
->
dwDTFlags
=
DT_CENTER
|
DT_END_ELLIPSIS
;
infoPtr
->
dwStyle
=
style
;
infoPtr
->
dwStyle
=
style
;
TOOLBAR_CheckStyle
(
infoPtr
);
if
((
dwOldStyle
^
style
)
&
(
TBSTYLE_WRAPABLE
|
CCS_VERT
))
TOOLBAR_LayoutToolbar
(
infoPtr
);
/* only resize if one of the CCS_* styles was changed */
if
((
dwOldStyle
^
style
)
&
COMMON_STYLES
)
{
TOOLBAR_AutoSize
(
infoPtr
);
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
TRUE
);
}
return
0
;
return
0
;
}
}
...
@@ -6337,30 +6358,7 @@ static LRESULT
...
@@ -6337,30 +6358,7 @@ static LRESULT
TOOLBAR_StyleChanged
(
TOOLBAR_INFO
*
infoPtr
,
INT
nType
,
const
STYLESTRUCT
*
lpStyle
)
TOOLBAR_StyleChanged
(
TOOLBAR_INFO
*
infoPtr
,
INT
nType
,
const
STYLESTRUCT
*
lpStyle
)
{
{
if
(
nType
==
GWL_STYLE
)
if
(
nType
==
GWL_STYLE
)
{
return
TOOLBAR_SetStyle
(
infoPtr
,
lpStyle
->
styleNew
);
DWORD
dwOldStyle
=
infoPtr
->
dwStyle
;
if
(
lpStyle
->
styleNew
&
TBSTYLE_LIST
)
infoPtr
->
dwDTFlags
=
DT_LEFT
|
DT_VCENTER
|
DT_SINGLELINE
|
DT_END_ELLIPSIS
;
else
infoPtr
->
dwDTFlags
=
DT_CENTER
|
DT_END_ELLIPSIS
;
TRACE
(
"new style 0x%08x
\n
"
,
lpStyle
->
styleNew
);
infoPtr
->
dwStyle
=
lpStyle
->
styleNew
;
TOOLBAR_CheckStyle
(
infoPtr
);
if
((
dwOldStyle
^
lpStyle
->
styleNew
)
&
(
TBSTYLE_WRAPABLE
|
CCS_VERT
))
TOOLBAR_LayoutToolbar
(
infoPtr
);
/* only resize if one of the CCS_* styles was changed */
if
((
dwOldStyle
^
lpStyle
->
styleNew
)
&
COMMON_STYLES
)
{
TOOLBAR_AutoSize
(
infoPtr
);
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
TRUE
);
}
}
return
0
;
return
0
;
}
}
...
...
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