tdf#164950 Set GtkCssProvider at APPLICATION level, not USER

- when set at the user level, the set_background() calls
  cannot override the theme settings as USER level has
  higher priority than APPLICATION level.

Change-Id: If8819b5838f6f9ff1cf5ec83e380b7546aafce93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180977
Tested-by: Jenkins
Reviewed-by: Sahil Gautam <sahil.gautam.extern@allotropia.de>
This commit is contained in:
Sahil Gautam
2025-01-31 11:59:58 +05:30
parent 80c9089765
commit 94eb08183a

View File

@@ -109,10 +109,11 @@ void ApplyCustomTheme(GdkScreen* pScreen, GtkCssProvider** pCustomThemeProvider)
#if GTK_CHECK_VERSION(4, 0, 0)
gtk_style_context_add_provider_for_display(pGdkDisplay,
GTK_STYLE_PROVIDER(*pCustomThemeProvider),
GTK_STYLE_PROVIDER_PRIORITY_USER);
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
#else
gtk_style_context_add_provider_for_screen(
pScreen, GTK_STYLE_PROVIDER(*pCustomThemeProvider), GTK_STYLE_PROVIDER_PRIORITY_USER);
gtk_style_context_add_provider_for_screen(pScreen,
GTK_STYLE_PROVIDER(*pCustomThemeProvider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
#endif
}
}