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
This commit is contained in:
Florian Müllner 2019-04-16 17:21:02 +00:00
parent 5f5a3b78a5
commit 9d6fcfdc85
5 changed files with 2 additions and 17 deletions

View File

@ -21,10 +21,8 @@
<file>noise-texture.png</file> <file>noise-texture.png</file>
<file>pad-osd.css</file> <file>pad-osd.css</file>
<file>process-working.svg</file> <file>process-working.svg</file>
<file>toggle-off-us.svg</file>
<file>toggle-off-intl.svg</file> <file>toggle-off-intl.svg</file>
<file>toggle-off-hc.svg</file> <file>toggle-off-hc.svg</file>
<file>toggle-on-us.svg</file>
<file>toggle-on-intl.svg</file> <file>toggle-on-intl.svg</file>
<file>toggle-on-hc.svg</file> <file>toggle-on-hc.svg</file>
</gresource> </gresource>

View File

@ -160,15 +160,10 @@ StScrollBar {
width: 46px; width: 46px;
height: 22px; height: 22px;
background-size: contain; 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 */ /* links */
.shell-link { .shell-link {
color: $link_color; color: $link_color;

View File

@ -1 +0,0 @@
toggle-off-intl.svg

View File

@ -1 +0,0 @@
toggle-on-intl.svg

View File

@ -277,12 +277,6 @@ var Switch = class {
this.actor = new St.Bin({ style_class: 'toggle-switch', this.actor = new St.Bin({ style_class: 'toggle-switch',
accessible_role: Atk.Role.CHECK_BOX, accessible_role: Atk.Role.CHECK_BOX,
can_focus: true }); 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); this.setToggleState(state);
} }