st/settings: Use the new high-contrast gsettings key
We now have a dedicated "high-contrast" setting that we can use instead of a "magic" theme name. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2069>
This commit is contained in:

committed by
Marge Bot

parent
ed7fe756ef
commit
f67418c682
@ -156,7 +156,7 @@ function start() {
|
||||
sessionMode = new SessionMode.SessionMode();
|
||||
sessionMode.connect('updated', _sessionUpdated);
|
||||
|
||||
St.Settings.get().connect('notify::gtk-theme', _loadDefaultStylesheet);
|
||||
St.Settings.get().connect('notify::high-contrast', _loadDefaultStylesheet);
|
||||
|
||||
// Initialize ParentalControlsManager before the UI
|
||||
ParentalControlsManager.getDefault();
|
||||
@ -389,9 +389,8 @@ function _getDefaultStylesheet() {
|
||||
let stylesheet = null;
|
||||
let name = sessionMode.stylesheetName;
|
||||
|
||||
// Look for a high-contrast variant first when using GTK+'s HighContrast
|
||||
// theme
|
||||
if (St.Settings.get().gtk_theme == 'HighContrast')
|
||||
// Look for a high-contrast variant first
|
||||
if (St.Settings.get().high_contrast)
|
||||
stylesheet = _getStylesheet(name.replace('.css', '-high-contrast.css'));
|
||||
|
||||
if (stylesheet == null)
|
||||
|
Reference in New Issue
Block a user