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
This commit is contained in:
Cosimo Cecchi 2012-02-16 19:37:09 +01:00 committed by Bastien Nocera
parent 790bbbdeb3
commit 371fef61c0
2 changed files with 266 additions and 258 deletions

View file

@ -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;

View file

@ -64,257 +64,14 @@
<object class="GtkGrid" id="stylus-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row-homogeneous">True</property>
<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="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>
</packing>
</child>
<child>
<object class="GtkBox" id="eraser-box">
<property name="visible">True</property>
<property name="can_focus">False</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="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>
</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">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">
<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="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>
</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">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="width">1</property>
<property name="height">1</property>
</packing>
</child>
<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="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"/>
@ -323,7 +80,258 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">2</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">start</property>
<property name="pixbuf">wacom-stylus.svg</property>
</object>
<packing>
<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="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-feel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<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="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="GtkBox" id="eraser-box">
<property name="visible">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="label" translatable="yes">Top Button</property>
<property name="justify">right</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<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="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">1</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-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="label" translatable="yes">Lower Button</property>
<property name="justify">right</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>
<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">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-feel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<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="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">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>