[gnome-control-center] wacom: split the styli controls into a separate GtkGrid
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] wacom: split the styli controls into a separate GtkGrid
- Date: Mon, 20 Feb 2012 10:37:00 +0000 (UTC)
commit 371fef61c0c40edc9295612cc8a8ad5acd80ac6d
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Feb 16 19:37:09 2012 +0100
wacom: split the styli controls into a separate GtkGrid
Like we did for the tablet page.
https://bugzilla.gnome.org/show_bug.cgi?id=668881
panels/wacom/cc-wacom-stylus-page.c | 24 +-
panels/wacom/wacom-stylus-page.ui | 406 ++++++++++++++++++-----------------
2 files changed, 219 insertions(+), 211 deletions(-)
---
diff --git a/panels/wacom/cc-wacom-stylus-page.c b/panels/wacom/cc-wacom-stylus-page.c
index ff4da12..704d3bf 100644
--- a/panels/wacom/cc-wacom-stylus-page.c
+++ b/panels/wacom/cc-wacom-stylus-page.c
@@ -396,27 +396,27 @@ update_stylus_ui (CcWacomStylusPage *page,
case LAYOUT_INKING:
remove_buttons (page->priv);
remove_eraser (page->priv);
- gtk_container_child_set (CWID ("stylus-grid"),
+ gtk_container_child_set (CWID ("stylus-controls-grid"),
WID ("label-tip-feel"),
- "top_attach", 1, NULL);
- gtk_container_child_set (CWID ("stylus-grid"),
+ "top_attach", 0, NULL);
+ gtk_container_child_set (CWID ("stylus-controls-grid"),
WID ("box-tip-feel"),
- "top_attach", 1, NULL);
+ "top_attach", 0, NULL);
break;
case LAYOUT_AIRBRUSH:
remove_button (page->priv);
- gtk_container_child_set (CWID ("stylus-grid"),
+ gtk_container_child_set (CWID ("stylus-controls-grid"),
WID ("label-lower-button"),
- "top_attach", 2, NULL);
- gtk_container_child_set (CWID ("stylus-grid"),
+ "top_attach", 1, NULL);
+ gtk_container_child_set (CWID ("stylus-controls-grid"),
WID ("combo-bottombutton"),
- "top_attach", 2, NULL);
- gtk_container_child_set (CWID ("stylus-grid"),
+ "top_attach", 1, NULL);
+ gtk_container_child_set (CWID ("stylus-controls-grid"),
WID ("label-tip-feel"),
- "top_attach", 3, NULL);
- gtk_container_child_set (CWID ("stylus-grid"),
+ "top_attach", 2, NULL);
+ gtk_container_child_set (CWID ("stylus-controls-grid"),
WID ("box-tip-feel"),
- "top_attach", 3, NULL);
+ "top_attach", 2, NULL);
case LAYOUT_OTHER:
/* We already warn about it in cc_wacom_stylus_page_new () */
break;
diff --git a/panels/wacom/wacom-stylus-page.ui b/panels/wacom/wacom-stylus-page.ui
index 4be07f8..ae9821b 100644
--- a/panels/wacom/wacom-stylus-page.ui
+++ b/panels/wacom/wacom-stylus-page.ui
@@ -64,270 +64,278 @@
<object class="GtkGrid" id="stylus-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="row-homogeneous">True</property>
+ <property name="column_spacing">10</property>
+ <property name="row_spacing">10</property>
+ <child>
+ <object class="GtkLabel" id="label-stylus">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="label" translatable="yes">Stylus</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </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="GtkImage" id="image-stylus">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
- <property name="valign">center</property>
+ <property name="valign">start</property>
<property name="pixbuf">wacom-stylus.svg</property>
- <property name="margin-right">16</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
- <property name="height">4</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="eraser-box">
+ <object class="GtkGrid" id="stylus-controls-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="margin_left">16</property>
+ <property name="margin_top">6</property>
+ <property name="row_spacing">10</property>
+ <property name="column_spacing">10</property>
<child>
- <object class="GtkLabel" id="label-eraser-soft">
+ <object class="GtkLabel" id="label-eraser-feel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Soft</property>
- <attributes>
- <attribute name="scale" value="0.82999999999999996"/>
- </attributes>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="label" translatable="yes">Eraser Pressure Feel</property>
+ <property name="justify">right</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <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="GtkScale" id="scale-eraser-feel">
+ <object class="GtkBox" id="eraser-box">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <object class="GtkLabel" id="label-eraser-soft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Soft</property>
+ <attributes>
+ <attribute name="scale" value="0.82999999999999996"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScale" id="scale-eraser-feel">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="valign">center</property>
+ <property name="adjustment">adjustment-eraser-feel</property>
+ <property name="digits">0</property>
+ <property name="draw_value">False</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label-eraser-firm">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Firm</property>
+ <attributes>
+ <attribute name="scale" value="0.82999999999999996"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </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="GtkLabel" id="label-top-button">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
<property name="valign">center</property>
- <property name="margin_left">10</property>
- <property name="margin_right">10</property>
- <property name="adjustment">adjustment-eraser-feel</property>
- <property name="digits">0</property>
- <property name="draw_value">False</property>
+ <property name="label" translatable="yes">Top Button</property>
+ <property name="justify">right</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <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="GtkLabel" id="label-eraser-firm">
+ <object class="GtkComboBox" id="combo-topbutton">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Firm</property>
- <attributes>
- <attribute name="scale" value="0.82999999999999996"/>
- </attributes>
+ <property name="valign">center</property>
+ <property name="model">liststore-buttons</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</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>
- </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-eraser-feel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="margin_right">10</property>
- <property name="label" translatable="yes">Eraser Pressure Feel</property>
- <property name="justify">right</property>
- <style>
- <class name="dim-label"/>
- </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="GtkComboBox" id="combo-topbutton">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="valign">center</property>
- <property name="model">liststore-buttons</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="GtkComboBox" id="combo-bottombutton">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="valign">center</property>
- <property name="model">liststore-buttons</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="GtkBox" id="box-tip-feel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<child>
- <object class="GtkLabel" id="label-tip-soft">
+ <object class="GtkLabel" id="label-lower-button">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Soft</property>
- <attributes>
- <attribute name="scale" value="0.82999999999999996"/>
- </attributes>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="label" translatable="yes">Lower Button</property>
+ <property name="justify">right</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <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="GtkScale" id="scale-tip-feel">
+ <object class="GtkComboBox" id="combo-bottombutton">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="margin_left">10</property>
- <property name="margin_right">10</property>
- <property name="adjustment">adjustment-tip-feel</property>
- <property name="digits">0</property>
- <property name="draw_value">False</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <property name="model">liststore-buttons</property>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <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="label-tip-firm">
+ <object class="GtkLabel" id="label-tip-feel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Firm</property>
- <attributes>
- <attribute name="scale" value="0.82999999999999996"/>
- </attributes>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="label" translatable="yes">Tip Pressure Feel</property>
+ <property name="justify">right</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
+ <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="GtkBox" id="box-tip-feel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <object class="GtkLabel" id="label-tip-soft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Soft</property>
+ <attributes>
+ <attribute name="scale" value="0.82999999999999996"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScale" id="scale-tip-feel">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">adjustment-tip-feel</property>
+ <property name="digits">0</property>
+ <property name="draw_value">False</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label-tip-firm">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Firm</property>
+ <attributes>
+ <attribute name="scale" value="0.82999999999999996"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </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>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label-lower-button">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="margin_right">10</property>
- <property name="label" translatable="yes">Lower Button</property>
- <property name="justify">right</property>
- <style>
- <class name="dim-label"/>
- </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="GtkLabel" id="label-tip-feel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="margin_right">10</property>
- <property name="label" translatable="yes">Tip Pressure Feel</property>
- <property name="justify">right</property>
- <style>
- <class name="dim-label"/>
- </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="GtkLabel" id="label-top-button">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="margin_right">10</property>
- <property name="label" translatable="yes">Top Button</property>
- <property name="justify">right</property>
- <style>
- <class name="dim-label"/>
- </style>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_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-stylus">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="margin_left">10</property>
- <property name="margin_top">16</property>
- <property name="margin_bottom">16</property>
- <property name="label" translatable="yes">Stylus</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<placeholder/>
</child>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]