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
26896f1b
Commit
26896f1b
authored
Feb 07, 2015
by
Mark Harmstone
Committed by
Alexandre Julliard
Feb 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix clipping error with themed groupboxes.
parent
fe411406
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
theme_button.c
dlls/comctl32/theme_button.c
+20
-2
No files found.
dlls/comctl32/theme_button.c
View file @
26896f1b
...
...
@@ -31,6 +31,10 @@
#include "vssym32.h"
#include "comctl32.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
theme_button
);
#define BUTTON_TYPE 0x0f
/* bit mask for the available button types */
/* These are indices into a states array to determine the theme state for a given theme part. */
...
...
@@ -179,10 +183,23 @@ static void GB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN
static
const
int
states
[]
=
{
GBS_NORMAL
,
GBS_DISABLED
,
GBS_NORMAL
,
GBS_NORMAL
,
GBS_NORMAL
};
RECT
bgRect
,
textRect
,
contentRect
;
HFONT
font
=
(
HFONT
)
SendMessageW
(
hwnd
,
WM_GETFONT
,
0
,
0
);
HFONT
hPrevFont
=
font
?
SelectObject
(
hDC
,
font
)
:
NULL
;
int
state
=
states
[
drawState
];
WCHAR
*
text
=
get_button_text
(
hwnd
);
LOGFONTW
lf
;
HFONT
font
,
hPrevFont
=
NULL
;
BOOL
created_font
=
FALSE
;
HRESULT
hr
=
GetThemeFont
(
theme
,
hDC
,
BP_GROUPBOX
,
state
,
TMT_FONT
,
&
lf
);
if
(
SUCCEEDED
(
hr
))
{
font
=
CreateFontIndirectW
(
&
lf
);
if
(
!
font
)
TRACE
(
"Failed to create font
\n
"
);
else
{
hPrevFont
=
SelectObject
(
hDC
,
font
);
created_font
=
TRUE
;
}
}
else
font
=
(
HFONT
)
SendMessageW
(
hwnd
,
WM_GETFONT
,
0
,
0
);
GetClientRect
(
hwnd
,
&
bgRect
);
textRect
=
bgRect
;
...
...
@@ -216,6 +233,7 @@ static void GB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN
HeapFree
(
GetProcessHeap
(),
0
,
text
);
}
if
(
created_font
)
DeleteObject
(
font
);
if
(
hPrevFont
)
SelectObject
(
hDC
,
hPrevFont
);
}
...
...
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