aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authormesonium <93607429+mesonium@users.noreply.github.com>2024-12-18 12:51:39 +0100
committerGitHub <noreply@github.com>2024-12-18 12:51:39 +0100
commiteb827175aec4601d2a0a3e3ad1798551fcab2fb3 (patch)
tree9bfa16d2aa8ccf89589df3c07e392dc6efb6dd13 /main
parent79f792e090330a05753f9edb27332a946eb0840d (diff)
downloaddino-eb827175aec4601d2a0a3e3ad1798551fcab2fb3.tar.gz
dino-eb827175aec4601d2a0a3e3ad1798551fcab2fb3.zip
fix: Apply CSS with toolkit and platform version checks (#1643)
Diffstat (limited to 'main')
-rw-r--r--main/src/ui/conversation_content_view/file_transmission_progress.vala6
1 files changed, 2 insertions, 4 deletions
diff --git a/main/src/ui/conversation_content_view/file_transmission_progress.vala b/main/src/ui/conversation_content_view/file_transmission_progress.vala
index bf3f377b..5285e0dd 100644
--- a/main/src/ui/conversation_content_view/file_transmission_progress.vala
+++ b/main/src/ui/conversation_content_view/file_transmission_progress.vala
@@ -81,16 +81,14 @@ namespace Dino.Ui {
private void update_progress() {
this.get_style_context().remove_provider(css_provider);
- css_provider = new CssProvider();
int64 progress_percent = transferred_size * 100 / file_size;
- css_provider.load_from_string(@"
+ css_provider = Util.force_css(this, @"
.circular-loading-indicator {
background-image: conic-gradient(@accent_color $(progress_percent)%, transparent $(progress_percent)%);
}
");
- this.get_style_context().add_provider(css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
next_update_time = get_monotonic_time() / 1000 + 500;
last_progress_percent = progress_percent;
}
@@ -117,4 +115,4 @@ namespace Dino.Ui {
}
}
}
-} \ No newline at end of file
+}