[gnome-software/wip/rancell/reviews] Update review dialog to match design
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/rancell/reviews] Update review dialog to match design
- Date: Mon, 8 Feb 2016 21:34:37 +0000 (UTC)
commit d7781507c7b10bbd839628239768904509c2e862
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Feb 9 10:20:41 2016 +1300
Update review dialog to match design
src/gs-review-dialog.c | 5 +--
src/gs-review-dialog.ui | 60 +++++++++++++++++++++-------------------------
2 files changed, 29 insertions(+), 36 deletions(-)
---
diff --git a/src/gs-review-dialog.c b/src/gs-review-dialog.c
index eb80826..a89dd1b 100644
--- a/src/gs-review-dialog.c
+++ b/src/gs-review-dialog.c
@@ -34,7 +34,6 @@ struct _GsReviewDialog
GtkWidget *star;
GtkWidget *summary_entry;
GtkWidget *text_view;
- GtkWidget *post_button;
};
G_DEFINE_TYPE (GsReviewDialog, gs_review_dialog, GTK_TYPE_DIALOG)
@@ -46,7 +45,7 @@ gs_review_dialog_get_rating (GsReviewDialog *dialog)
}
void
-gs_review_dialog_set_rating (GsReviewDialog *dialog, gint rating)
+gs_review_dialog_set_rating (GsReviewDialog *dialog, gint rating)
{
gs_star_widget_set_rating (GS_STAR_WIDGET (dialog->star), rating);
}
@@ -73,6 +72,7 @@ static void
gs_review_dialog_init (GsReviewDialog *dialog)
{
gtk_widget_init_template (GTK_WIDGET (dialog));
+ gs_star_widget_set_icon_size (GS_STAR_WIDGET (dialog->star), 32);
}
static void
@@ -85,7 +85,6 @@ gs_review_dialog_class_init (GsReviewDialogClass *klass)
gtk_widget_class_bind_template_child (widget_class, GsReviewDialog, star);
gtk_widget_class_bind_template_child (widget_class, GsReviewDialog, summary_entry);
gtk_widget_class_bind_template_child (widget_class, GsReviewDialog, text_view);
- gtk_widget_class_bind_template_child (widget_class, GsReviewDialog, post_button);
}
GtkWidget *
diff --git a/src/gs-review-dialog.ui b/src/gs-review-dialog.ui
index f14fbae..56ef2c3 100644
--- a/src/gs-review-dialog.ui
+++ b/src/gs-review-dialog.ui
@@ -4,10 +4,11 @@
<requires lib="gtk+" version="3.10"/>
<template class="GsReviewDialog" parent="GtkDialog">
<action-widgets>
+ <action-widget response="cancel">cancel_button</action-widget>
<action-widget response="ok">post_button</action-widget>
</action-widgets>
<property name="can_focus">False</property>
- <property name="title" translatable="yes">Review</property>
+ <property name="title" translatable="yes">Post Review</property>
<property name="modal">True</property>
<property name="default_width">600</property>
<property name="default_height">300</property>
@@ -16,9 +17,22 @@
<property name="use_header_bar">1</property>
<child internal-child="headerbar">
<object class="GtkHeaderBar">
+ <property name="show_close_button">False</property>
+ <child>
+ <object class="GtkButton" id="cancel_button">
+ <property name="label" translatable="yes">_Cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="pack-type">start</property>
+ </packing>
+ </child>
<child>
<object class="GtkButton" id="post_button">
- <property name="label" translatable="yes">_Post Review</property>
+ <property name="label" translatable="yes">_Post</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -33,10 +47,10 @@
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox">
<property name="can_focus">False</property>
- <property name="margin_start">6</property>
- <property name="margin_end">6</property>
- <property name="margin_top">6</property>
- <property name="margin_bottom">6</property>
+ <property name="margin_start">40</property>
+ <property name="margin_end">40</property>
+ <property name="margin_top">25</property>
+ <property name="margin_bottom">25</property>
<property name="orientation">vertical</property>
<property name="spacing">9</property>
<child internal-child="action_area">
@@ -54,7 +68,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
- <property name="spacing">12</property>
+ <property name="spacing">20</property>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
@@ -78,26 +92,9 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Rate between one star (bad) and five stars
(great)</property>
- <property name="wrap">True</property>
- <property name="xalign">0</property>
- <attributes>
- <attribute name="style" value="italic"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<object class="GsStarWidget" id="star">
<property name="visible">True</property>
- <property name="halign">start</property>
+ <property name="halign">center</property>
</object>
<packing>
<property name="expand">False</property>
@@ -138,12 +135,10 @@
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">A single line summarising your review, e.g.
"Useful tool"</property>
+ <property name="label" translatable="yes">Give a short summary of your review, for
example: “Great app, would recommendâ€.</property>
+ <property name="sensitive">False</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
- <attributes>
- <attribute name="style" value="italic"/>
- </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -195,12 +190,10 @@
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">A few sentences describing how you find this
application. e.g. "This application is great, it does does X very well. It would be improved if it could do
Y."</property>
+ <property name="label" translatable="yes">What do you think of the app? Try to give
reasons for your views.</property>
+ <property name="sensitive">False</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
- <attributes>
- <attribute name="style" value="italic"/>
- </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -212,6 +205,7 @@
<object class="GtkTextView" id="text_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="height-request">120</property>
</object>
<packing>
<property name="expand">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]