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-07-29 16:13:17 +0300
committerYuSanka <yusanka@gmail.com>2019-07-29 16:14:25 +0300
commite469ee76b827c41a4d7cc6ea81562dcfa6e5d3e1 (patch)
tree572b3adcc600ef39a859246b5374f7e345afe340 /src/slic3r/GUI/GUI_ObjectSettings.cpp
parentfca2fc0d973741eb8472601328dbc9a344c8fdc3 (diff)
Implemented a highlighting of the delete button for setting (related to #1767)
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectSettings.cpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectSettings.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectSettings.cpp b/src/slic3r/GUI/GUI_ObjectSettings.cpp
index 78c64e03e..19a0e785c 100644
--- a/src/slic3r/GUI/GUI_ObjectSettings.cpp
+++ b/src/slic3r/GUI/GUI_ObjectSettings.cpp
@@ -61,6 +61,7 @@ ObjectSettings::ObjectSettings(wxWindow* parent) :
m_og->sizer->Add(m_settings_list_sizer, 1, wxEXPAND | wxLEFT, 5);
m_bmp_delete = ScalableBitmap(parent, "cross");
+ m_bmp_delete_focus = ScalableBitmap(parent, "cross_focus");
}
bool ObjectSettings::update_settings_list()
@@ -92,6 +93,9 @@ bool ObjectSettings::update_settings_list()
auto btn = new ScalableButton(parent, wxID_ANY, m_bmp_delete);
btn->SetToolTip(_(L("Remove parameter")));
+ btn->SetBitmapFocus(m_bmp_delete_focus.bmp());
+ btn->SetBitmapHover(m_bmp_delete_focus.bmp());
+
btn->Bind(wxEVT_BUTTON, [opt_key, config, this](wxEvent &event) {
wxGetApp().plater()->take_snapshot(wxString::Format(_(L("Delete Option %s")), opt_key));
config->erase(opt_key);
@@ -122,6 +126,8 @@ bool ObjectSettings::update_settings_list()
if (ctrl == nullptr)
return;
ctrl->SetBitmap_(m_bmp_delete);
+ ctrl->SetBitmapFocus(m_bmp_delete_focus.bmp());
+ ctrl->SetBitmapHover(m_bmp_delete_focus.bmp());
};
const bool is_extruders_cat = cat.first == "Extruders";
@@ -166,6 +172,7 @@ void ObjectSettings::UpdateAndShow(const bool show)
void ObjectSettings::msw_rescale()
{
m_bmp_delete.msw_rescale();
+ m_bmp_delete_focus.msw_rescale();
for (auto group : m_og_settings)
group->msw_rescale();