diff --git a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml
index 8a4948e41..0ce8cca93 100644
--- a/data/gnome-shell-theme.gresource.xml
+++ b/data/gnome-shell-theme.gresource.xml
@@ -14,7 +14,8 @@
gnome-shell-high-contrast.css
gnome-shell-start.svg
pad-osd.css
- process-working.svg
+ process-working-light.svg
+ process-working-dark.svg
toggle-off.svg
toggle-off-hc.svg
toggle-off-light.svg
diff --git a/data/theme/process-working-dark.svg b/data/theme/process-working-dark.svg
new file mode 100644
index 000000000..6c7ad64a6
--- /dev/null
+++ b/data/theme/process-working-dark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/data/theme/process-working-light.svg b/data/theme/process-working-light.svg
new file mode 100644
index 000000000..903edde0f
--- /dev/null
+++ b/data/theme/process-working-light.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/data/theme/process-working.svg b/data/theme/process-working.svg
deleted file mode 100644
index 920a67d2d..000000000
--- a/data/theme/process-working.svg
+++ /dev/null
@@ -1,3084 +0,0 @@
-
-
-
-
diff --git a/js/ui/animation.js b/js/ui/animation.js
index 85b4d5d73..5ceba6910 100644
--- a/js/ui/animation.js
+++ b/js/ui/animation.js
@@ -138,8 +138,24 @@ class Spinner extends AnimatedIcon {
animate: false,
hideOnStop: false,
});
- let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
- super._init(file, size);
+ this._fileDark = Gio.File.new_for_uri(
+ 'resource:///org/gnome/shell/theme/process-working-dark.svg');
+ this._fileLight = Gio.File.new_for_uri(
+ 'resource:///org/gnome/shell/theme/process-working-light.svg');
+ super._init(this._fileDark, size);
+
+ this.connect('style-changed', () => {
+ const themeNode = this.get_theme_node();
+ const textColor = themeNode.get_foreground_color();
+ const [, luminance] = textColor.to_hls();
+ const file = luminance > 0.5
+ ? this._fileDark
+ : this._fileLight;
+ if (file !== this._file) {
+ this._file = file;
+ this._loadFile();
+ }
+ });
this.opacity = 0;
this._animate = params.animate;