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
844625cb
Commit
844625cb
authored
Dec 15, 2000
by
Aric Stewart
Committed by
Alexandre Julliard
Dec 15, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some difficulties with the font on vertical tabs. Also plugged a
resource leak.
parent
361eebb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
14 deletions
+31
-14
tab.c
dlls/comctl32/tab.c
+31
-14
No files found.
dlls/comctl32/tab.c
View file @
844625cb
...
...
@@ -1406,7 +1406,7 @@ TAB_DrawItemInterior
RECT
rcTemp
;
RECT
rcImage
;
LOGFONTA
logfont
;
HFONT
hFont
;
HFONT
hFont
=
0
;
HFONT
hOldFont
=
0
;
/* stop uninitialized warning */
INT
nEscapement
=
0
;
/* stop uninitialized warning */
...
...
@@ -1483,8 +1483,12 @@ TAB_DrawItemInterior
{
if
(
lStyle
&
TCS_VERTICAL
)
{
center_offset
=
((
drawRect
->
bottom
-
drawRect
->
top
)
-
(
rcText
.
right
-
rcText
.
left
))
/
2
;
center_offset
=
0
;
/*
currently the rcText rect is flawed because the rotated font does not
often match the horizontal font. So leave this as 0
((drawRect->bottom - drawRect->top) - (rcText.right - rcText.left)) / 2;
*/
if
(
lStyle
&
TCS_BOTTOM
)
drawRect
->
top
+=
center_offset
;
else
...
...
@@ -1521,14 +1525,20 @@ TAB_DrawItemInterior
/* call CreateFontIndirectA, which requires us to set the values of the logfont we pass in */
if
(
lStyle
&
TCS_VERTICAL
)
{
iPointSize
=
9
;
lstrcpyA
(
logfont
.
lfFaceName
,
"Arial"
);
logfont
.
lfHeight
=
-
MulDiv
(
iPointSize
,
GetDeviceCaps
(
hdc
,
LOGPIXELSY
),
72
);
logfont
.
lfWeight
=
FW_NORMAL
;
logfont
.
lfItalic
=
0
;
logfont
.
lfUnderline
=
0
;
logfont
.
lfStrikeOut
=
0
;
if
(
!
GetObjectA
((
infoPtr
->
hFont
)
?
infoPtr
->
hFont
:
GetStockObject
(
SYSTEM_FONT
),
sizeof
(
LOGFONTA
),
&
logfont
))
{
iPointSize
=
9
;
lstrcpyA
(
logfont
.
lfFaceName
,
"Arial"
);
logfont
.
lfHeight
=
-
MulDiv
(
iPointSize
,
GetDeviceCaps
(
hdc
,
LOGPIXELSY
),
72
);
logfont
.
lfWeight
=
FW_NORMAL
;
logfont
.
lfItalic
=
0
;
logfont
.
lfUnderline
=
0
;
logfont
.
lfStrikeOut
=
0
;
}
logfont
.
lfEscapement
=
nEscapement
;
logfont
.
lfOrientation
=
nOrientation
;
...
...
@@ -1541,8 +1551,8 @@ TAB_DrawItemInterior
ExtTextOutW
(
hdc
,
(
lStyle
&
TCS_BOTTOM
)
?
drawRect
->
right
:
drawRect
->
left
,
(
!
(
lStyle
&
TCS_BOTTOM
))
?
drawRect
->
bottom
:
drawRect
->
top
,
0
,
0
,
ETO_CLIPPED
,
drawRect
,
infoPtr
->
items
[
iItem
].
pszText
,
lstrlenW
(
infoPtr
->
items
[
iItem
].
pszText
),
0
);
...
...
@@ -1563,7 +1573,11 @@ TAB_DrawItemInterior
*
drawRect
=
rcTemp
;
/* restore drawRect */
if
(
lStyle
&
TCS_VERTICAL
)
{
SelectObject
(
hdc
,
hOldFont
);
/* restore the original font */
if
(
hFont
)
DeleteObject
(
hFont
);
}
}
/*
...
...
@@ -1834,8 +1848,11 @@ static void TAB_DrawItem(
}
/* This modifies r to be the text rectangle. */
{
HFONT
hOldFont
=
SelectObject
(
hdc
,
infoPtr
->
hFont
);
TAB_DrawItemInterior
(
hwnd
,
hdc
,
iItem
,
&
r
);
SelectObject
(
hdc
,
hOldFont
);
}
/* Draw the focus rectangle */
if
(((
lStyle
&
TCS_FOCUSNEVER
)
==
0
)
&&
(
GetFocus
()
==
hwnd
)
&&
...
...
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