Moved units of measure to the right of input fields
This commit is contained in:
parent
b7983b54f8
commit
72298877bb
3 changed files with 107 additions and 50 deletions
|
@ -22,7 +22,8 @@ our $Options = {
|
|||
deserialize => sub { join "\n", split /\\n/, $_[0] },
|
||||
},
|
||||
'threads' => {
|
||||
label => 'Threads (more speed, more memory usage)',
|
||||
label => 'Threads',
|
||||
sidetext => '(more speed but more memory usage)',
|
||||
cli => 'threads|j=i',
|
||||
type => 'i',
|
||||
},
|
||||
|
@ -36,13 +37,15 @@ our $Options = {
|
|||
|
||||
# printer options
|
||||
'nozzle_diameter' => {
|
||||
label => 'Nozzle diameter (mm)',
|
||||
label => 'Nozzle diameter',
|
||||
sidetext => 'mm',
|
||||
cli => 'nozzle-diameter=f',
|
||||
type => 'f',
|
||||
important => 1,
|
||||
},
|
||||
'print_center' => {
|
||||
label => 'Print center (mm)',
|
||||
label => 'Print center',
|
||||
sidetext => 'mm',
|
||||
cli => 'print-center=s',
|
||||
type => 'point',
|
||||
serialize => sub { join ',', @{$_[0]} },
|
||||
|
@ -66,7 +69,8 @@ our $Options = {
|
|||
type => 's',
|
||||
},
|
||||
'z_offset' => {
|
||||
label => 'Z offset (mm)',
|
||||
label => 'Z offset',
|
||||
sidetext => 'mm',
|
||||
cli => 'z-offset=f',
|
||||
type => 'f',
|
||||
},
|
||||
|
@ -88,7 +92,8 @@ our $Options = {
|
|||
|
||||
# filament options
|
||||
'filament_diameter' => {
|
||||
label => 'Diameter (mm)',
|
||||
label => 'Diameter',
|
||||
sidetext => 'mm',
|
||||
cli => 'filament-diameter=f',
|
||||
type => 'f',
|
||||
important => 1,
|
||||
|
@ -100,73 +105,85 @@ our $Options = {
|
|||
aliases => [qw(filament_packing_density)],
|
||||
},
|
||||
'first_layer_temperature' => {
|
||||
label => 'First layer temperature (°C)',
|
||||
label => 'First layer temperature',
|
||||
sidetext => '°C',
|
||||
cli => 'first-layer-temperature=i',
|
||||
type => 'i',
|
||||
},
|
||||
'first_layer_bed_temperature' => {
|
||||
label => 'First layer bed temperature (°C)',
|
||||
label => 'First layer bed temperature',
|
||||
sidetext => '°C',
|
||||
cli => 'first-layer-bed-temperature=i',
|
||||
type => 'i',
|
||||
},
|
||||
'temperature' => {
|
||||
label => 'Temperature (°C)',
|
||||
label => 'Temperature',
|
||||
sidetext => '°C',
|
||||
cli => 'temperature=i',
|
||||
type => 'i',
|
||||
important => 1,
|
||||
},
|
||||
'bed_temperature' => {
|
||||
label => 'Bed Temperature (°C)',
|
||||
label => 'Bed Temperature',
|
||||
sidetext => '°C',
|
||||
cli => 'bed-temperature=i',
|
||||
type => 'i',
|
||||
},
|
||||
|
||||
# speed options
|
||||
'travel_speed' => {
|
||||
label => 'Travel (mm/s)',
|
||||
label => 'Travel',
|
||||
sidetext => 'mm/s',
|
||||
cli => 'travel-speed=f',
|
||||
type => 'f',
|
||||
aliases => [qw(travel_feed_rate)],
|
||||
},
|
||||
'perimeter_speed' => {
|
||||
label => 'Perimeters (mm/s)',
|
||||
label => 'Perimeters',
|
||||
sidetext => 'mm/s',
|
||||
cli => 'perimeter-speed=f',
|
||||
type => 'f',
|
||||
aliases => [qw(perimeter_feed_rate)],
|
||||
},
|
||||
'small_perimeter_speed' => {
|
||||
label => 'Small perimeters (mm/s or %)',
|
||||
label => 'Small perimeters',
|
||||
sidetext => 'mm/s or %',
|
||||
cli => 'small-perimeter-speed=f',
|
||||
type => 'f',
|
||||
ratio_over => 'perimeter_speed',
|
||||
},
|
||||
'infill_speed' => {
|
||||
label => 'Infill (mm/s)',
|
||||
label => 'Infill',
|
||||
sidetext => 'mm/s',
|
||||
cli => 'infill-speed=f',
|
||||
type => 'f',
|
||||
aliases => [qw(print_feed_rate infill_feed_rate)],
|
||||
},
|
||||
'solid_infill_speed' => {
|
||||
label => 'Solid infill (mm/s or %)',
|
||||
label => 'Solid infill',
|
||||
sidetext => 'mm/s or %',
|
||||
cli => 'solid-infill-speed=f',
|
||||
type => 'f',
|
||||
ratio_over => 'infill_speed',
|
||||
aliases => [qw(solid_infill_feed_rate)],
|
||||
},
|
||||
'top_solid_infill_speed' => {
|
||||
label => 'Top solid infill (mm/s or %)',
|
||||
label => 'Top solid infill',
|
||||
sidetext => 'mm/s or %',
|
||||
cli => 'top-solid-infill-speed=f',
|
||||
type => 'f',
|
||||
ratio_over => 'solid_infill_speed',
|
||||
},
|
||||
'bridge_speed' => {
|
||||
label => 'Bridges (mm/s)',
|
||||
label => 'Bridges',
|
||||
sidetext => 'mm/s',
|
||||
cli => 'bridge-speed=f',
|
||||
type => 'f',
|
||||
aliases => [qw(bridge_feed_rate)],
|
||||
},
|
||||
'first_layer_speed' => {
|
||||
label => 'First layer speed (mm/s or %)',
|
||||
label => 'First layer speed',
|
||||
sidetext => 'mm/s or %',
|
||||
cli => 'first-layer-speed=s',
|
||||
type => 'f',
|
||||
},
|
||||
|
@ -178,52 +195,61 @@ our $Options = {
|
|||
type => 'bool',
|
||||
},
|
||||
'perimeter_acceleration' => {
|
||||
label => 'Perimeters (mm/s²)',
|
||||
label => 'Perimeters',
|
||||
sidetext => 'mm/s²',
|
||||
cli => 'perimeter-acceleration',
|
||||
type => 'f',
|
||||
},
|
||||
'infill_acceleration' => {
|
||||
label => 'Infill (mm/s²)',
|
||||
label => 'Infill',
|
||||
sidetext => 'mm/s²',
|
||||
cli => 'infill-acceleration',
|
||||
type => 'f',
|
||||
},
|
||||
|
||||
# accuracy options
|
||||
'layer_height' => {
|
||||
label => 'Layer height (mm)',
|
||||
label => 'Layer height',
|
||||
sidetext => 'mm',
|
||||
cli => 'layer-height=f',
|
||||
type => 'f',
|
||||
},
|
||||
'first_layer_height' => {
|
||||
label => 'First layer height (mm or %)',
|
||||
label => 'First layer height',
|
||||
sidetext => 'mm or %',
|
||||
cli => 'first-layer-height=s',
|
||||
type => 'f',
|
||||
ratio_over => 'layer_height',
|
||||
},
|
||||
'infill_every_layers' => {
|
||||
label => 'Infill every N layers',
|
||||
label => 'Infill every',
|
||||
sidetext => 'layers',
|
||||
cli => 'infill-every-layers=i',
|
||||
type => 'i',
|
||||
},
|
||||
|
||||
# flow options
|
||||
'extrusion_width' => {
|
||||
label => 'Extrusion width (mm or %; leave zero to calculate automatically)',
|
||||
label => 'Default extrusion width',
|
||||
sidetext => 'mm or % (leave 0 for auto)',
|
||||
cli => 'extrusion-width=s',
|
||||
type => 'f',
|
||||
},
|
||||
'first_layer_extrusion_width' => {
|
||||
label => 'First layer extrusion width (mm or % or 0 for default)',
|
||||
label => 'First layer',
|
||||
sidetext => 'mm or % (leave 0 for default)',
|
||||
cli => 'first-layer-extrusion-width=s',
|
||||
type => 'f',
|
||||
},
|
||||
'perimeters_extrusion_width' => {
|
||||
label => 'Perimeters extrusion width (mm or % or 0 for default)',
|
||||
label => 'Perimeters',
|
||||
sidetext => 'mm or % (leave 0 for default)',
|
||||
cli => 'perimeters-extrusion-width=s',
|
||||
type => 'f',
|
||||
},
|
||||
'infill_extrusion_width' => {
|
||||
label => 'Infill extrusion width (mm or % or 0 for default)',
|
||||
label => 'Infill',
|
||||
sidetext => 'mm or % (leave 0 for default)',
|
||||
cli => 'infill-extrusion-width=s',
|
||||
type => 'f',
|
||||
},
|
||||
|
@ -265,7 +291,8 @@ our $Options = {
|
|||
type => 'f',
|
||||
},
|
||||
'fill_angle' => {
|
||||
label => 'Fill angle (°)',
|
||||
label => 'Fill angle',
|
||||
sidetext => '°',
|
||||
cli => 'fill-angle=i',
|
||||
type => 'i',
|
||||
},
|
||||
|
@ -329,27 +356,32 @@ our $Options = {
|
|||
|
||||
# retraction options
|
||||
'retract_length' => {
|
||||
label => 'Length (mm)',
|
||||
label => 'Length',
|
||||
sidetext => 'mm (zero to disable)',
|
||||
cli => 'retract-length=f',
|
||||
type => 'f',
|
||||
},
|
||||
'retract_speed' => {
|
||||
label => 'Speed (mm/s)',
|
||||
label => 'Speed',
|
||||
sidetext => 'mm/s',
|
||||
cli => 'retract-speed=f',
|
||||
type => 'i',
|
||||
},
|
||||
'retract_restart_extra' => {
|
||||
label => 'Extra length on restart (mm)',
|
||||
label => 'Extra length on restart',
|
||||
sidetext => 'mm',
|
||||
cli => 'retract-restart-extra=f',
|
||||
type => 'f',
|
||||
},
|
||||
'retract_before_travel' => {
|
||||
label => 'Minimum travel after retraction (mm)',
|
||||
label => 'Minimum travel after retraction',
|
||||
sidetext => 'mm',
|
||||
cli => 'retract-before-travel=f',
|
||||
type => 'f',
|
||||
},
|
||||
'retract_lift' => {
|
||||
label => 'Lift Z (mm)',
|
||||
label => 'Lift Z',
|
||||
sidetext => 'mm',
|
||||
cli => 'retract-lift=f',
|
||||
type => 'f',
|
||||
},
|
||||
|
@ -361,37 +393,44 @@ our $Options = {
|
|||
type => 'bool',
|
||||
},
|
||||
'min_fan_speed' => {
|
||||
label => 'Min fan speed (%)',
|
||||
label => 'Min fan speed',
|
||||
sidetext => '%',
|
||||
cli => 'min-fan-speed=i',
|
||||
type => 'i',
|
||||
},
|
||||
'max_fan_speed' => {
|
||||
label => 'Max fan speed (%)',
|
||||
label => 'Max fan speed',
|
||||
sidetext => '%',
|
||||
cli => 'max-fan-speed=i',
|
||||
type => 'i',
|
||||
},
|
||||
'bridge_fan_speed' => {
|
||||
label => 'Bridge fan speed (%)',
|
||||
label => 'Bridge fan speed',
|
||||
sidetext => '%',
|
||||
cli => 'bridge-fan-speed=i',
|
||||
type => 'i',
|
||||
},
|
||||
'fan_below_layer_time' => {
|
||||
label => 'Enable fan if layer print time is below (approximate seconds)',
|
||||
label => 'Enable fan if layer print time is below',
|
||||
sidetext => 'approximate seconds',
|
||||
cli => 'fan-below-layer-time=i',
|
||||
type => 'i',
|
||||
},
|
||||
'slowdown_below_layer_time' => {
|
||||
label => 'Slow down if layer print time is below (approximate seconds)',
|
||||
label => 'Slow down if layer print time is below',
|
||||
sidetext => 'approximate seconds',
|
||||
cli => 'slowdown-below-layer-time=i',
|
||||
type => 'i',
|
||||
},
|
||||
'min_print_speed' => {
|
||||
label => 'Min print speed (mm/s)',
|
||||
label => 'Min print speed',
|
||||
sidetext => 'mm/s',
|
||||
cli => 'min-print-speed=f',
|
||||
type => 'i',
|
||||
},
|
||||
'disable_fan_first_layers' => {
|
||||
label => 'Disable fan for the first N layers',
|
||||
label => 'Disable fan for the first',
|
||||
sidetext => 'layers',
|
||||
cli => 'disable-fan-first-layers=i',
|
||||
type => 'i',
|
||||
},
|
||||
|
@ -408,12 +447,14 @@ our $Options = {
|
|||
type => 'i',
|
||||
},
|
||||
'skirt_distance' => {
|
||||
label => 'Distance from object (mm)',
|
||||
label => 'Distance from object',
|
||||
sidetext => 'mm',
|
||||
cli => 'skirt-distance=f',
|
||||
type => 'i',
|
||||
},
|
||||
'skirt_height' => {
|
||||
label => 'Skirt height (layers)',
|
||||
label => 'Skirt height',
|
||||
sidetext => 'layers',
|
||||
cli => 'skirt-height=i',
|
||||
type => 'i',
|
||||
},
|
||||
|
@ -425,7 +466,8 @@ our $Options = {
|
|||
type => 'f',
|
||||
},
|
||||
'rotate' => {
|
||||
label => 'Rotate (°)',
|
||||
label => 'Rotate',
|
||||
sidetext => '°',
|
||||
cli => 'rotate=i',
|
||||
type => 'i',
|
||||
},
|
||||
|
@ -442,7 +484,8 @@ our $Options = {
|
|||
type => 'i',
|
||||
},
|
||||
'bed_size' => {
|
||||
label => 'Bed size (mm)',
|
||||
label => 'Bed size',
|
||||
sidetext => 'mm',
|
||||
cli => 'bed-size=s',
|
||||
type => 'point',
|
||||
serialize => sub { join ',', @{$_[0]} },
|
||||
|
@ -457,6 +500,7 @@ our $Options = {
|
|||
},
|
||||
'duplicate_distance' => {
|
||||
label => 'Distance between copies',
|
||||
sidetext => 'mm',
|
||||
cli => 'duplicate-distance=f',
|
||||
type => 'i',
|
||||
aliases => [qw(multiply_distance)],
|
||||
|
@ -464,17 +508,19 @@ our $Options = {
|
|||
|
||||
# sequential printing options
|
||||
'complete_objects' => {
|
||||
label => 'Complete individual objects (watch out for extruder collisions)',
|
||||
label => 'Complete individual objects',
|
||||
cli => 'complete-objects',
|
||||
type => 'bool',
|
||||
},
|
||||
'extruder_clearance_radius' => {
|
||||
label => 'Extruder clearance radius (mm)',
|
||||
label => 'Extruder clearance radius',
|
||||
sidetext => 'mm',
|
||||
cli => 'extruder-clearance-radius=f',
|
||||
type => 'i',
|
||||
},
|
||||
'extruder_clearance_height' => {
|
||||
label => 'Extruder clearance height (mm)',
|
||||
label => 'Extruder clearance height',
|
||||
sidetext => 'mm',
|
||||
cli => 'extruder-clearance-height=f',
|
||||
type => 'i',
|
||||
},
|
||||
|
|
|
@ -23,6 +23,8 @@ sub new {
|
|||
# grab the default font, to fix Windows font issues/keep things consistent
|
||||
my $bold_font = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||
$bold_font->SetWeight(&Wx::wxFONTWEIGHT_BOLD);
|
||||
my $sidetext_font = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||
$sidetext_font->SetPointSize(12);
|
||||
|
||||
foreach my $opt_key (@{$p{options}}) {
|
||||
my $opt = $Slic3r::Config::Options->{$opt_key};
|
||||
|
@ -95,7 +97,16 @@ sub new {
|
|||
} else {
|
||||
die "Unsupported option type: " . $opt->{type};
|
||||
}
|
||||
$grid_sizer->Add($field);
|
||||
if ($opt->{sidetext}) {
|
||||
my $sizer = Wx::BoxSizer->new(&Wx::wxHORIZONTAL);
|
||||
$sizer->Add($field);
|
||||
my $sidetext = Wx::StaticText->new($parent, -1, $opt->{sidetext}, Wx::wxDefaultPosition, [-1, -1]);
|
||||
$sidetext->SetFont($sidetext_font);
|
||||
$sizer->Add($sidetext, 0, &Wx::wxLEFT, 4);
|
||||
$grid_sizer->Add($sizer);
|
||||
} else {
|
||||
$grid_sizer->Add($field);
|
||||
}
|
||||
$fields{$opt_key} ||= [$field];
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ sub new {
|
|||
$self->AddOptionsPage('Infill', 'shading.png', optgroups => [
|
||||
{
|
||||
title => 'Infill',
|
||||
options => [qw(fill_density fill_angle fill_pattern solid_fill_pattern)],
|
||||
options => [qw(fill_density fill_angle fill_pattern solid_fill_pattern infill_every_layers)],
|
||||
},
|
||||
]);
|
||||
|
||||
|
@ -78,7 +78,7 @@ sub new {
|
|||
options => [qw(travel_speed)],
|
||||
},
|
||||
{
|
||||
title => 'Advanced',
|
||||
title => 'Modifiers',
|
||||
options => [qw(first_layer_speed)],
|
||||
},
|
||||
]);
|
||||
|
@ -247,7 +247,7 @@ sub new {
|
|||
sub append_optgroup {
|
||||
my $self = shift;
|
||||
|
||||
my $optgroup = Slic3r::GUI::OptionsGroup->new($self, @_, label_width => 300);
|
||||
my $optgroup = Slic3r::GUI::OptionsGroup->new($self, @_, label_width => 200);
|
||||
$self->{vsizer}->Add($optgroup, 0, wxEXPAND | wxALL, 5);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue