[gparted] Change packing of pulsebar in statusbar (#7)



commit 6c47561bf6ee2a0cc6a89c02e4a78d7cb8f3319e
Author: Luca Bacci <luca bacci982 gmail com>
Date:   Tue Aug 28 12:17:01 2018 +0200

    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

 src/Win_GParted.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 52da1193..0d82cc82 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -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();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]