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
a319a978
Commit
a319a978
authored
Jul 11, 2000
by
Chris Morgan
Committed by
Alexandre Julliard
Jul 11, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed TOOLBAR_DrawString() to offset button text if infoPtr->himlDef
is non-zero. Better fix than my previous patch.
parent
bec3244f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
toolbar.c
dlls/comctl32/toolbar.c
+11
-17
No files found.
dlls/comctl32/toolbar.c
View file @
a319a978
...
...
@@ -74,20 +74,20 @@ TOOLBAR_DrawFlatSeparator (LPRECT lpRect, HDC hdc)
/*
* Draw the text string for this button.
* note: himl is not used, except to determine whether this button has
* an associated bitmap. If himl and infoPtr->himlDef are non-zero
* the text is drawn below it, otherwise the text is drawn within
* the rectangle of the button itself.
* note: infoPtr->himlDis *SHOULD* be non-zero when infoPtr->himlDef
* is non-zero, so we can simply check himlDef to see if we have
* an image list
*/
static
void
TOOLBAR_DrawString
(
TOOLBAR_INFO
*
infoPtr
,
TBUTTON_INFO
*
btnPtr
,
HDC
hdc
,
INT
nState
,
DWORD
dwStyle
,
HIMAGELIST
himl
)
HDC
hdc
,
INT
nState
,
DWORD
dwStyle
)
{
RECT
rcText
=
btnPtr
->
rect
;
HFONT
hOldFont
;
INT
nOldBkMode
;
COLORREF
clrOld
;
LPWSTR
lpText
=
NULL
;
HIMAGELIST
himl
=
infoPtr
->
himlDef
;
TRACE
(
"iString: %x
\n
"
,
btnPtr
->
iString
);
...
...
@@ -106,8 +106,7 @@ TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
InflateRect
(
&
rcText
,
-
3
,
-
3
);
if
((
himl
||
infoPtr
->
himlDef
)
&&
TOOLBAR_IsValidBitmapIndex
(
infoPtr
,
btnPtr
->
iBitmap
))
{
if
(
himl
&&
TOOLBAR_IsValidBitmapIndex
(
infoPtr
,
btnPtr
->
iBitmap
))
{
if
((
dwStyle
&
TBSTYLE_LIST
)
&&
((
btnPtr
->
fsStyle
&
TBSTYLE_AUTOSIZE
)
==
0
)
&&
(
btnPtr
->
iBitmap
!=
I_IMAGENONE
))
{
...
...
@@ -246,8 +245,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
else
TOOLBAR_DrawMasked
(
infoPtr
,
btnPtr
,
hdc
,
rc
.
left
+
1
,
rc
.
top
+
1
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
,
dwStyle
,
infoPtr
->
himlDis
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
,
dwStyle
);
return
;
}
...
...
@@ -260,8 +258,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
if
(
TOOLBAR_IsValidBitmapIndex
(
infoPtr
,
btnPtr
->
iBitmap
))
ImageList_Draw
(
infoPtr
->
himlDef
,
btnPtr
->
iBitmap
,
hdc
,
rc
.
left
+
2
,
rc
.
top
+
2
,
ILD_NORMAL
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
,
dwStyle
,
infoPtr
->
himlDef
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
,
dwStyle
);
return
;
}
...
...
@@ -281,8 +278,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
ImageList_Draw
(
infoPtr
->
himlDef
,
btnPtr
->
iBitmap
,
hdc
,
rc
.
left
+
2
,
rc
.
top
+
2
,
ILD_NORMAL
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
,
dwStyle
,
infoPtr
->
himlDef
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
,
dwStyle
);
return
;
}
...
...
@@ -293,8 +289,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
TOOLBAR_DrawPattern
(
hdc
,
&
rc
);
TOOLBAR_DrawMasked
(
infoPtr
,
btnPtr
,
hdc
,
rc
.
left
+
1
,
rc
.
top
+
1
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
,
dwStyle
,
infoPtr
->
himlDef
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
,
dwStyle
);
return
;
}
...
...
@@ -321,8 +316,7 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc)
rc
.
left
+
1
,
rc
.
top
+
1
,
ILD_NORMAL
);
}
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
,
dwStyle
,
infoPtr
->
himlDef
);
TOOLBAR_DrawString
(
infoPtr
,
btnPtr
,
hdc
,
btnPtr
->
fsState
,
dwStyle
);
}
...
...
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