From eb827175aec4601d2a0a3e3ad1798551fcab2fb3 Mon Sep 17 00:00:00 2001 From: mesonium <93607429+mesonium@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:51:39 +0100 Subject: fix: Apply CSS with toolkit and platform version checks (#1643) --- .../ui/conversation_content_view/file_transmission_progress.vala | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'main/src/ui/conversation_content_view') 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 +} -- cgit v1.2.3-70-g09d2