[dialog-customer|employee|vendor] combine GtkCheckButton with label

UX: increase the target area for click.

Also move GtkCheckButton to left-column and its dependent GtkWidget to
right-column.
This commit is contained in:
Christopher Lam 2023-02-19 13:35:48 +08:00
parent 016f82cf8b
commit f170d1d54c
3 changed files with 87 additions and 172 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.22"/>
<object class="GtkListStore" id="tax_included_store">
@ -153,6 +153,7 @@
</child>
<child>
<object class="GtkCheckButton" id="active_check">
<property name="label" translatable="yes">Active</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
@ -194,16 +195,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Active</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
<placeholder/>
</child>
</object>
</child>
@ -571,67 +563,6 @@
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label35">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Tax Table</property>
<property name="justify">right</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkBox" id="hbox7">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<child>
<object class="GtkCheckButton" id="taxtable_button">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="tooltip-text" translatable="yes">Override the global Tax Table?</property>
<property name="halign">start</property>
<property name="margin-end">6</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<signal name="toggled" handler="gnc_customer_taxtable_check_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="taxtable_menu">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="model">taxtable_store</property>
<signal name="changed" handler="gnc_customer_taxtable_changed_cb" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="taxtable_cell_renderer_text"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="tax_included_menu">
<property name="visible">True</property>
@ -712,6 +643,42 @@
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="taxtable_button">
<property name="label" translatable="yes">Tax Table</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="tooltip-text" translatable="yes">Override the global Tax Table?</property>
<property name="halign">start</property>
<property name="margin-end">6</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<signal name="toggled" handler="gnc_customer_taxtable_check_cb" swapped="no"/>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="taxtable_menu">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="model">taxtable_store</property>
<signal name="changed" handler="gnc_customer_taxtable_changed_cb" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="taxtable_cell_renderer_text"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
</object>
</child>
<child type="label">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.22"/>
<object class="GtkDialog" id="employee_dialog">
@ -129,6 +129,7 @@
</child>
<child>
<object class="GtkCheckButton" id="active_check">
<property name="label" translatable="yes">Active</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
@ -178,16 +179,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Active</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
<placeholder/>
</child>
</object>
</child>
@ -618,40 +610,13 @@
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label39">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Credit Account</property>
<property name="justify">right</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="ccard_acct_hbox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<child>
<object class="GtkCheckButton" id="ccard_check">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<signal name="toggled" handler="gnc_employee_ccard_acct_toggled_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
<placeholder/>
</child>
</object>
<packing>
@ -659,6 +624,22 @@
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="ccard_check">
<property name="label" translatable="yes">Credit Account</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<signal name="toggled" handler="gnc_employee_ccard_acct_toggled_cb" swapped="no"/>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
</object>
</child>
<child type="label">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.22"/>
<object class="GtkListStore" id="tax_included_store">
@ -182,6 +182,7 @@
</child>
<child>
<object class="GtkCheckButton" id="active_check">
<property name="label" translatable="yes">Active</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
@ -196,16 +197,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Active</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
<placeholder/>
</child>
</object>
</child>
@ -541,19 +533,6 @@
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label35">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Tax Table</property>
<property name="justify">right</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="terms_menu">
<property name="visible">True</property>
@ -607,46 +586,34 @@
</packing>
</child>
<child>
<object class="GtkBox" id="hbox7">
<object class="GtkCheckButton" id="taxtable_button">
<property name="label" translatable="yes">Tax Table</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="tooltip-text" translatable="yes">Override the global Tax Table?</property>
<property name="halign">start</property>
<property name="margin-end">6</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<signal name="toggled" handler="gnc_vendor_taxtable_check_cb" swapped="no"/>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="taxtable_menu">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="model">taxtable_store</property>
<signal name="changed" handler="gnc_vendor_taxtable_changed_cb" swapped="no"/>
<child>
<object class="GtkCheckButton" id="taxtable_button">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="tooltip-text" translatable="yes">Override the global Tax Table?</property>
<property name="halign">start</property>
<property name="margin-end">6</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<signal name="toggled" handler="gnc_vendor_taxtable_check_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="taxtable_menu">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="model">taxtable_store</property>
<signal name="changed" handler="gnc_vendor_taxtable_changed_cb" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="taxtable_cell_renderer_text"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
<object class="GtkCellRendererText" id="taxtable_cell_renderer_text"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>