From 1721a7db5bc7c3f9dae9eb38ca27f76b71d9bab8 Mon Sep 17 00:00:00 2001
From: YuSanka <yusanka@gmail.com>
Date: Thu, 23 May 2019 08:58:42 +0200
Subject: [PATCH] Added comments and some changes of input parameters for
 slider

---
 src/slic3r/GUI/Preferences.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp
index bbd2585d1..52cbdbb1d 100644
--- a/src/slic3r/GUI/Preferences.cpp
+++ b/src/slic3r/GUI/Preferences.cpp
@@ -189,6 +189,8 @@ void PreferencesDialog::create_icon_size_slider()
     wxWindow* parent = m_optgroup->ctrl_parent();
 
     if (isOSX)
+        // For correct rendering of the slider and value label under OSX
+        // we should use system default background
         parent->SetBackgroundStyle(wxBG_STYLE_ERASE);
 
     auto label = new wxStaticText(parent, wxID_ANY, _(L("Icon size in a respect to the default size")) + " (%) :");
@@ -201,11 +203,11 @@ void PreferencesDialog::create_icon_size_slider()
     if (!isOSX)
         style |= wxSL_LABELS | wxSL_AUTOTICKS;
 
-    auto slider = new wxSlider(parent, wxID_ANY, def_val, 25, 100, 
+    auto slider = new wxSlider(parent, wxID_ANY, def_val, 30, 100, 
                                wxDefaultPosition, wxDefaultSize, style);
 
-    slider->SetTickFreq(25);
-    slider->SetPageSize(25);
+    slider->SetTickFreq(10);
+    slider->SetPageSize(10);
     slider->SetToolTip(_(L("Select toolbar icon size in respect to the default one.")));
 
     m_icon_size_sizer->Add(slider, 1, wxEXPAND);
@@ -228,7 +230,7 @@ void PreferencesDialog::create_icon_size_slider()
         if (!win) continue;         
         win->SetFont(wxGetApp().normal_font());
 
-        if (isOSX) continue;
+        if (isOSX) continue; // under OSX we use wxBG_STYLE_ERASE
         win->SetBackgroundStyle(wxBG_STYLE_PAINT);
     }