[gnome-software/wip/mcrha/review-histogram-ui-change] gs-review-histogram: Adapt to the new design
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/mcrha/review-histogram-ui-change] gs-review-histogram: Adapt to the new design
- Date: Mon, 28 Jun 2021 16:20:32 +0000 (UTC)
commit 7c4c510a4297f3a784b276fc34de8bcef44c4f27
Author: Milan Crha <mcrha redhat com>
Date: Thu Jun 24 11:06:03 2021 +0200
gs-review-histogram: Adapt to the new design
This changes the view of the GsReviewHistogram to follow the new
design.
Helps https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1111
src/gs-review-bar.c | 2 +
src/gs-review-histogram.c | 59 +++---
src/gs-review-histogram.ui | 519 ++++++++++++++++++++++++++-------------------
src/gtk-style.css | 6 +-
4 files changed, 339 insertions(+), 247 deletions(-)
---
diff --git a/src/gs-review-bar.c b/src/gs-review-bar.c
index 4f58c83f7..8bff73dc0 100644
--- a/src/gs-review-bar.c
+++ b/src/gs-review-bar.c
@@ -66,6 +66,8 @@ gs_review_bar_class_init (GsReviewBarClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
widget_class->draw = gs_review_bar_draw;
+
+ gtk_widget_class_set_css_name (widget_class, "review-bar");
}
GtkWidget *
diff --git a/src/gs-review-histogram.c b/src/gs-review-histogram.c
index 5137f632b..ed9ac04f5 100644
--- a/src/gs-review-histogram.c
+++ b/src/gs-review-histogram.c
@@ -8,8 +8,11 @@
#include "config.h"
+#include <math.h>
+
#include "gs-review-histogram.h"
#include "gs-review-bar.h"
+#include "gs-star-image.h"
typedef struct
{
@@ -18,32 +21,27 @@ typedef struct
GtkWidget *bar3;
GtkWidget *bar4;
GtkWidget *bar5;
- GtkWidget *label_count1;
- GtkWidget *label_count2;
- GtkWidget *label_count3;
- GtkWidget *label_count4;
- GtkWidget *label_count5;
+ GtkWidget *label_value;
GtkWidget *label_total;
+ GtkWidget *star_value_1;
+ GtkWidget *star_value_2;
+ GtkWidget *star_value_3;
+ GtkWidget *star_value_4;
+ GtkWidget *star_value_5;
} GsReviewHistogramPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (GsReviewHistogram, gs_review_histogram, GTK_TYPE_BIN)
-static void
-set_label (GtkWidget *label, gint value)
-{
- g_autofree gchar *text = NULL;
- text = g_strdup_printf ("%i", value);
- gtk_label_set_text (GTK_LABEL (label), text);
-}
-
void
gs_review_histogram_set_ratings (GsReviewHistogram *histogram,
GArray *review_ratings)
{
GsReviewHistogramPrivate *priv = gs_review_histogram_get_instance_private (histogram);
+ g_autofree gchar *text = NULL;
gdouble fraction[6] = { 0.0f };
guint32 max = 0;
guint32 total = 0;
+ guint32 star_count = 0;
g_return_if_fail (GS_IS_REVIEW_HISTOGRAM (histogram));
@@ -57,6 +55,7 @@ gs_review_histogram_set_ratings (GsReviewHistogram *histogram,
for (guint i = 1; i < review_ratings->len; i++) {
guint32 c = g_array_index (review_ratings, guint32, i);
max = MAX (c, max);
+ star_count += i * c;
}
for (guint i = 1; i < review_ratings->len; i++) {
guint32 c = g_array_index (review_ratings, guint32, i);
@@ -65,16 +64,27 @@ gs_review_histogram_set_ratings (GsReviewHistogram *histogram,
}
gs_review_bar_set_fraction (GS_REVIEW_BAR (priv->bar5), fraction[5]);
- set_label (priv->label_count5, g_array_index (review_ratings, guint, 5));
gs_review_bar_set_fraction (GS_REVIEW_BAR (priv->bar4), fraction[4]);
- set_label (priv->label_count4, g_array_index (review_ratings, guint, 4));
gs_review_bar_set_fraction (GS_REVIEW_BAR (priv->bar3), fraction[3]);
- set_label (priv->label_count3, g_array_index (review_ratings, guint, 3));
gs_review_bar_set_fraction (GS_REVIEW_BAR (priv->bar2), fraction[2]);
- set_label (priv->label_count2, g_array_index (review_ratings, guint, 2));
gs_review_bar_set_fraction (GS_REVIEW_BAR (priv->bar1), fraction[1]);
- set_label (priv->label_count1, g_array_index (review_ratings, guint, 1));
- set_label (priv->label_total, total);
+
+ text = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE, "%u reviews total", "%u reviews total", total),
total);
+ gtk_label_set_text (GTK_LABEL (priv->label_total), text);
+
+ g_clear_pointer (&text, g_free);
+
+ /* Round explicitly, to avoid rounding inside the printf() call and to use
+ the same value also for the stars fraction. */
+ fraction[0] = total > 0 ? round (((gdouble) star_count / (gdouble) total) * 10.0) / 10.0 : 0.0;
+ text = g_strdup_printf ("%.01f", fraction[0]);
+ gtk_label_set_text (GTK_LABEL (priv->label_value), text);
+
+ gs_star_image_set_fraction (GS_STAR_IMAGE (priv->star_value_1), CLAMP (fraction[0], 0.0, 1.0));
+ gs_star_image_set_fraction (GS_STAR_IMAGE (priv->star_value_2), CLAMP (fraction[0], 1.0, 2.0) - 1.0);
+ gs_star_image_set_fraction (GS_STAR_IMAGE (priv->star_value_3), CLAMP (fraction[0], 2.0, 3.0) - 2.0);
+ gs_star_image_set_fraction (GS_STAR_IMAGE (priv->star_value_4), CLAMP (fraction[0], 3.0, 4.0) - 3.0);
+ gs_star_image_set_fraction (GS_STAR_IMAGE (priv->star_value_5), CLAMP (fraction[0], 4.0, 5.0) - 4.0);
}
static void
@@ -95,12 +105,13 @@ gs_review_histogram_class_init (GsReviewHistogramClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, bar3);
gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, bar2);
gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, bar1);
- gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, label_count5);
- gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, label_count4);
- gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, label_count3);
- gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, label_count2);
- gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, label_count1);
+ gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, label_value);
gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, label_total);
+ gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, star_value_1);
+ gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, star_value_2);
+ gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, star_value_3);
+ gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, star_value_4);
+ gtk_widget_class_bind_template_child_private (widget_class, GsReviewHistogram, star_value_5);
}
GtkWidget *
diff --git a/src/gs-review-histogram.ui b/src/gs-review-histogram.ui
index 8c52a018c..75928e698 100644
--- a/src/gs-review-histogram.ui
+++ b/src/gs-review-histogram.ui
@@ -8,12 +8,17 @@
<property name="visible">True</property>
<property name="row-spacing">6</property>
<property name="column-spacing">6</property>
+ <property name="margin">6</property>
<child>
- <object class="GtkLabel" id="label_count5">
- <property name="halign">end</property>
+ <object class="GtkLabel" id="label_value">
+ <property name="halign">start</property>
+ <property name="valign">center</property>
<property name="visible">True</property>
<property name="label">0</property>
- <property name="margin-left">5</property>
+ <attributes>
+ <attribute name="scale" value="5.0"/>
+ <attribute name="weight" value="light"/>
+ </attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -22,14 +27,82 @@
<property name="height">1</property>
</packing>
</child>
- <child>
- <object class="GsReviewBar" id="bar5">
+ <child>
+ <object class="GtkBox" id="value_vbox">
<property name="visible">True</property>
- <property name="margin-left">5</property>
- <property name="width-request">120</property>
- <style>
- <class name="reviewbar"/>
- </style>
+ <property name="orientation">vertical</property>
+ <property name="spacing">8</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="margin-start">6</property>
+ <property name="margin-top">8</property>
+ <child>
+ <object class="GtkBox" id="star_value_box">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="spacing">6</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <style>
+ <class name="reviewstarvalue"/>
+ </style>
+ <child>
+ <object class="GsStarImage" id="star_value_1">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="height-request">24</property>
+ <property name="width-request">24</property>
+ </object>
+ </child>
+ <child>
+ <object class="GsStarImage" id="star_value_2">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="height-request">24</property>
+ <property name="width-request">24</property>
+ </object>
+ </child>
+ <child>
+ <object class="GsStarImage" id="star_value_3">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="height-request">24</property>
+ <property name="width-request">24</property>
+ </object>
+ </child>
+ <child>
+ <object class="GsStarImage" id="star_value_4">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="height-request">24</property>
+ <property name="width-request">24</property>
+ </object>
+ </child>
+ <child>
+ <object class="GsStarImage" id="star_value_5">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="height-request">24</property>
+ <property name="width-request">24</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_n_stars">
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">out of 5 stars</property>
+ <attributes>
+ <attribute name="scale" value="0.8"/>
+ </attributes>
+ </object>
+ </child>
</object>
<packing>
<property name="left-attach">1</property>
@@ -39,321 +112,323 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="histogram_star5_box">
+ <object class="GtkGrid" id="grid2">
<property name="visible">True</property>
- <property name="orientation">horizontal</property>
- <property name="spacing">6</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="row-spacing">2</property>
+ <property name="column-spacing">2</property>
+ <style>
+ <class name="review-histogram"/>
+ </style>
+ <child>
+ <object class="GsReviewBar" id="bar5">
+ <property name="visible">True</property>
+ <property name="margin-end">5</property>
+ <property name="halign">fill</property>
+ <property name="hexpand">true</property>
+ <property name="valign">center</property>
+ <property name="height-request">8</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
<child>
<object class="GsStarImage" id="star5_1">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
<object class="GsStarImage" id="star5_2">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">2</property>
+ <property name="top-attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
<object class="GsStarImage" id="star5_3">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">3</property>
+ <property name="top-attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
<object class="GsStarImage" id="star5_4">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">4</property>
+ <property name="top-attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
<object class="GsStarImage" id="star5_5">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">5</property>
+ <property name="top-attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GsReviewBar" id="bar4">
+ <property name="visible">True</property>
+ <property name="margin-end">5</property>
+ <property name="halign">fill</property>
+ <property name="hexpand">true</property>
+ <property name="valign">center</property>
+ <property name="height-request">8</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
- </object>
- <packing>
- <property name="left-attach">2</property>
- <property name="top-attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_count4">
- <property name="halign">end</property>
- <property name="visible">True</property>
- <property name="label">0</property>
- <property name="margin-left">5</property>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GsReviewBar" id="bar4">
- <property name="visible">True</property>
- <property name="margin-left">5</property>
- <style>
- <class name="reviewbar"/>
- </style>
- </object>
- <packing>
- <property name="left-attach">1</property>
- <property name="top-attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="histogram_star4_box">
- <property name="visible">True</property>
- <property name="orientation">horizontal</property>
- <property name="spacing">6</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
<child>
<object class="GsStarImage" id="star4_1">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
<object class="GsStarImage" id="star4_2">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">2</property>
+ <property name="top-attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
<object class="GsStarImage" id="star4_3">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">3</property>
+ <property name="top-attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
<object class="GsStarImage" id="star4_4">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">4</property>
+ <property name="top-attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GsReviewBar" id="bar3">
+ <property name="visible">True</property>
+ <property name="margin-end">5</property>
+ <property name="halign">fill</property>
+ <property name="hexpand">true</property>
+ <property name="valign">center</property>
+ <property name="height-request">8</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
- </object>
- <packing>
- <property name="left-attach">2</property>
- <property name="top-attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_count3">
- <property name="halign">end</property>
- <property name="visible">True</property>
- <property name="label">0</property>
- <property name="margin-left">5</property>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GsReviewBar" id="bar3">
- <property name="visible">True</property>
- <property name="margin-left">5</property>
- <style>
- <class name="reviewbar"/>
- </style>
- </object>
- <packing>
- <property name="left-attach">1</property>
- <property name="top-attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="histogram_star3_box">
- <property name="visible">True</property>
- <property name="orientation">horizontal</property>
- <property name="spacing">6</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
<child>
<object class="GsStarImage" id="star3_1">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
<object class="GsStarImage" id="star3_2">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">2</property>
+ <property name="top-attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
<object class="GsStarImage" id="star3_3">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">3</property>
+ <property name="top-attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GsReviewBar" id="bar2">
+ <property name="visible">True</property>
+ <property name="margin-end">5</property>
+ <property name="halign">fill</property>
+ <property name="hexpand">true</property>
+ <property name="valign">center</property>
+ <property name="height-request">8</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
- </object>
- <packing>
- <property name="left-attach">2</property>
- <property name="top-attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_count2">
- <property name="halign">end</property>
- <property name="visible">True</property>
- <property name="label">0</property>
- <property name="margin-left">5</property>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GsReviewBar" id="bar2">
- <property name="visible">True</property>
- <property name="margin-left">5</property>
- <style>
- <class name="reviewbar"/>
- </style>
- </object>
- <packing>
- <property name="left-attach">1</property>
- <property name="top-attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="histogram_star2_box">
- <property name="visible">True</property>
- <property name="orientation">horizontal</property>
- <property name="spacing">6</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
<child>
<object class="GsStarImage" id="star2_1">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
<object class="GsStarImage" id="star2_2">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">2</property>
+ <property name="top-attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GsReviewBar" id="bar1">
+ <property name="visible">True</property>
+ <property name="margin-end">5</property>
+ <property name="halign">fill</property>
+ <property name="hexpand">true</property>
+ <property name="valign">center</property>
+ <property name="height-request">8</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
- </object>
- <packing>
- <property name="left-attach">2</property>
- <property name="top-attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_count1">
- <property name="halign">end</property>
- <property name="visible">True</property>
- <property name="label">0</property>
- <property name="margin-left">5</property>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GsReviewBar" id="bar1">
- <property name="visible">True</property>
- <property name="margin-left">5</property>
- <style>
- <class name="reviewbar"/>
- </style>
- </object>
- <packing>
- <property name="left-attach">1</property>
- <property name="top-attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="histogram_star1_box">
- <property name="visible">True</property>
- <property name="orientation">horizontal</property>
- <property name="spacing">6</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
<child>
<object class="GsStarImage" id="star1_1">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="height-request">10</property>
+ <property name="width-request">10</property>
</object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="left-attach">2</property>
- <property name="top-attach">4</property>
- <property name="width">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_total">
<property name="visible">True</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
<property name="label">0</property>
- <property name="margin-left">5</property>
- <property name="margin-top">5</property>
+ <property name="margin-top">10</property>
</object>
<packing>
<property name="left-attach">0</property>
- <property name="top-attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_1">
- <property name="visible">True</property>
- <property name="margin-left">5</property>
- <property name="halign">start</property>
- <property name="margin-top">5</property>
- <property name="label" translatable="yes" comments="Translators: A label for the total number of
reviews.">ratings in total</property>
- </object>
- <packing>
- <property name="left-attach">1</property>
- <property name="top-attach">5</property>
+ <property name="top-attach">2</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
diff --git a/src/gtk-style.css b/src/gtk-style.css
index 641bac64b..d1b3031ad 100644
--- a/src/gtk-style.css
+++ b/src/gtk-style.css
@@ -410,12 +410,16 @@ summary-tile {
border-image: linear-gradient(to top, @unfocused_borders, @unfocused_borders) 0 0 0 1 / 5px 0 5px 1px;
}
-.reviewbar {
+review-bar {
background-image: none;
background-color: @unfocused_insensitive_color;
color: @insensitive_fg_color;
}
+.review-histogram star-image {
+ color: @insensitive_fg_color;
+}
+
.error-label {
text-shadow: none;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]