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
268cdbbf
Commit
268cdbbf
authored
Jul 17, 2015
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: SystemParametersInfo(SPI_GETNONCLIENTMETRICS) should return real font names.
parent
50b6b376
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
sysparams.c
dlls/user32/sysparams.c
+20
-0
sysparams.c
dlls/user32/tests/sysparams.c
+0
-5
No files found.
dlls/user32/sysparams.c
View file @
268cdbbf
...
...
@@ -621,6 +621,20 @@ static inline int get_display_dpi(void)
return
display_dpi
;
}
static
INT
CALLBACK
real_fontname_proc
(
const
LOGFONTW
*
lf
,
const
TEXTMETRICW
*
ntm
,
DWORD
type
,
LPARAM
lparam
)
{
const
ENUMLOGFONTW
*
elf
=
(
const
ENUMLOGFONTW
*
)
lf
;
LOGFONTW
*
lfW
=
(
LOGFONTW
*
)
lparam
;
lstrcpynW
(
lfW
->
lfFaceName
,
elf
->
elfFullName
,
LF_FACESIZE
);
return
0
;
}
static
void
get_real_fontname
(
LOGFONTW
*
lf
)
{
EnumFontFamiliesExW
(
get_display_dc
(),
lf
,
real_fontname_proc
,
(
LPARAM
)
lf
,
0
);
}
/* adjust some of the raw values found in the registry */
static
void
normalize_nonclientmetrics
(
NONCLIENTMETRICSW
*
pncm
)
{
...
...
@@ -633,10 +647,16 @@ static void normalize_nonclientmetrics( NONCLIENTMETRICSW *pncm)
/* adjust some heights to the corresponding font */
get_text_metr_size
(
get_display_dc
(),
&
pncm
->
lfMenuFont
,
&
tm
,
NULL
);
pncm
->
iMenuHeight
=
max
(
pncm
->
iMenuHeight
,
2
+
tm
.
tmHeight
+
tm
.
tmExternalLeading
);
get_real_fontname
(
&
pncm
->
lfMenuFont
);
get_text_metr_size
(
get_display_dc
(),
&
pncm
->
lfCaptionFont
,
&
tm
,
NULL
);
pncm
->
iCaptionHeight
=
max
(
pncm
->
iCaptionHeight
,
2
+
tm
.
tmHeight
);
get_real_fontname
(
&
pncm
->
lfCaptionFont
);
get_text_metr_size
(
get_display_dc
(),
&
pncm
->
lfSmCaptionFont
,
&
tm
,
NULL
);
pncm
->
iSmCaptionHeight
=
max
(
pncm
->
iSmCaptionHeight
,
2
+
tm
.
tmHeight
);
get_real_fontname
(
&
pncm
->
lfSmCaptionFont
);
get_real_fontname
(
&
pncm
->
lfStatusFont
);
get_real_fontname
(
&
pncm
->
lfMessageFont
);
}
static
BOOL
CALLBACK
enum_monitors
(
HMONITOR
monitor
,
HDC
hdc
,
LPRECT
rect
,
LPARAM
lp
)
...
...
dlls/user32/tests/sysparams.c
View file @
268cdbbf
...
...
@@ -2709,15 +2709,10 @@ static void test_GetSystemMetrics( void)
return
;
}
todo_wine
ok
(
is_font_enumerated
(
ncm
.
lfCaptionFont
.
lfFaceName
),
"font %s should be enumerated
\n
"
,
ncm
.
lfCaptionFont
.
lfFaceName
);
todo_wine
ok
(
is_font_enumerated
(
ncm
.
lfSmCaptionFont
.
lfFaceName
),
"font %s should be enumerated
\n
"
,
ncm
.
lfSmCaptionFont
.
lfFaceName
);
todo_wine
ok
(
is_font_enumerated
(
ncm
.
lfMenuFont
.
lfFaceName
),
"font %s should be enumerated
\n
"
,
ncm
.
lfMenuFont
.
lfFaceName
);
todo_wine
ok
(
is_font_enumerated
(
ncm
.
lfStatusFont
.
lfFaceName
),
"font %s should be enumerated
\n
"
,
ncm
.
lfStatusFont
.
lfFaceName
);
todo_wine
ok
(
is_font_enumerated
(
ncm
.
lfMessageFont
.
lfFaceName
),
"font %s should be enumerated
\n
"
,
ncm
.
lfMessageFont
.
lfFaceName
);
/* CaptionWidth from the registry may have different value of iCaptionWidth
...
...
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