Added missed icons for the dark mode.

Fixed typos from the previous commit
This commit is contained in:
YuSanka 2020-05-22 16:59:28 +02:00
parent 180742ccaa
commit c7ef1feaf0
9 changed files with 61 additions and 8 deletions

View file

@ -97,7 +97,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
// Otherwise, MainFrame will be maximized by height
if (slNew) {
wxSize size = wxGetApp().get_min_size();
size.SetWidth(int(0.5*size.GetHeight()));
size.SetHeight(int(0.5*size.GetHeight()));
m_plater->SetMinSize(size);
m_tabpanel->SetMinSize(size);
}

View file

@ -138,7 +138,7 @@ void ObjectDataViewModelNode::update_settings_digest_bitmaps()
std::map<std::string, wxBitmap>& categories_icon = Slic3r::GUI::wxGetApp().obj_list()->CATEGORY_ICON;
std::string scaled_bitmap_name = m_name.ToUTF8().data();
scaled_bitmap_name += "-em" + std::to_string(Slic3r::GUI::wxGetApp().em_unit());
scaled_bitmap_name += "-em" + std::to_string(wxGetApp().em_unit()) + (wxGetApp().dark_mode() ? "-dm" : "");
wxBitmap *bmp = m_bitmap_cache->find(scaled_bitmap_name);
if (bmp == nullptr) {

View file

@ -578,8 +578,6 @@ void ConfigOptionsGroup::sys_color_changed()
// update undo buttons : rescale bitmaps
for (const auto& field : m_fields)
field.second->sys_color_changed();
m_grid_sizer->Layout();
}
boost::any ConfigOptionsGroup::config_value(const std::string& opt_key, int opt_index, bool deserialize) {

View file

@ -190,15 +190,13 @@ void Tab::create_preset_tab()
add_scaled_button(panel, &m_search_btn, "search");
m_search_btn->SetToolTip(format_wxstr(_L("Click to start a search or use %1% shortcut"), "Ctrl+F"));
// Determine the theme color of OS (dark or light)
auto luma = wxGetApp().get_colour_approx_luma(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
// Bitmaps to be shown on the "Revert to system" aka "Lock to system" button next to each input field.
add_scaled_bitmap(this, m_bmp_value_lock , luma >= 128 ? "lock_closed" : "lock_closed_white");
add_scaled_bitmap(this, m_bmp_value_lock , "lock_closed");
add_scaled_bitmap(this, m_bmp_value_unlock, "lock_open");
m_bmp_non_system = &m_bmp_white_bullet;
// Bitmaps to be shown on the "Undo user changes" button next to each input field.
add_scaled_bitmap(this, m_bmp_value_revert, "undo");
add_scaled_bitmap(this, m_bmp_white_bullet, luma >= 128 ? "dot" : "dot_white");
add_scaled_bitmap(this, m_bmp_white_bullet, "dot");
fill_icon_descriptions();
set_tooltips_text();