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
0634f3b4
Commit
0634f3b4
authored
May 19, 2015
by
Huw Davies
Committed by
Alexandre Julliard
May 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: If necessary add the width of a dropdown arrow while wrapping.
This also fixes the layout code for the BTNS_WHOLEDROPDOWN case.
parent
797f4269
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
toolbar.c
dlls/comctl32/toolbar.c
+13
-8
No files found.
dlls/comctl32/toolbar.c
View file @
0634f3b4
...
...
@@ -259,6 +259,12 @@ static inline BOOL TOOLBAR_HasDropDownArrows(DWORD exStyle)
return
(
exStyle
&
TBSTYLE_EX_DRAWDDARROWS
)
!=
0
;
}
static
inline
BOOL
button_has_ddarrow
(
const
TOOLBAR_INFO
*
infoPtr
,
const
TBUTTON_INFO
*
btnPtr
)
{
return
(
TOOLBAR_HasDropDownArrows
(
infoPtr
->
dwExStyle
)
&&
(
btnPtr
->
fsStyle
&
BTNS_DROPDOWN
))
||
(
btnPtr
->
fsStyle
&
BTNS_WHOLEDROPDOWN
);
}
static
LPWSTR
TOOLBAR_GetText
(
const
TOOLBAR_INFO
*
infoPtr
,
const
TBUTTON_INFO
*
btnPtr
)
{
...
...
@@ -823,9 +829,7 @@ static void
TOOLBAR_DrawButton
(
const
TOOLBAR_INFO
*
infoPtr
,
TBUTTON_INFO
*
btnPtr
,
HDC
hdc
,
DWORD
dwBaseCustDraw
)
{
DWORD
dwStyle
=
infoPtr
->
dwStyle
;
BOOL
hasDropDownArrow
=
(
TOOLBAR_HasDropDownArrows
(
infoPtr
->
dwExStyle
)
&&
(
btnPtr
->
fsStyle
&
BTNS_DROPDOWN
))
||
(
btnPtr
->
fsStyle
&
BTNS_WHOLEDROPDOWN
);
BOOL
hasDropDownArrow
=
button_has_ddarrow
(
infoPtr
,
btnPtr
);
BOOL
drawSepDropDownArrow
=
hasDropDownArrow
&&
(
~
btnPtr
->
fsStyle
&
BTNS_WHOLEDROPDOWN
);
RECT
rc
,
rcArrow
,
rcBitmap
,
rcText
;
...
...
@@ -1316,6 +1320,9 @@ TOOLBAR_WrapToolbar(TOOLBAR_INFO *infoPtr)
else
cx
=
infoPtr
->
nButtonWidth
;
if
(
!
btnPtr
[
i
].
cx
&&
button_has_ddarrow
(
infoPtr
,
btnPtr
+
i
))
cx
+=
DDARROW_WIDTH
;
/* Two or more adjacent separators form a separator group. */
/* The first separator in a group should be wrapped to the */
/* next row if the previous wrapping is on a button. */
...
...
@@ -1628,7 +1635,6 @@ TOOLBAR_LayoutToolbar(TOOLBAR_INFO *infoPtr)
INT
x
,
y
,
cx
,
cy
;
BOOL
bWrap
;
BOOL
validImageList
=
TOOLBAR_IsValidImageList
(
infoPtr
,
0
);
BOOL
hasDropDownArrows
=
TOOLBAR_HasDropDownArrows
(
infoPtr
->
dwExStyle
);
TOOLBAR_WrapToolbar
(
infoPtr
);
...
...
@@ -1696,11 +1702,10 @@ TOOLBAR_LayoutToolbar(TOOLBAR_INFO *infoPtr)
/* if size has been set manually then don't add on extra space
* for the drop down arrow */
if
(
!
btnPtr
->
cx
&&
hasDropDownArrows
&&
((
btnPtr
->
fsStyle
&
BTNS_DROPDOWN
)
||
(
btnPtr
->
fsStyle
&
BTNS_WHOLEDROPDOWN
)))
cx
+=
DDARROW_WIDTH
;
if
(
!
btnPtr
->
cx
&&
button_has_ddarrow
(
infoPtr
,
btnPtr
))
cx
+=
DDARROW_WIDTH
;
}
if
(
btnPtr
->
fsState
&
TBSTATE_WRAP
)
if
(
btnPtr
->
fsState
&
TBSTATE_WRAP
)
bWrap
=
TRUE
;
SetRect
(
&
btnPtr
->
rect
,
x
,
y
,
x
+
cx
,
y
+
cy
);
...
...
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