diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2012-06-18 00:54:08 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2012-06-18 00:54:08 +0400 |
commit | ce9fdbc0471de744c49c7d4b81a1b8255edbf512 (patch) | |
tree | 27756a443487651b4db6b70fa5930b37929dc269 | |
parent | 21ef09c228fa5f465264325b19e17ede61c6aacb (diff) |
Icons for settings
-rw-r--r-- | lib/Slic3r/GUI/Tab.pm | 46 | ||||
-rwxr-xr-x | var/arrow_up.png | bin | 0 -> 372 bytes | |||
-rwxr-xr-x | var/box.png | bin | 0 -> 555 bytes | |||
-rwxr-xr-x | var/building.png | bin | 0 -> 556 bytes | |||
-rwxr-xr-x | var/cog.png | bin | 0 -> 512 bytes | |||
-rwxr-xr-x | var/hourglass.png | bin | 0 -> 744 bytes | |||
-rwxr-xr-x | var/note.png | bin | 0 -> 500 bytes | |||
-rwxr-xr-x | var/page_white_go.png | bin | 0 -> 612 bytes | |||
-rwxr-xr-x | var/printer_empty.png | bin | 0 -> 350 bytes | |||
-rwxr-xr-x | var/shading.png | bin | 0 -> 225 bytes | |||
-rw-r--r-- | var/spool.png | bin | 0 -> 1304 bytes | |||
-rwxr-xr-x | var/time.png | bin | 0 -> 793 bytes | |||
-rwxr-xr-x | var/wrench.png | bin | 0 -> 610 bytes |
13 files changed, 28 insertions, 18 deletions
diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index 9f9e8bbc4..e121bf6ba 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -11,15 +11,28 @@ sub new { my $class = shift; my ($parent) = @_; my $self = $class->SUPER::new($parent, -1, [-1,-1], [-1,-1], &Wx::wxBK_LEFT); - + + $self->{images} = Wx::ImageList->new(16, 16, 1); + $self->AssignImageList($self->{images}); + $self->{imagecount} = -1; + return $self; } sub AddOptionsPage { my $self = shift; my $title = shift; + my $image = (ref $_[1]) ? undef : shift; my $page = Slic3r::GUI::Tab::Page->new($self, @_); - $self->AddPage($page, $title); + + my $bitmap = $image + ? Wx::Bitmap->new("$Slic3r::var/$image", &Wx::wxBITMAP_TYPE_PNG) + : undef; + if ($bitmap) { + $self->{images}->Add($bitmap); + $self->{imagecount}++; + } + $self->AddPage($page, $title, undef, $self->{imagecount}); } package Slic3r::GUI::Tab::Print; @@ -33,7 +46,7 @@ sub new { my ($parent) = @_; my $self = $class->SUPER::new($parent, -1); - $self->AddOptionsPage('Layers and perimeters', optgroups => [ + $self->AddOptionsPage('Layers and perimeters', 'layers.png', optgroups => [ { title => 'Layer height', options => [qw(layer_height first_layer_height)], @@ -48,14 +61,14 @@ sub new { }, ]); - $self->AddOptionsPage('Infill', optgroups => [ + $self->AddOptionsPage('Infill', 'shading.png', optgroups => [ { title => 'Infill', options => [qw(fill_density fill_angle fill_pattern solid_fill_pattern)], }, ]); - $self->AddOptionsPage('Speed', optgroups => [ + $self->AddOptionsPage('Speed', 'time.png', optgroups => [ { title => 'Speed for print moves', options => [qw(perimeter_speed small_perimeter_speed infill_speed solid_infill_speed top_solid_infill_speed bridge_speed)], @@ -70,14 +83,14 @@ sub new { }, ]); - $self->AddOptionsPage('Skirt', optgroups => [ + $self->AddOptionsPage('Skirt', 'box.png', optgroups => [ { title => 'Skirt', options => [qw(skirts skirt_distance skirt_height)], }, ]); - $self->AddOptionsPage('Cooling', optgroups => [ + $self->AddOptionsPage('Cooling', 'hourglass.png', optgroups => [ { title => 'Enable', options => [qw(cooling)], @@ -92,21 +105,21 @@ sub new { }, ]); - $self->AddOptionsPage('Support material', optgroups => [ + $self->AddOptionsPage('Support material', 'building.png', optgroups => [ { title => 'Support material', options => [qw(support_material support_material_tool)], }, ]); - $self->AddOptionsPage('Notes', optgroups => [ + $self->AddOptionsPage('Notes', 'note.png', optgroups => [ { title => 'Notes', options => [qw(notes)], }, ]); - $self->AddOptionsPage('Output options', optgroups => [ + $self->AddOptionsPage('Output options', 'page_white_go.png', optgroups => [ { title => 'Sequential printing', options => [qw(complete_objects extruder_clearance_radius extruder_clearance_height)], @@ -121,7 +134,7 @@ sub new { }, ]); - $self->AddOptionsPage('Advanced', optgroups => [ + $self->AddOptionsPage('Advanced', 'wrench.png', optgroups => [ { title => 'Extrusion width', options => [qw(extrusion_width first_layer_extrusion_width perimeters_extrusion_width infill_extrusion_width)], @@ -132,9 +145,6 @@ sub new { }, ]); - - - return $self; } @@ -149,7 +159,7 @@ sub new { my ($parent) = @_; my $self = $class->SUPER::new($parent, -1); - $self->AddOptionsPage('General', optgroups => [ + $self->AddOptionsPage('General', 'printer_empty.png', optgroups => [ { title => 'Size and coordinates', options => [qw(bed_size print_center z_offset)], @@ -160,7 +170,7 @@ sub new { }, ]); - $self->AddOptionsPage('Extruder and filament', optgroups => [ + $self->AddOptionsPage('Extruder and filament', 'spool.png', optgroups => [ { title => 'Size', options => [qw(nozzle_diameter)], @@ -175,14 +185,14 @@ sub new { }, ]); - $self->AddOptionsPage('Custom G-code', optgroups => [ + $self->AddOptionsPage('Custom G-code', 'cog.png', optgroups => [ { title => 'Custom G-code', options => [qw(start_gcode end_gcode layer_gcode)], }, ]); - $self->AddOptionsPage('Retraction', optgroups => [ + $self->AddOptionsPage('Retraction', 'arrow_up.png', optgroups => [ { title => 'Retraction', options => [qw(retract_length retract_lift retract_speed)], diff --git a/var/arrow_up.png b/var/arrow_up.png Binary files differnew file mode 100755 index 000000000..1ebb19324 --- /dev/null +++ b/var/arrow_up.png diff --git a/var/box.png b/var/box.png Binary files differnew file mode 100755 index 000000000..8443c23eb --- /dev/null +++ b/var/box.png diff --git a/var/building.png b/var/building.png Binary files differnew file mode 100755 index 000000000..11a017cfa --- /dev/null +++ b/var/building.png diff --git a/var/cog.png b/var/cog.png Binary files differnew file mode 100755 index 000000000..67de2c6cc --- /dev/null +++ b/var/cog.png diff --git a/var/hourglass.png b/var/hourglass.png Binary files differnew file mode 100755 index 000000000..57b03ce7a --- /dev/null +++ b/var/hourglass.png diff --git a/var/note.png b/var/note.png Binary files differnew file mode 100755 index 000000000..244e6ca04 --- /dev/null +++ b/var/note.png diff --git a/var/page_white_go.png b/var/page_white_go.png Binary files differnew file mode 100755 index 000000000..7e62a924b --- /dev/null +++ b/var/page_white_go.png diff --git a/var/printer_empty.png b/var/printer_empty.png Binary files differnew file mode 100755 index 000000000..94e8c1618 --- /dev/null +++ b/var/printer_empty.png diff --git a/var/shading.png b/var/shading.png Binary files differnew file mode 100755 index 000000000..09275f9c0 --- /dev/null +++ b/var/shading.png diff --git a/var/spool.png b/var/spool.png Binary files differnew file mode 100644 index 000000000..709006d38 --- /dev/null +++ b/var/spool.png diff --git a/var/time.png b/var/time.png Binary files differnew file mode 100755 index 000000000..911da3f1d --- /dev/null +++ b/var/time.png diff --git a/var/wrench.png b/var/wrench.png Binary files differnew file mode 100755 index 000000000..5c8213fef --- /dev/null +++ b/var/wrench.png |