Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
a319a978
Commit
a319a978
authored
24 years ago
by
Chris Morgan
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed TOOLBAR_DrawString() to offset button text if infoPtr->himlDef
is non-zero. Better fix than my previous patch.
parent
bec3244f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/comctl32/toolbar.c
+11
-17
11 additions, 17 deletions
dlls/comctl32/toolbar.c
with
11 additions
and
17 deletions
dlls/comctl32/toolbar.c
+
11
−
17
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
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment