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:
authorbubnikv <bubnikv@gmail.com>2019-08-20 17:53:23 +0300
committerbubnikv <bubnikv@gmail.com>2019-08-20 17:53:23 +0300
commitc8a78f5d85cc79bc41823e5dd5dee8c0a8051e49 (patch)
tree2f380b623996134079b9391b25e3059a0bc6c0c9 /src/slic3r/GUI/GUI_ObjectManipulation.cpp
parent88dcb7f366324225e715a67fa231fff0bda584a4 (diff)
parent12133f95993ba33064b059e971f27e02fcc046d8 (diff)
Merge remote-tracking branch 'remotes/origin/ys_bf_msw_scale'
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectManipulation.cpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectManipulation.cpp33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
index 2bbf11170..29013389e 100644
--- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp
+++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
@@ -153,8 +153,8 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
auto manifold_warning_icon = [this](wxWindow* parent) {
m_fix_throught_netfab_bitmap = new wxStaticBitmap(parent, wxID_ANY, wxNullBitmap);
- auto sizer = new wxBoxSizer(wxHORIZONTAL);
- sizer->Add(m_fix_throught_netfab_bitmap);
+// auto sizer = new wxBoxSizer(wxHORIZONTAL);
+// sizer->Add(m_fix_throught_netfab_bitmap);
if (is_windows10())
m_fix_throught_netfab_bitmap->Bind(wxEVT_CONTEXT_MENU, [this](wxCommandEvent &e)
@@ -167,17 +167,19 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
update_warning_icon_state(wxGetApp().obj_list()->get_mesh_errors_list());
});
- return sizer;
+// return sizer;
+ return m_fix_throught_netfab_bitmap;
};
- line.append_widget(manifold_warning_icon);
+ // line.append_widget(manifold_warning_icon);
+ line.near_label_widget = manifold_warning_icon;
def.label = "";
def.gui_type = "legend";
def.tooltip = L("Object name");
#ifdef __APPLE__
- def.width = 19;
+ def.width = 20;
#else
- def.width = 21;
+ def.width = 22;
#endif
def.set_default_value(new ConfigOptionString{ " " });
line.append_option(Option(def, "object_name"));
@@ -392,10 +394,19 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
// call back for a rescale of button "Set uniform scale"
m_og->rescale_near_label_widget = [this](wxWindow* win) {
+ // rescale lock icon
auto *ctrl = dynamic_cast<LockButton*>(win);
- if (ctrl == nullptr)
+ if (ctrl != nullptr) {
+ ctrl->msw_rescale();
return;
- ctrl->msw_rescale();
+ }
+
+ if (win == m_fix_throught_netfab_bitmap)
+ return;
+
+ // rescale "place" of the empty icon (to correct layout of the "Size" and "Scale")
+ if (dynamic_cast<wxStaticBitmap*>(win) != nullptr)
+ win->SetMinSize(create_scaled_bitmap(m_parent, "one_layer_lock_on.png").GetSize());
};
}
@@ -685,6 +696,7 @@ void ObjectManipulation::emulate_kill_focus()
void ObjectManipulation::update_warning_icon_state(const wxString& tooltip)
{
m_fix_throught_netfab_bitmap->SetBitmap(tooltip.IsEmpty() ? wxNullBitmap : m_manifold_warning_bmp.bmp());
+ m_fix_throught_netfab_bitmap->SetMinSize(tooltip.IsEmpty() ? wxSize(0,0) : m_manifold_warning_bmp.bmp().GetSize());
m_fix_throught_netfab_bitmap->SetToolTip(tooltip);
}
@@ -919,7 +931,10 @@ void ObjectManipulation::msw_rescale()
{
msw_rescale_word_local_combo(m_word_local_combo);
m_manifold_warning_bmp.msw_rescale();
- m_fix_throught_netfab_bitmap->SetBitmap(m_manifold_warning_bmp.bmp());
+
+ const wxString& tooltip = m_fix_throught_netfab_bitmap->GetToolTipText();
+ m_fix_throught_netfab_bitmap->SetBitmap(tooltip.IsEmpty() ? wxNullBitmap : m_manifold_warning_bmp.bmp());
+ m_fix_throught_netfab_bitmap->SetMinSize(tooltip.IsEmpty() ? wxSize(0, 0) : m_manifold_warning_bmp.bmp().GetSize());
m_mirror_bitmap_on.msw_rescale();
m_mirror_bitmap_off.msw_rescale();