From 055ea852524225120503de3230e790bce7c5412a Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci <aar@cpan.org> Date: Tue, 1 May 2012 13:27:57 +0200 Subject: [PATCH] Some spacing between buttons --- lib/Slic3r/GUI/Dashboard.pm | 15 ++++++--------- lib/Slic3r/GUI/SkeinPanel.pm | 4 ++-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/Slic3r/GUI/Dashboard.pm b/lib/Slic3r/GUI/Dashboard.pm index 0ee8d4849..670d156e8 100644 --- a/lib/Slic3r/GUI/Dashboard.pm +++ b/lib/Slic3r/GUI/Dashboard.pm @@ -91,17 +91,14 @@ sub new { { my @col1 = qw(load remove reset arrange export_gcode export_stl); my @col2 = qw(increase decrease rotate45cw rotate45ccw rotate changescale split); - my $buttons = Wx::GridBagSizer->new(); - for (my $row = 0; $row < scalar(@col1); $row++) { - $buttons->Add($self->{"btn_$col1[$row]"}, Wx::GBPosition->new($row, 0), Wx::GBSpan->new(1, 1), wxEXPAND | wxALL); - } - - for (my $row = 0; $row < scalar(@col2); $row++) { - $buttons->Add($self->{"btn_$col2[$row]"}, Wx::GBPosition->new($row, 1), Wx::GBSpan->new(1, 1), wxEXPAND | wxALL); - } + my $buttons = Wx::GridBagSizer->new(10, 10); + $buttons->Add($self->{"btn_$col1[$_]"}, Wx::GBPosition->new($_, 0), Wx::GBSpan->new(1, 1), wxEXPAND | wxALL) + for 0..$#col1; + $buttons->Add($self->{"btn_$col2[$_]"}, Wx::GBPosition->new($_, 1), Wx::GBSpan->new(1, 1), wxEXPAND | wxALL) + for 0..$#col2; my $vertical_sizer = Wx::BoxSizer->new(wxVERTICAL); - $vertical_sizer->Add($self->{list}, 0, wxEXPAND | wxALL); + $vertical_sizer->Add($self->{list}, 0, wxEXPAND | wxALL, 10); $vertical_sizer->Add($buttons); my $sizer = Wx::BoxSizer->new(wxHORIZONTAL); diff --git a/lib/Slic3r/GUI/SkeinPanel.pm b/lib/Slic3r/GUI/SkeinPanel.pm index 6b4a6372e..8bc8c8173 100644 --- a/lib/Slic3r/GUI/SkeinPanel.pm +++ b/lib/Slic3r/GUI/SkeinPanel.pm @@ -130,11 +130,11 @@ sub new { EVT_BUTTON($self, $slice_button, sub { $self->do_slice }); my $save_button = Wx::Button->new($self, -1, "Save config..."); - $buttons_sizer->Add($save_button, 0); + $buttons_sizer->Add($save_button, 0, wxRIGHT, 5); EVT_BUTTON($self, $save_button, sub { $self->save_config }); my $load_button = Wx::Button->new($self, -1, "Load config..."); - $buttons_sizer->Add($load_button, 0); + $buttons_sizer->Add($load_button, 0, wxRIGHT, 5); EVT_BUTTON($self, $load_button, sub { $self->load_config }); my $text = Wx::StaticText->new($self, -1, "Remember to check for updates at http://slic3r.org/\nVersion: $Slic3r::VERSION", Wx::wxDefaultPosition, Wx::wxDefaultSize, wxALIGN_RIGHT);