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
52570539
Commit
52570539
authored
Sep 30, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Respect locale abbreviated day names when calculating control dimensions.
parent
ad40c15c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
monthcal.c
dlls/comctl32/monthcal.c
+23
-4
No files found.
dlls/comctl32/monthcal.c
View file @
52570539
...
...
@@ -1739,7 +1739,6 @@ MONTHCAL_SetFocus(const MONTHCAL_INFO *infoPtr)
/* sets the size information */
static
void
MONTHCAL_UpdateSize
(
MONTHCAL_INFO
*
infoPtr
)
{
static
const
WCHAR
SunW
[]
=
{
'S'
,
'u'
,
'n'
,
0
};
static
const
WCHAR
O0W
[]
=
{
'0'
,
'0'
,
0
};
HDC
hdc
=
GetDC
(
infoPtr
->
hwndSelf
);
RECT
*
title
=&
infoPtr
->
title
;
...
...
@@ -1751,11 +1750,12 @@ static void MONTHCAL_UpdateSize(MONTHCAL_INFO *infoPtr)
RECT
*
weeknumrect
=&
infoPtr
->
weeknums
;
RECT
*
days
=&
infoPtr
->
days
;
RECT
*
todayrect
=&
infoPtr
->
todayrect
;
SIZE
size
;
SIZE
size
,
sz
;
TEXTMETRICW
tm
;
HFONT
currentFont
;
INT
xdiv
,
dx
,
dy
;
INT
xdiv
,
dx
,
dy
,
i
;
RECT
rcClient
;
WCHAR
buff
[
80
];
GetClientRect
(
infoPtr
->
hwndSelf
,
&
rcClient
);
...
...
@@ -1764,7 +1764,26 @@ static void MONTHCAL_UpdateSize(MONTHCAL_INFO *infoPtr)
/* get the height and width of each day's text */
GetTextMetricsW
(
hdc
,
&
tm
);
infoPtr
->
textHeight
=
tm
.
tmHeight
+
tm
.
tmExternalLeading
+
tm
.
tmInternalLeading
;
GetTextExtentPoint32W
(
hdc
,
SunW
,
3
,
&
size
);
/* find largest abbreviated day name for current locale */
size
.
cx
=
sz
.
cx
=
0
;
for
(
i
=
0
;
i
<
7
;
i
++
)
{
if
(
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_SABBREVDAYNAME1
,
buff
,
countof
(
buff
)))
{
GetTextExtentPoint32W
(
hdc
,
buff
,
lstrlenW
(
buff
),
&
sz
);
if
(
sz
.
cx
>
size
.
cx
)
size
.
cx
=
sz
.
cx
;
}
else
/* locale independent fallback on failure */
{
static
const
WCHAR
SunW
[]
=
{
'S'
,
'u'
,
'n'
,
0
};
GetTextExtentPoint32W
(
hdc
,
SunW
,
lstrlenW
(
SunW
),
&
size
);
break
;
}
}
infoPtr
->
textWidth
=
size
.
cx
+
2
;
/* recalculate the height and width increments and offsets */
...
...
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