[california/wip/732029-gtk-312: 3/4] Visual improvements to Quick Add dialog
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california/wip/732029-gtk-312: 3/4] Visual improvements to Quick Add dialog
- Date: Fri, 15 Aug 2014 20:27:38 +0000 (UTC)
commit 42da0cf06226d341a4699b9f350353a0dc4cd4b8
Author: Jim Nelson <jim yorba org>
Date: Fri Aug 15 13:23:56 2014 -0700
Visual improvements to Quick Add dialog
src/host/host-quick-create-event.vala | 11 +-
src/rc/quick-create-event.ui | 219 ++++++++++++++++++--------------
2 files changed, 129 insertions(+), 101 deletions(-)
---
diff --git a/src/host/host-quick-create-event.vala b/src/host/host-quick-create-event.vala
index 62834e2..7b35170 100644
--- a/src/host/host-quick-create-event.vala
+++ b/src/host/host-quick-create-event.vala
@@ -21,7 +21,7 @@ public class QuickCreateEvent : Gtk.Grid, Toolkit.Card {
public Gtk.Widget? initial_focus { get { return details_entry; } }
[GtkChild]
- private Gtk.Box when_box;
+ private Gtk.Label when_label;
[GtkChild]
private Gtk.Label when_text_label;
@@ -68,7 +68,8 @@ public class QuickCreateEvent : Gtk.Grid, Toolkit.Card {
// if initial date/times supplied, reveal to the user and change the example
string eg;
if (event != null && (event.date_span != null || event.exact_time_span != null)) {
- when_box.visible = true;
+ when_label.visible = when_text_label.visible = true;
+ when_label.no_show_all = when_text_label.no_show_all = false;
when_text_label.label = event.get_event_time_pretty_string(Calendar.Date.PrettyFlag.NONE,
Calendar.ExactTimeSpan.PrettyFlag.ALLOW_MULTILINE, Calendar.Timezone.local);
if (event.date_span != null)
@@ -76,11 +77,11 @@ public class QuickCreateEvent : Gtk.Grid, Toolkit.Card {
else
eg = _("Example: Dinner at Tadich Grill");
} else {
- when_box.visible = false;
- when_box.no_show_all = true;
+ when_label.visible = when_text_label.visible = false;
+ when_label.no_show_all = when_text_label.no_show_all = true;
eg = _("Example: Dinner at Tadich Grill 7:30pm tomorrow");
}
-
+
example_label.label = "<small><i>%s</i></small>".printf(eg);
// make first item active
diff --git a/src/rc/quick-create-event.ui b/src/rc/quick-create-event.ui
index 95d61ac..407fde4 100644
--- a/src/rc/quick-create-event.ui
+++ b/src/rc/quick-create-event.ui
@@ -6,15 +6,15 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">8</property>
+ <property name="column_spacing">8</property>
<child>
<object class="GtkLabel" id="title_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_bottom">8</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">_Quick add event</property>
+ <property name="label" translatable="yes">_Quick Add Event</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">details_entry</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -22,103 +22,39 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkButtonBox" id="buttonbox1">
+ <object class="GtkLabel" id="when_text_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="valign">end</property>
- <property name="margin_top">8</property>
- <property name="vexpand">True</property>
- <property name="spacing">8</property>
- <property name="homogeneous">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="help_button">
- <property name="label" translatable="yes">_Help</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_help_button_clicked" object="CaliforniaHostQuickCreateEvent"
swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- <property name="secondary">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="cancel_button">
- <property name="label" translatable="yes">C_ancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_cancel_button_clicked"
object="CaliforniaHostQuickCreateEvent" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="edit_button">
- <property name="label" translatable="yes">_Edit</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_edit_button_clicked" object="CaliforniaHostQuickCreateEvent"
swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="create_button">
- <property name="label" translatable="yes">_Create</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_create_button_clicked"
object="CaliforniaHostQuickCreateEvent" swapped="no"/>
- <style>
- <class name="suggested-action"/>
- </style>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label">(empty)</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <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="GtkComboBoxText" id="calendar_combo_box">
+ <object class="GtkLabel" id="when_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_top">8</property>
+ <property name="halign">end</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">When</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
@@ -128,7 +64,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
<child>
<object class="GtkEntry" id="details_entry">
<property name="visible">True</property>
@@ -163,6 +98,25 @@
</child>
</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="GtkLabel" id="what_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0.20000000298023224</property>
+ <property name="label" translatable="yes">What</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
@@ -170,32 +124,70 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="when_box">
+ <object class="GtkComboBoxText" id="calendar_combo_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</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="GtkLabel" id="calendar_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Calendar</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </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="GtkButtonBox" id="buttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">end</property>
+ <property name="margin_top">8</property>
+ <property name="vexpand">True</property>
<property name="spacing">8</property>
+ <property name="homogeneous">True</property>
+ <property name="layout_style">end</property>
<child>
- <object class="GtkLabel" id="when_label">
+ <object class="GtkButton" id="help_button">
+ <property name="label" translatable="yes">_Help</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">When</property>
- <style>
- <class name="dim-label"/>
- </style>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_help_button_clicked" object="CaliforniaHostQuickCreateEvent"
swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
+ <property name="secondary">True</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="when_text_label">
+ <object class="GtkButton" id="cancel_button">
+ <property name="label" translatable="yes">C_ancel</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="xalign">0</property>
- <property name="label">(empty)</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_cancel_button_clicked"
object="CaliforniaHostQuickCreateEvent" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -203,11 +195,46 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="edit_button">
+ <property name="label" translatable="yes">_Edit</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_edit_button_clicked" object="CaliforniaHostQuickCreateEvent"
swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="create_button">
+ <property name="label" translatable="yes">_Create</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_create_button_clicked"
object="CaliforniaHostQuickCreateEvent" swapped="no"/>
+ <style>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]