Commit 0b38779e authored by Robert Ancell's avatar Robert Ancell

region: Change format chooser dialog to match design

Adjust spacing and move the search field to the top as per:
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage
parent fb45df29
Pipeline #40407 passed with stages
in 3 minutes and 12 seconds
......@@ -48,6 +48,7 @@ struct _CcFormatChooser {
GtkWidget *number_format_label;
GtkWidget *measurement_format_label;
GtkWidget *paper_format_label;
GtkSearchBar *search_bar;
gboolean adding;
gboolean showing_extra;
gchar *region;
......@@ -408,7 +409,7 @@ show_more (CcFormatChooser *chooser)
gtk_widget_set_size_request (GTK_WIDGET (chooser), width, height);
gtk_window_set_resizable (GTK_WINDOW (chooser), TRUE);
gtk_widget_show (chooser->region_filter_entry);
gtk_search_bar_set_search_mode (chooser->search_bar, TRUE);
gtk_widget_grab_focus (chooser->region_filter_entry);
chooser->showing_extra = TRUE;
......@@ -491,6 +492,7 @@ cc_format_chooser_class_init (CcFormatChooserClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcFormatChooser, number_format_label);
gtk_widget_class_bind_template_child (widget_class, CcFormatChooser, measurement_format_label);
gtk_widget_class_bind_template_child (widget_class, CcFormatChooser, paper_format_label);
gtk_widget_class_bind_template_child (widget_class, CcFormatChooser, search_bar);
}
void
......
......@@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 3.0 -->
<template class="CcFormatChooser" parent="GtkDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Formats</property>
<property name="type_hint">dialog</property>
<property name="resizable">False</property>
......@@ -29,28 +28,37 @@
</object>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<object class="GtkBox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<property name="spacing">0</property>
<property name="border_width">0</property>
<child>
<object class="GtkBox" id="box1">
<object class="GtkBox">
<property name="visible">True</property>
<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="hexpand">True</property>
<property name="vexpand">True</property>
<property name="spacing">20</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkSearchBar" id="search_bar">
<property name="visible">True</property>
<property name="hexpand">True</property>
<child>
<object class="GtkSearchEntry" id="region_filter_entry">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="can_focus">True</property>
<property name="width_chars">30</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
......@@ -77,13 +85,6 @@
</child>
</object>
</child>
<child>
<object class="GtkSearchEntry" id="region_filter_entry">
<property name="visible">False</property>
<property name="hexpand">True</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
</child>
<child>
......@@ -92,15 +93,15 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="margin_end">20</property>
<property name="hexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<property name="border_width">24</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_bottom">6</property>
<property name="margin_bottom">12</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Preview</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment