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
7614f27f
Commit
7614f27f
authored
Jun 13, 2003
by
Robert Shearman
Committed by
Alexandre Julliard
Jun 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Make button text centre correctly when dropdown arrow is present
- Centre dropdown arrow
parent
0fc0ddb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
toolbar.c
dlls/comctl32/toolbar.c
+11
-6
No files found.
dlls/comctl32/toolbar.c
View file @
7614f27f
...
...
@@ -179,6 +179,7 @@ typedef struct
#define TOP_BORDER 2
#define BOTTOM_BORDER 2
#define DDARROW_WIDTH 11
#define ARROW_HEIGHT 3
#define TOOLBAR_GetInfoPtr(hwnd) ((TOOLBAR_INFO *)GetWindowLongA(hwnd,0))
#define TOOLBAR_HasText(x, y) (TOOLBAR_GetText(x, y) ? TRUE : FALSE)
...
...
@@ -502,7 +503,7 @@ TOOLBAR_DrawArrow (HDC hdc, INT left, INT top, INT colorRef)
if
(
!
(
hPen
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
colorRef
))))
return
;
hOldPen
=
SelectObject
(
hdc
,
hPen
);
x
=
left
+
2
;
y
=
top
+
8
;
y
=
top
;
MoveToEx
(
hdc
,
x
,
y
,
NULL
);
LineTo
(
hdc
,
x
+
5
,
y
++
);
x
++
;
MoveToEx
(
hdc
,
x
,
y
,
NULL
);
...
...
@@ -642,7 +643,6 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
CopyRect
(
&
rcFill
,
&
rc
);
CopyRect
(
&
rcArrow
,
&
rc
);
CopyRect
(
&
rcBitmap
,
&
rc
);
CopyRect
(
&
rcText
,
&
rc
);
/* get a pointer to the text */
lpText
=
TOOLBAR_GetText
(
infoPtr
,
btnPtr
);
...
...
@@ -656,6 +656,11 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
rcArrow
.
left
=
rc
.
right
;
}
/* copy text rect after adjusting for drop-down arrow
* so that text is centred in the rectangle not containing
* the arrow */
CopyRect
(
&
rcText
,
&
rc
);
/* Center the bitmap horizontally and vertically */
if
(
dwStyle
&
TBSTYLE_LIST
)
rcBitmap
.
left
+=
3
;
...
...
@@ -794,8 +799,8 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
if
(
hasDropDownArrow
)
{
TOOLBAR_DrawArrow
(
hdc
,
rcArrow
.
left
+
1
,
rcArrow
.
top
+
1
,
COLOR_3DHIGHLIGHT
);
TOOLBAR_DrawArrow
(
hdc
,
rcArrow
.
left
,
rcArrow
.
top
,
COLOR_3DSHADOW
);
TOOLBAR_DrawArrow
(
hdc
,
rcArrow
.
left
+
1
,
rcArrow
.
top
+
1
+
(
rcArrow
.
bottom
-
rcArrow
.
top
-
ARROW_HEIGHT
)
/
2
,
COLOR_3DHIGHLIGHT
);
TOOLBAR_DrawArrow
(
hdc
,
rcArrow
.
left
,
rcArrow
.
top
+
(
rcArrow
.
bottom
-
rcArrow
.
top
-
ARROW_HEIGHT
)
/
2
,
COLOR_3DSHADOW
);
}
if
(
!
TOOLBAR_DrawImageList
(
infoPtr
,
btnPtr
,
himlDis
,
...
...
@@ -827,7 +832,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
}
if
(
hasDropDownArrow
)
TOOLBAR_DrawArrow
(
hdc
,
rcArrow
.
left
,
rcArrow
.
top
,
COLOR_WINDOWFRAME
);
TOOLBAR_DrawArrow
(
hdc
,
rcArrow
.
left
,
rcArrow
.
top
+
(
rcArrow
.
bottom
-
rcArrow
.
top
-
ARROW_HEIGHT
)
/
2
,
COLOR_WINDOWFRAME
);
TOOLBAR_DrawImageList
(
infoPtr
,
btnPtr
,
himlDef
,
hdc
,
rcBitmap
.
left
+
offset
,
rcBitmap
.
top
+
offset
,
...
...
@@ -940,7 +945,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
if
(
!
(
infoPtr
->
dwItemCDFlag
&
TBCDRF_NOEDGES
))
DrawEdge
(
hdc
,
&
rcArrow
,
EDGE_RAISED
,
BF_SOFT
|
BF_RECT
|
BF_MIDDLE
|
BF_ADJUST
);
TOOLBAR_DrawArrow
(
hdc
,
rcArrow
.
left
,
rcArrow
.
top
,
COLOR_WINDOWFRAME
);
TOOLBAR_DrawArrow
(
hdc
,
rcArrow
.
left
,
rcArrow
.
top
+
(
rcArrow
.
bottom
-
rcArrow
.
top
-
ARROW_HEIGHT
)
/
2
,
COLOR_WINDOWFRAME
);
}
TOOLBAR_DrawImageList
(
infoPtr
,
btnPtr
,
himlDef
,
...
...
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