Change packing of pulsebar in statusbar (#7)

The pulsebar looks very small and needs to be widened.  The pulsebar is
packed inside the statusbar so that it displays activity text on the
left side and the pulsebar on the right side.  Ideally we want the space
to be evenly divided for the textual messages and for the pulsebar
activity indicator.

For this we just have to set the 'homogeneous' property to TRUE for the
statusbar (note that GtkStatusBar inherits from GtkBox).

Also vertically align the pulsebar to the center of the statusbar.  This
is achieved setting the 'valign' property to Gtk::ALIGN_CENTER for the
pulsebar widget.

Closes #7 - Port to Gtk3
This commit is contained in:
Luca Bacci 2018-08-28 12:17:01 +02:00 committed by Mike Fleetwood
parent 892f5542a4
commit 6c47561bf6
1 changed files with 3 additions and 1 deletions

View File

@ -132,7 +132,9 @@ Win_GParted::Win_GParted( const std::vector<Glib::ustring> & user_devices )
//statusbar...
pulsebar .set_pulse_step( 0.01 );
statusbar .add( pulsebar );
pulsebar.set_valign(Gtk::ALIGN_CENTER);
statusbar.pack_end(pulsebar, true, true, 10);
statusbar.set_homogeneous();
vbox_main .pack_start( statusbar, Gtk::PACK_SHRINK );
this ->show_all_children();