Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2019-04-25 02:45:00 +0300
committerYuSanka <yusanka@gmail.com>2019-04-25 02:45:00 +0300
commit065448e9e5f63f412ac59c8fbbea560f2cccf77e (patch)
tree03dc97265e1f4f750f12e0f6b7cf1e5b37399ed7 /src/slic3r/GUI/GUI_ObjectSettings.cpp
parentbe60f0a53c6da7121d99a5a2bfaa58519ebf4c8d (diff)
Big Refactoring: - deleted/renamed all _Prusa_ prefixes,
- cleaned code from commented parts - rescale() -> msw_rescale()
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectSettings.cpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectSettings.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectSettings.cpp b/src/slic3r/GUI/GUI_ObjectSettings.cpp
index b8c0c41ae..b7ba2d4fc 100644
--- a/src/slic3r/GUI/GUI_ObjectSettings.cpp
+++ b/src/slic3r/GUI/GUI_ObjectSettings.cpp
@@ -60,7 +60,7 @@ ObjectSettings::ObjectSettings(wxWindow* parent) :
m_settings_list_sizer = new wxBoxSizer(wxVERTICAL);
m_og->sizer->Add(m_settings_list_sizer, 1, wxEXPAND | wxLEFT, 5);
- m_bmp_delete = PrusaBitmap(parent, "cross");
+ m_bmp_delete = ScalableBitmap(parent, "cross");
}
void ObjectSettings::update_settings_list()
@@ -79,12 +79,8 @@ void ObjectSettings::update_settings_list()
{
auto opt_key = (line.get_options())[0].opt_id; //we assume that we have one option per line
-// auto btn = new wxBitmapButton(parent, wxID_ANY, create_scaled_bitmap(m_parent, "cross"/*"colorchange_delete_on.png"*/),
-// wxDefaultPosition, wxDefaultSize, wxBORDER_NONE);
- auto btn = new PrusaButton(parent, wxID_ANY, m_bmp_delete);
-//#ifdef __WXMSW__
-// btn->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
-//#endif // __WXMSW__
+ auto btn = new ScalableButton(parent, wxID_ANY, m_bmp_delete);
+
btn->Bind(wxEVT_BUTTON, [opt_key, config, this](wxEvent &event) {
config->erase(opt_key);
wxGetApp().obj_list()->changed_object();
@@ -145,7 +141,7 @@ void ObjectSettings::update_settings_list()
// call back for rescaling of the extracolumn control
optgroup->rescale_extra_column_item = [this](wxWindow* win) {
- auto *ctrl = dynamic_cast<PrusaButton*>(win);
+ auto *ctrl = dynamic_cast<ScalableButton*>(win);
if (ctrl == nullptr)
return;
ctrl->SetBitmap_(m_bmp_delete);
@@ -175,12 +171,12 @@ void ObjectSettings::UpdateAndShow(const bool show)
OG_Settings::UpdateAndShow(show);
}
-void ObjectSettings::rescale()
+void ObjectSettings::msw_rescale()
{
- m_bmp_delete.rescale();
+ m_bmp_delete.msw_rescale();
for (auto group : m_og_settings)
- group->rescale();
+ group->msw_rescale();
}
} //namespace GUI