From 9d6fcfdc850602b787277eee1f38156078ef5742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 16 Apr 2019 17:21:02 +0000 Subject: [PATCH] switch: Drop separate handling for US The switches no longer use ON/OFF or o/|, so just use the same class and artwork everywhere. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/496 --- data/gnome-shell-theme.gresource.xml | 2 -- data/theme/gnome-shell-sass/_common.scss | 9 ++------- data/theme/toggle-off-us.svg | 1 - data/theme/toggle-on-us.svg | 1 - js/ui/popupMenu.js | 6 ------ 5 files changed, 2 insertions(+), 17 deletions(-) delete mode 120000 data/theme/toggle-off-us.svg delete mode 120000 data/theme/toggle-on-us.svg diff --git a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml index b77825414..c05be6b42 100644 --- a/data/gnome-shell-theme.gresource.xml +++ b/data/gnome-shell-theme.gresource.xml @@ -21,10 +21,8 @@ noise-texture.png pad-osd.css process-working.svg - toggle-off-us.svg toggle-off-intl.svg toggle-off-hc.svg - toggle-on-us.svg toggle-on-intl.svg toggle-on-hc.svg diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss index 2d4800737..a6357baad 100644 --- a/data/theme/gnome-shell-sass/_common.scss +++ b/data/theme/gnome-shell-sass/_common.scss @@ -160,15 +160,10 @@ StScrollBar { width: 46px; height: 22px; background-size: contain; + background-image: url("resource:///org/gnome/shell/theme/toggle-off-intl.svg"); + &:checked { background-image: url("resource:///org/gnome/shell/theme/toggle-on-intl.svg"); } } - @each $v in us, intl { - .toggle-switch-#{$v} { - background-image: url("resource:///org/gnome/shell/theme/toggle-off-#{$v}.svg"); - &:checked { background-image: url("resource:///org/gnome/shell/theme/toggle-on-#{$v}.svg"); } - } - } - /* links */ .shell-link { color: $link_color; diff --git a/data/theme/toggle-off-us.svg b/data/theme/toggle-off-us.svg deleted file mode 120000 index ce8d08f1c..000000000 --- a/data/theme/toggle-off-us.svg +++ /dev/null @@ -1 +0,0 @@ -toggle-off-intl.svg \ No newline at end of file diff --git a/data/theme/toggle-on-us.svg b/data/theme/toggle-on-us.svg deleted file mode 120000 index 1e501b644..000000000 --- a/data/theme/toggle-on-us.svg +++ /dev/null @@ -1 +0,0 @@ -toggle-on-intl.svg \ No newline at end of file diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 283934c28..44818533a 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -277,12 +277,6 @@ var Switch = class { this.actor = new St.Bin({ style_class: 'toggle-switch', accessible_role: Atk.Role.CHECK_BOX, can_focus: true }); - // Translators: this MUST be either "toggle-switch-us" - // (for toggle switches containing the English words - // "ON" and "OFF") or "toggle-switch-intl" (for toggle - // switches containing "◯" and "|"). Other values will - // simply result in invisible toggle switches. - this.actor.add_style_class_name(_("toggle-switch-us")); this.setToggleState(state); }