Add margins to database window
This commit is contained in:
parent
fda181edea
commit
b8906467fc
@ -41,10 +41,7 @@ DatabaseWindow::DatabaseWindow( bool _linux,
|
||||
add( *box );
|
||||
|
||||
auto *scrolled_window = new Gtk::ScrolledWindow();
|
||||
|
||||
auto *pack1 = new Gtk::Box( Gtk::ORIENTATION_HORIZONTAL );
|
||||
auto *pack2 = new Gtk::Box( Gtk::ORIENTATION_HORIZONTAL );
|
||||
auto *pack3 = new Gtk::Box( Gtk::ORIENTATION_HORIZONTAL );
|
||||
auto *buttons = new Gtk::Box( Gtk::ORIENTATION_HORIZONTAL );
|
||||
|
||||
auto *button_save = new Gtk::Button();
|
||||
auto *button_remove = new Gtk::Button();
|
||||
@ -55,14 +52,21 @@ DatabaseWindow::DatabaseWindow( bool _linux,
|
||||
|
||||
// pack boxes
|
||||
box->pack_start( *scrolled_window, Gtk::PACK_EXPAND_WIDGET );
|
||||
box->pack_start( *pack1, Gtk::PACK_SHRINK );
|
||||
pack1->pack_start( *pack2, Gtk::PACK_EXPAND_WIDGET );
|
||||
pack1->pack_start( *pack3, Gtk::PACK_EXPAND_WIDGET );
|
||||
pack2->set_spacing( 10 );
|
||||
box->pack_start( *buttons, Gtk::PACK_SHRINK );
|
||||
// set margins
|
||||
scrolled_window->set_margin_left( 5 );
|
||||
scrolled_window->set_margin_right( 5 );
|
||||
scrolled_window->set_margin_top( 5 );
|
||||
buttons->set_margin_left( 5 );
|
||||
buttons->set_margin_right( 5 );
|
||||
buttons->set_margin_top( 5 );
|
||||
buttons->set_margin_bottom( 5 );
|
||||
|
||||
pack2->pack_start( *button_save, Gtk::PACK_SHRINK );
|
||||
pack2->pack_start( *button_remove, Gtk::PACK_SHRINK );
|
||||
pack3->pack_end( *button_quit, Gtk::PACK_SHRINK );
|
||||
buttons->pack_start( *button_save, Gtk::PACK_SHRINK );
|
||||
buttons->pack_start( *button_remove, Gtk::PACK_SHRINK );
|
||||
buttons->pack_end( *button_quit, Gtk::PACK_SHRINK );
|
||||
|
||||
button_save->set_margin_right(5);
|
||||
|
||||
// set button texts
|
||||
button_save->set_label( "Save" );
|
||||
|
Loading…
Reference in New Issue
Block a user