[gnome-software] review row: Add an additional box to make styling easier
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] review row: Add an additional box to make styling easier
- Date: Thu, 30 Jun 2016 14:15:02 +0000 (UTC)
commit 8a0cad164e9ebaa2db16c41df0049a2517a0a12c
Author: Kalev Lember <klember redhat com>
Date: Thu Jun 30 16:08:57 2016 +0200
review row: Add an additional box to make styling easier
As requested by Lapo.
src/gs-review-row.c | 8 ++--
src/gs-review-row.ui | 81 +++++++++++++++++++++++++++++---------------------
2 files changed, 51 insertions(+), 38 deletions(-)
---
diff --git a/src/gs-review-row.c b/src/gs-review-row.c
index f6913f7..c8b07b1 100644
--- a/src/gs-review-row.c
+++ b/src/gs-review-row.c
@@ -43,7 +43,7 @@ typedef struct
GtkWidget *button_dismiss;
GtkWidget *button_report;
GtkWidget *button_remove;
- GtkWidget *box_vote_buttons;
+ GtkWidget *box_voting;
} GsReviewRowPrivate;
enum {
@@ -86,9 +86,9 @@ gs_review_row_refresh (GsReviewRow *row)
if ((priv->actions & (1 << GS_REVIEW_ACTION_UPVOTE |
1 << GS_REVIEW_ACTION_DOWNVOTE |
1 << GS_REVIEW_ACTION_DISMISS)) == 0) {
- gtk_widget_set_visible (priv->box_vote_buttons, FALSE);
+ gtk_widget_set_visible (priv->box_voting, FALSE);
} else {
- gtk_widget_set_visible (priv->box_vote_buttons, TRUE);
+ gtk_widget_set_visible (priv->box_voting, TRUE);
gtk_widget_set_visible (priv->button_yes,
priv->actions & 1 << GS_REVIEW_ACTION_UPVOTE);
gtk_widget_set_visible (priv->button_no,
@@ -166,7 +166,7 @@ gs_review_row_class_init (GsReviewRowClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GsReviewRow, button_dismiss);
gtk_widget_class_bind_template_child_private (widget_class, GsReviewRow, button_report);
gtk_widget_class_bind_template_child_private (widget_class, GsReviewRow, button_remove);
- gtk_widget_class_bind_template_child_private (widget_class, GsReviewRow, box_vote_buttons);
+ gtk_widget_class_bind_template_child_private (widget_class, GsReviewRow, box_voting);
}
static void
diff --git a/src/gs-review-row.ui b/src/gs-review-row.ui
index 69869a8..79ce5df 100644
--- a/src/gs-review-row.ui
+++ b/src/gs-review-row.ui
@@ -99,7 +99,7 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="box_vote_buttons">
+ <object class="GtkBox" id="box_voting">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">9</property>
@@ -120,12 +120,53 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="button_yes">
- <property name="label" translatable="yes">Yes</property>
+ <object class="GtkBox" id="box_vote_buttons">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="relief">none</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">9</property>
+ <property name="halign">start</property>
+ <child>
+ <object class="GtkButton" id="button_yes">
+ <property name="label" translatable="yes">Yes</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button_no">
+ <property name="label" translatable="yes">No</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button_dismiss">
+ <property name="label" translatable="yes" comments="Translators: Button text for
indifference, only used when moderating">Meh</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -133,34 +174,6 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="button_no">
- <property name="label" translatable="yes">No</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="relief">none</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button_dismiss">
- <property name="label" translatable="yes" comments="Translators: Button text for
indifference, only used when moderating">Meh</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="relief">none</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
</object>
<packing>
<property name="left_attach">0</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]