Ensure SpinButtons have space to display 7 digits (#7)

In Gtk2 the up and down buttons in a SpinButton were smaller leaving
space for 7 digits before scrolling the entry.  In Gtk3 the up and down
buttons are much larger leaving only space for 4 digits.  This occurs in
the SpinButtons in the Dialog_Base_Partition class as displayed in the
New Partition, Paste and Resize/Move dialogs.

Set width-chars property of all Gtk::SpinButtons to ensure 7 digits can
be displayed before scrolling the entry.

Closes #7 - Port to Gtk3
This commit is contained in:
Luca Bacci 2019-01-22 14:27:38 +01:00 committed by Mike Fleetwood
parent 6aba93d8c0
commit d626a636d3
1 changed files with 3 additions and 0 deletions

View File

@ -58,6 +58,7 @@ Dialog_Base_Partition::Dialog_Base_Partition()
spinbutton_before .set_numeric( true );
spinbutton_before .set_increments( 1, 100 );
spinbutton_before.set_width_chars(7);
table_resize.attach( spinbutton_before, 1, 2, 0, 1, Gtk::FILL );
//add spinbutton_size
@ -65,6 +66,7 @@ Dialog_Base_Partition::Dialog_Base_Partition()
spinbutton_size .set_numeric( true );
spinbutton_size .set_increments( 1, 100 );
spinbutton_size.set_width_chars(7);
table_resize.attach( spinbutton_size, 1, 2, 1, 2, Gtk::FILL );
//add spinbutton_after
@ -72,6 +74,7 @@ Dialog_Base_Partition::Dialog_Base_Partition()
spinbutton_after .set_numeric( true );
spinbutton_after .set_increments( 1, 100 );
spinbutton_after.set_width_chars(7);
table_resize.attach( spinbutton_after, 1, 2, 2, 3, Gtk::FILL );
if ( ! fixed_start )