uxtheme: Initialize system metrics in 96 DPI.
Similar to 7290db3
.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
af48d90a6f
commit
cd99d08a74
|
@ -733,12 +733,18 @@ struct PARSENONCLIENTSTATE
|
||||||
|
|
||||||
static inline void parse_init_nonclient (struct PARSENONCLIENTSTATE* state)
|
static inline void parse_init_nonclient (struct PARSENONCLIENTSTATE* state)
|
||||||
{
|
{
|
||||||
|
DPI_AWARENESS_CONTEXT old_context;
|
||||||
|
|
||||||
|
old_context = SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE);
|
||||||
|
|
||||||
memset (state, 0, sizeof (*state));
|
memset (state, 0, sizeof (*state));
|
||||||
state->metrics.cbSize = sizeof (NONCLIENTMETRICSW);
|
state->metrics.cbSize = sizeof (NONCLIENTMETRICSW);
|
||||||
SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, sizeof (NONCLIENTMETRICSW),
|
SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, sizeof (NONCLIENTMETRICSW),
|
||||||
&state->metrics, 0);
|
&state->metrics, 0);
|
||||||
SystemParametersInfoW (SPI_GETICONTITLELOGFONT, sizeof (LOGFONTW),
|
SystemParametersInfoW (SPI_GETICONTITLELOGFONT, sizeof (LOGFONTW),
|
||||||
&state->iconTitleFont, 0);
|
&state->iconTitleFont, 0);
|
||||||
|
|
||||||
|
SetThreadDpiAwarenessContext(old_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL parse_handle_nonclient_font (struct PARSENONCLIENTSTATE* state,
|
static BOOL parse_handle_nonclient_font (struct PARSENONCLIENTSTATE* state,
|
||||||
|
|
Loading…
Reference in New Issue