From 558e86e72d41a22bf4ee262b4b1ab5ad6454f07f Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 3 Oct 2011 13:08:43 +0200 Subject: [PATCH] GUI fixes for Windows --- Build.PL | 1 + lib/Slic3r/GUI.pm | 8 ++++++-- lib/Slic3r/GUI/SkeinPanel.pm | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Build.PL b/Build.PL index 5733247fb..0ff81d092 100644 --- a/Build.PL +++ b/Build.PL @@ -12,6 +12,7 @@ my $build = Module::Build->new( 'Getopt::Long' => '0', 'Math::Clipper' => '1.01', 'Math::Geometry::Planar' => '0', + 'Math::Geometry::Planar::Offset' => '0', 'Moo' => '0', 'Time::HiRes' => '0', 'XXX' => '0', diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index aa3f4396a..f0333ff5c 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -25,10 +25,14 @@ sub OnInit { my $panel = Slic3r::GUI::SkeinPanel->new($frame); my $box = Wx::BoxSizer->new(wxVERTICAL); - $box->Add($panel, 0, wxALL, 20); + $box->Add($panel, 0); - $frame->SetSizerAndFit($box); + $box->SetSizeHints($frame); + $frame->SetSizer($box); $frame->Show; + $frame->Layout; + + return 1; } sub About { diff --git a/lib/Slic3r/GUI/SkeinPanel.pm b/lib/Slic3r/GUI/SkeinPanel.pm index ebb6f08d0..5792ad7d0 100644 --- a/lib/Slic3r/GUI/SkeinPanel.pm +++ b/lib/Slic3r/GUI/SkeinPanel.pm @@ -1,6 +1,7 @@ package Slic3r::GUI::SkeinPanel; use strict; use warnings; +use utf8; use File::Basename qw(basename); use Wx qw(:sizer :progressdialog wxOK wxICON_INFORMATION wxICON_ERROR wxID_OK wxFD_OPEN); @@ -210,12 +211,13 @@ sub new { my $sizer = Wx::BoxSizer->new(wxHORIZONTAL); foreach my $col (@cols) { my $vertical_sizer = Wx::BoxSizer->new(wxVERTICAL); - $vertical_sizer->Add($panels{$_}, 0, wxEXPAND | wxRIGHT, 10) for @$col; + $vertical_sizer->Add($panels{$_}, 0, wxEXPAND | wxALL, 10) for @$col; $sizer->Add($vertical_sizer); } $sizer->SetSizeHints($self); $self->SetSizer($sizer); + $self->Layout; return $self; }