mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 14:16:00 +08:00
Align speed and extrusion width fields
This commit is contained in:
parent
6feaef72ed
commit
a193297b20
@ -361,7 +361,7 @@ has 'full_labels' => (is => 'ro', default => sub { 0 });
|
|||||||
has '_opt_map' => (is => 'ro', default => sub { {} });
|
has '_opt_map' => (is => 'ro', default => sub { {} });
|
||||||
|
|
||||||
sub get_option {
|
sub get_option {
|
||||||
my ($self, $opt_key, $opt_index) = @_;
|
my ($self, $opt_key, $opt_index, %params) = @_;
|
||||||
|
|
||||||
$opt_index //= -1;
|
$opt_index //= -1;
|
||||||
|
|
||||||
@ -392,24 +392,25 @@ sub get_option {
|
|||||||
labels => $optdef->{labels},
|
labels => $optdef->{labels},
|
||||||
values => $optdef->{values},
|
values => $optdef->{values},
|
||||||
readonly => $optdef->{readonly},
|
readonly => $optdef->{readonly},
|
||||||
|
%params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub create_single_option_line {
|
sub create_single_option_line {
|
||||||
my ($self, $opt_key, $opt_index) = @_;
|
my ($self, $opt_key, $opt_index, %params) = @_;
|
||||||
|
|
||||||
my $option;
|
my $option;
|
||||||
if (ref($opt_key)) {
|
if (ref($opt_key)) {
|
||||||
$option = $opt_key;
|
$option = $opt_key;
|
||||||
} else {
|
} else {
|
||||||
$option = $self->get_option($opt_key, $opt_index);
|
$option = $self->get_option($opt_key, $opt_index, %params);
|
||||||
}
|
}
|
||||||
return $self->SUPER::create_single_option_line($option);
|
return $self->SUPER::create_single_option_line($option);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub append_single_option_line {
|
sub append_single_option_line {
|
||||||
my ($self, $option, $opt_index) = @_;
|
my ($self, $option, $opt_index, %params) = @_;
|
||||||
return $self->append_line($self->create_single_option_line($option, $opt_index));
|
return $self->append_line($self->create_single_option_line($option, $opt_index, %params));
|
||||||
}
|
}
|
||||||
|
|
||||||
sub reload_config {
|
sub reload_config {
|
||||||
|
@ -605,16 +605,12 @@ sub build {
|
|||||||
my $page = $self->add_options_page('Speed', 'time.png');
|
my $page = $self->add_options_page('Speed', 'time.png');
|
||||||
{
|
{
|
||||||
my $optgroup = $page->new_optgroup('Speed for print moves');
|
my $optgroup = $page->new_optgroup('Speed for print moves');
|
||||||
$optgroup->append_single_option_line('perimeter_speed');
|
$optgroup->append_single_option_line($_, undef, width => 100)
|
||||||
$optgroup->append_single_option_line('small_perimeter_speed');
|
for qw(perimeter_speed small_perimeter_speed external_perimeter_speed
|
||||||
$optgroup->append_single_option_line('external_perimeter_speed');
|
infill_speed solid_infill_speed top_solid_infill_speed
|
||||||
$optgroup->append_single_option_line('infill_speed');
|
gap_fill_speed bridge_speed
|
||||||
$optgroup->append_single_option_line('solid_infill_speed');
|
support_material_speed support_material_interface_speed
|
||||||
$optgroup->append_single_option_line('top_solid_infill_speed');
|
);
|
||||||
$optgroup->append_single_option_line('gap_fill_speed');
|
|
||||||
$optgroup->append_single_option_line('support_material_speed');
|
|
||||||
$optgroup->append_single_option_line('support_material_interface_speed');
|
|
||||||
$optgroup->append_single_option_line('bridge_speed');
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
my $optgroup = $page->new_optgroup('Speed for non-print moves');
|
my $optgroup = $page->new_optgroup('Speed for non-print moves');
|
||||||
@ -666,14 +662,11 @@ sub build {
|
|||||||
my $optgroup = $page->new_optgroup('Extrusion width',
|
my $optgroup = $page->new_optgroup('Extrusion width',
|
||||||
label_width => 180,
|
label_width => 180,
|
||||||
);
|
);
|
||||||
$optgroup->append_single_option_line('extrusion_width');
|
$optgroup->append_single_option_line($_, undef, width => 100)
|
||||||
$optgroup->append_single_option_line('first_layer_extrusion_width');
|
for qw(extrusion_width first_layer_extrusion_width
|
||||||
$optgroup->append_single_option_line('perimeter_extrusion_width');
|
perimeter_extrusion_width external_perimeter_extrusion_width
|
||||||
$optgroup->append_single_option_line('external_perimeter_extrusion_width');
|
infill_extrusion_width solid_infill_extrusion_width
|
||||||
$optgroup->append_single_option_line('infill_extrusion_width');
|
top_infill_extrusion_width support_material_extrusion_width);
|
||||||
$optgroup->append_single_option_line('solid_infill_extrusion_width');
|
|
||||||
$optgroup->append_single_option_line('top_infill_extrusion_width');
|
|
||||||
$optgroup->append_single_option_line('support_material_extrusion_width');
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
my $optgroup = $page->new_optgroup('Overlap');
|
my $optgroup = $page->new_optgroup('Overlap');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user