mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-13 01:49:02 +08:00
Merge pull request #3930 from xoan/enhance-scrolling
Enhance scrolling by using font point size as scroll rate
This commit is contained in:
commit
0d4cebce71
@ -101,6 +101,10 @@ our $medium_font = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||
$medium_font->SetPointSize(12);
|
||||
our $grey = Wx::Colour->new(200,200,200);
|
||||
|
||||
# to use in ScrolledWindow::SetScrollRate(xstep, ystep)
|
||||
# step related to system font point size
|
||||
our $scroll_step = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)->GetPointSize;
|
||||
|
||||
our $VERSION_CHECK_EVENT : shared = Wx::NewEventType;
|
||||
|
||||
our $DLP_projection_screen;
|
||||
|
@ -89,7 +89,9 @@ sub new {
|
||||
}
|
||||
|
||||
$self->SetSizer($self->{sizer});
|
||||
$self->SetScrollbars(0, 1, 0, 1);
|
||||
|
||||
# http://docs.wxwidgets.org/3.0/classwx_scrolled.html#details
|
||||
$self->SetScrollRate(0, $Slic3r::GUI::scroll_step);
|
||||
|
||||
$self->set_opt_keys($params{opt_keys}) if $params{opt_keys};
|
||||
$self->update_optgroup;
|
||||
|
@ -1602,11 +1602,12 @@ sub new {
|
||||
$self->{title} = $title;
|
||||
$self->{iconID} = $iconID;
|
||||
|
||||
$self->SetScrollbars(1, 1, 1, 1);
|
||||
|
||||
$self->{vsizer} = Wx::BoxSizer->new(wxVERTICAL);
|
||||
$self->SetSizer($self->{vsizer});
|
||||
|
||||
# http://docs.wxwidgets.org/3.0/classwx_scrolled.html#details
|
||||
$self->SetScrollRate($Slic3r::GUI::scroll_step, $Slic3r::GUI::scroll_step);
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user