Skip to content

Commit

Permalink
On Windows, load the icon either from the exe, or fron the ico file.
Browse files Browse the repository at this point in the history
  • Loading branch information
bubnikv committed Nov 20, 2016
1 parent 39679f9 commit a069c41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Slic3r/GUI/MainFrame.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ sub new {

my $self = $class->SUPER::new(undef, -1, $Slic3r::FORK_NAME . ' - ' . $Slic3r::VERSION, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE);
if ($^O eq 'MSWin32') {
$self->SetIcon(Wx::Icon->new($Slic3r::var->("Slic3r.ico"), wxBITMAP_TYPE_ICO));
# Load the icon either from the exe, or fron the ico file.
my $iconfile = $Slic3r::var->('..\slic3r.exe');
$iconfile = $Slic3r::var->("Slic3r.ico") unless -f $iconfile;
$self->SetIcon(Wx::Icon->new($iconfile, wxBITMAP_TYPE_ICO));
} else {
$self->SetIcon(Wx::Icon->new($Slic3r::var->("Slic3r_128px.png"), wxBITMAP_TYPE_PNG));
}
Expand Down

0 comments on commit a069c41

Please sign in to comment.