diff --git a/include/Dialog_Partition_Info.h b/include/Dialog_Partition_Info.h index 7be93e2a..eabc6a63 100644 --- a/include/Dialog_Partition_Info.h +++ b/include/Dialog_Partition_Info.h @@ -50,10 +50,10 @@ private: const Partition & partition; // (Alias to element in Win_GParted::display_partitions[] vector). - Gtk::HBox *hbox ; + Gtk::Box *hbox; Gtk::DrawingArea drawingarea ; Gtk::Frame *frame ; - Gtk::VBox info_msg_vbox ; + Gtk::Box info_msg_vbox; Gtk::ScrolledWindow info_scrolled ; Glib::RefPtr pango_layout; diff --git a/src/Dialog_Partition_Info.cc b/src/Dialog_Partition_Info.cc index 80cc7255..21c494f7 100644 --- a/src/Dialog_Partition_Info.cc +++ b/src/Dialog_Partition_Info.cc @@ -47,11 +47,12 @@ Dialog_Partition_Info::Dialog_Partition_Info( const Partition & partition ) : pa init_drawingarea() ; - //place info and optional messages in scrollable window + // Place info and optional messages in scrollable window + info_msg_vbox.set_orientation(Gtk::ORIENTATION_VERTICAL); info_msg_vbox .set_border_width( 6 ) ; info_scrolled .set_policy( Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC ) ; info_scrolled .add( info_msg_vbox ) ; - //As Gtk::VBox widget info_msg_vbox doesn't have a native scrolling capability a + // As Gtk::Box widget info_msg_vbox doesn't have a native scrolling capability a // Gtk::Viewport is automatically created to contain it when it is added to the // Gtk::ScrolledWindow widget info_scrolled. The Viewport widget is created with // shadow type GTK_SHADOW_IN by default. Change to GTK_SHADOW_NONE. @@ -74,7 +75,7 @@ Dialog_Partition_Info::Dialog_Partition_Info( const Partition & partition ) : pa { Gtk::Image* image = Utils::mk_image(Gtk::Stock::DIALOG_WARNING, Gtk::ICON_SIZE_BUTTON); - hbox = manage(new Gtk::HBox()); + hbox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL)); hbox->pack_start(*image, Gtk::PACK_SHRINK); } @@ -105,7 +106,7 @@ Dialog_Partition_Info::Dialog_Partition_Info( const Partition & partition ) : pa concatenated_messages += "" + messages[i].substr( 0, take ) + ""; } } - Gtk::VBox *vbox( manage( new Gtk::VBox() ) ) ; + Gtk::Box *vbox = manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); vbox ->set_border_width( 5 ) ; vbox->pack_start( *Utils::mk_label( concatenated_messages, true, true, true ), Gtk::PACK_SHRINK ); frame ->add( *vbox ) ; @@ -169,7 +170,7 @@ void Dialog_Partition_Info::init_drawingarea() frame ->set_shadow_type( Gtk::SHADOW_ETCHED_OUT ) ; frame ->set_border_width( 10 ) ; - hbox = manage( new Gtk::HBox() ) ; + hbox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL)); hbox ->pack_start( *frame, Gtk::PACK_EXPAND_PADDING ) ; this ->get_vbox() ->pack_start( *hbox, Gtk::PACK_SHRINK ) ;