[gnome-video-arcade] main: Update progressbar hack to use CSS properties.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-video-arcade] main: Update progressbar hack to use CSS properties.
- Date: Thu, 9 Nov 2017 17:30:33 +0000 (UTC)
commit 1c26ed997bdaef8a045a20286ccb0bfea3c87b3b
Author: Matthew Barnes <mbarnes fedoraproject org>
Date: Thu Nov 9 12:26:56 2017 -0500
main: Update progressbar hack to use CSS properties.
The style property I was overriding before got deprecated.
src/main.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 380a6b4..620f873 100644
--- a/src/main.c
+++ b/src/main.c
@@ -323,10 +323,15 @@ tweak_css (gpointer unused)
gtk_widget_get_allocation (GVA_WIDGET_MAIN_STATUSBAR, &allocation);
+ /* XXX Slim down the progress bar slightly. Should probably be
+ * based on CSS properties, but just eyeballing it for now. */
+ if (allocation.height > 4)
+ allocation.height -= 4;
+
css_data = g_strdup_printf (
- "GtkProgressBar { "
- "-GtkProgressBar-min-horizontal-bar-height: %u;"
- " }",
+ "progressbar.horizontal trough, "
+ "progressbar.horizontal progress "
+ "{ min-height: %upx; }",
allocation.height);
provider = gtk_css_provider_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]