mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
GdkWin32: Detect the high contrast setting
And set the theme name accordingly ("Default-hc")
This commit is contained in:
parent
95c121b6d6
commit
45681c4fe5
@ -147,6 +147,23 @@ _gdk_win32_get_setting (const char *name,
|
||||
g_value_set_boolean (value, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
else if (strcmp ("gtk-theme-name", name) == 0)
|
||||
{
|
||||
HIGHCONTRASTW hc;
|
||||
memset (&hc, 0, sizeof (hc));
|
||||
hc.cbSize = sizeof (hc);
|
||||
if (API_CALL (SystemParametersInfoW, (SPI_GETHIGHCONTRAST, sizeof (hc), &hc, 0)))
|
||||
{
|
||||
if (hc.dwFlags & HCF_HIGHCONTRASTON)
|
||||
{
|
||||
const char *theme_name = "Default-hc";
|
||||
|
||||
GDK_NOTE(MISC, g_print("gdk_display_get_setting(\"%s\") : %s\n", name, theme_name));
|
||||
g_value_set_string (value, theme_name);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (strcmp ("gtk-xft-antialias", name) == 0)
|
||||
{
|
||||
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : 1\n", name));
|
||||
|
Loading…
Reference in New Issue
Block a user