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-08-01 12:35:43 +0300
committerLukas Matena <lukasmatena@seznam.cz>2019-08-01 15:39:23 +0300
commitc2a43dc8644ad59ac5ee5647b18ee956de2d419d (patch)
tree272e0ab1fcb58b740c55784a839d99df6a042ca5 /src/slic3r/GUI/GUI_ObjectManipulation.cpp
parent98e08e356feee4c74de978cc9c30bd3806adfb49 (diff)
Mirroring buttons: Fixed scaling issues and ensured proper hiding on Win
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectManipulation.cpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectManipulation.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
index 40f27d7c0..2bbf11170 100644
--- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp
+++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
@@ -210,6 +210,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
wxSize btn_size(em_unit(parent) * mirror_btn_width, em_unit(parent) * mirror_btn_width);
auto btn = new ScalableButton(parent, wxID_ANY, "mirroring_off", wxEmptyString, btn_size, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER | wxTRANSPARENT_WINDOW);
btn->SetToolTip(wxString::Format(_(L("Toggle %c axis mirroring")), (int)label));
+ btn->SetBitmapDisabled_(m_mirror_bitmap_hidden);
m_mirror_buttons[axis_idx].first = btn;
m_mirror_buttons[axis_idx].second = mbShown;
@@ -648,13 +649,13 @@ void ObjectManipulation::update_mirror_buttons_visibility()
wxGetApp().CallAfter([this, new_states]{
for (int i=0; i<3; ++i) {
if (new_states[i] != m_mirror_buttons[i].second) {
- const wxBitmap* bmp;
+ const ScalableBitmap* bmp;
switch (new_states[i]) {
- case mbHidden : bmp = &m_mirror_bitmap_hidden.bmp(); m_mirror_buttons[i].first->Enable(false); break;
- case mbShown : bmp = &m_mirror_bitmap_off.bmp(); m_mirror_buttons[i].first->Enable(true); break;
- case mbActive : bmp = &m_mirror_bitmap_on.bmp(); m_mirror_buttons[i].first->Enable(true); break;
+ case mbHidden : bmp = &m_mirror_bitmap_hidden; m_mirror_buttons[i].first->Enable(false); break;
+ case mbShown : bmp = &m_mirror_bitmap_off; m_mirror_buttons[i].first->Enable(true); break;
+ case mbActive : bmp = &m_mirror_bitmap_on; m_mirror_buttons[i].first->Enable(true); break;
}
- m_mirror_buttons[i].first->SetBitmap(*bmp);
+ m_mirror_buttons[i].first->SetBitmap_(*bmp);
m_mirror_buttons[i].second = new_states[i];
}
}
@@ -927,6 +928,9 @@ void ObjectManipulation::msw_rescale()
m_reset_rotation_button->msw_rescale();
m_drop_to_bed_button->msw_rescale();
+ for (int id = 0; id < 3; ++id)
+ m_mirror_buttons[id].first->msw_rescale();
+
get_og()->msw_rescale();
}