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
50cd0e02
Commit
50cd0e02
authored
Aug 03, 2005
by
Frank Richter
Committed by
Alexandre Julliard
Aug 03, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement GetThemeBackgroundExtent().
parent
2bacc463
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
draw.c
dlls/uxtheme/draw.c
+26
-7
No files found.
dlls/uxtheme/draw.c
View file @
50cd0e02
...
...
@@ -1015,15 +1015,34 @@ HRESULT WINAPI GetThemeBackgroundExtent(HTHEME hTheme, HDC hdc, int iPartId,
if
(
!
hTheme
)
return
E_HANDLE
;
/* try content margins property... */
hr
=
GetThemeMargins
(
hTheme
,
hdc
,
iPartId
,
iStateId
,
TMT_CONTENTMARGINS
,
NULL
,
&
margin
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Margins not found
\n
"
);
return
hr
;
if
(
SUCCEEDED
(
hr
))
{
pExtentRect
->
left
=
pContentRect
->
left
-
margin
.
cxLeftWidth
;
pExtentRect
->
top
=
pContentRect
->
top
-
margin
.
cyTopHeight
;
pExtentRect
->
right
=
pContentRect
->
right
+
margin
.
cxRightWidth
;
pExtentRect
->
bottom
=
pContentRect
->
bottom
+
margin
.
cyBottomHeight
;
}
else
{
/* otherwise, try to determine content rect from the background type and props */
int
bgtype
=
BT_BORDERFILL
;
memcpy
(
pExtentRect
,
pContentRect
,
sizeof
(
RECT
));
GetThemeEnumValue
(
hTheme
,
iPartId
,
iStateId
,
TMT_BGTYPE
,
&
bgtype
);
if
(
bgtype
==
BT_BORDERFILL
)
{
int
bordersize
=
1
;
GetThemeInt
(
hTheme
,
iPartId
,
iStateId
,
TMT_BORDERSIZE
,
&
bordersize
);
InflateRect
(
pExtentRect
,
bordersize
,
bordersize
);
}
else
if
((
bgtype
==
BT_IMAGEFILE
)
&&
(
SUCCEEDED
(
hr
=
GetThemeMargins
(
hTheme
,
hdc
,
iPartId
,
iStateId
,
TMT_SIZINGMARGINS
,
NULL
,
&
margin
))))
{
pExtentRect
->
left
=
pContentRect
->
left
-
margin
.
cxLeftWidth
;
pExtentRect
->
top
=
pContentRect
->
top
-
margin
.
cyTopHeight
;
pExtentRect
->
right
=
pContentRect
->
right
+
margin
.
cxRightWidth
;
pExtentRect
->
bottom
=
pContentRect
->
bottom
+
margin
.
cyBottomHeight
;
}
/* If nothing was found, leave unchanged */
}
pExtentRect
->
left
=
pContentRect
->
left
-
margin
.
cxLeftWidth
;
pExtentRect
->
top
=
pContentRect
->
top
-
margin
.
cyTopHeight
;
pExtentRect
->
right
=
pContentRect
->
right
+
margin
.
cxRightWidth
;
pExtentRect
->
bottom
=
pContentRect
->
bottom
+
margin
.
cyBottomHeight
;
TRACE
(
"left:%ld,top:%ld,right:%ld,bottom:%ld
\n
"
,
pExtentRect
->
left
,
pExtentRect
->
top
,
pExtentRect
->
right
,
pExtentRect
->
bottom
);
...
...
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