Some more tweaks
This commit is contained in:
parent
0748e088a0
commit
46f35e39f6
@ -63,7 +63,7 @@ sub BUILD {
|
|||||||
$self->sizer(Wx::StaticBoxSizer->new($box, wxVERTICAL));
|
$self->sizer(Wx::StaticBoxSizer->new($box, wxVERTICAL));
|
||||||
}
|
}
|
||||||
|
|
||||||
my $grid_sizer = Wx::FlexGridSizer->new(scalar(@{$self->options}), 2, ($self->no_labels ? 1 : 2), 0);
|
my $grid_sizer = Wx::FlexGridSizer->new(scalar(@{$self->options}), 2, 0, 0);
|
||||||
$grid_sizer->SetFlexibleDirection(wxHORIZONTAL);
|
$grid_sizer->SetFlexibleDirection(wxHORIZONTAL);
|
||||||
$grid_sizer->AddGrowableCol($self->no_labels ? 0 : 1);
|
$grid_sizer->AddGrowableCol($self->no_labels ? 0 : 1);
|
||||||
|
|
||||||
|
@ -332,6 +332,7 @@ sub config {
|
|||||||
# set some sensible defaults
|
# set some sensible defaults
|
||||||
$config->set('first_layer_height', $config->nozzle_diameter->[0]);
|
$config->set('first_layer_height', $config->nozzle_diameter->[0]);
|
||||||
$config->set('avoid_crossing_perimeters', 1);
|
$config->set('avoid_crossing_perimeters', 1);
|
||||||
|
$config->set('infill_every_layers', 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
|
@ -407,6 +407,7 @@ sub build_simple {
|
|||||||
$self->add_options_page('', '', optgroups => [
|
$self->add_options_page('', '', optgroups => [
|
||||||
{
|
{
|
||||||
title => 'General',
|
title => 'General',
|
||||||
|
column => 0,
|
||||||
options => [qw(layer_height perimeters top_solid_layers bottom_solid_layers)],
|
options => [qw(layer_height perimeters top_solid_layers bottom_solid_layers)],
|
||||||
lines => [
|
lines => [
|
||||||
Slic3r::GUI::OptionsGroup->single_option_line('layer_height'),
|
Slic3r::GUI::OptionsGroup->single_option_line('layer_height'),
|
||||||
@ -419,6 +420,7 @@ sub build_simple {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title => 'Infill',
|
title => 'Infill',
|
||||||
|
column => 0,
|
||||||
options => [qw(fill_density fill_pattern)],
|
options => [qw(fill_density fill_pattern)],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -919,6 +921,8 @@ package Slic3r::GUI::Tab::Page;
|
|||||||
use Wx qw(:misc :panel :sizer);
|
use Wx qw(:misc :panel :sizer);
|
||||||
use base 'Wx::ScrolledWindow';
|
use base 'Wx::ScrolledWindow';
|
||||||
|
|
||||||
|
use List::Util qw(max);
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my ($parent, $title, $iconID, %params) = @_;
|
my ($parent, $title, $iconID, %params) = @_;
|
||||||
@ -929,15 +933,21 @@ sub new {
|
|||||||
|
|
||||||
$self->SetScrollbars(1, 1, 1, 1);
|
$self->SetScrollbars(1, 1, 1, 1);
|
||||||
|
|
||||||
$self->{vsizer} = Wx::BoxSizer->new(wxVERTICAL);
|
$self->{hsizer} = Wx::BoxSizer->new(wxHORIZONTAL);
|
||||||
$self->SetSizer($self->{vsizer});
|
$self->SetSizer($self->{hsizer});
|
||||||
|
|
||||||
if ($params{optgroups}) {
|
if ($params{optgroups}) {
|
||||||
$self->append_optgroup(
|
$_->{column} //= 0 for @{$params{optgroups}};
|
||||||
%$_,
|
for my $col (0 .. max(map $_->{column}, @{$params{optgroups}})) {
|
||||||
config => $parent->{config},
|
my $vertical_sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||||
on_change => $params{on_change},
|
$self->{hsizer}->Add($vertical_sizer, 1, wxEXPAND | wxALL, 0);
|
||||||
) for @{$params{optgroups}};
|
$self->append_optgroup(
|
||||||
|
%$_,
|
||||||
|
sizer => $vertical_sizer,
|
||||||
|
config => $parent->{config},
|
||||||
|
on_change => $params{on_change},
|
||||||
|
) for grep $_->{column} == $col, @{$params{optgroups}};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
@ -954,7 +964,7 @@ sub append_optgroup {
|
|||||||
label_width => 200,
|
label_width => 200,
|
||||||
%params,
|
%params,
|
||||||
);
|
);
|
||||||
$self->{vsizer}->Add($optgroup->sizer, 0, wxEXPAND | wxALL, 5);
|
$params{sizer}->Add($optgroup->sizer, 0, wxEXPAND | wxALL, 5);
|
||||||
push @{$self->{optgroups}}, $optgroup;
|
push @{$self->{optgroups}}, $optgroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user