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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2018-04-23 11:27:42 +0300
committerYuSanka <yusanka@gmail.com>2018-04-23 11:27:42 +0300
commit9a1dbfa6cf4fbef9c9ad92972f23aa246c9d6701 (patch)
treeeaef4afac188f8693278abbc176348a857af0e40 /xs/src/slic3r/GUI/Tab.cpp
parentb8cb9369732757f427c264181d49e50a0f943237 (diff)
Updated action_undo.png icon and added sys_unlock_grey.png & action_undo_grey.png for dark themes of OS
Diffstat (limited to 'xs/src/slic3r/GUI/Tab.cpp')
-rw-r--r--xs/src/slic3r/GUI/Tab.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp
index 2b82694db..e15767329 100644
--- a/xs/src/slic3r/GUI/Tab.cpp
+++ b/xs/src/slic3r/GUI/Tab.cpp
@@ -126,13 +126,15 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle)
m_question_btn->SetToolTip(_(L("Hover the cursor over buttons to find more information.")));
+ // Determine the theme color of OS (dark or light)
+ auto luma = 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.
m_bmp_value_lock .LoadFile(from_u8(var("sys_lock.png")), wxBITMAP_TYPE_PNG);
- m_bmp_value_unlock .LoadFile(from_u8(var("sys_unlock.png")), wxBITMAP_TYPE_PNG);
+ m_bmp_value_unlock .LoadFile(from_u8(var(luma >= 128 ? "sys_unlock.png" : "sys_unlock_grey.png")), wxBITMAP_TYPE_PNG);
m_bmp_non_system = &m_bmp_white_bullet;
// Bitmaps to be shown on the "Undo user changes" button next to each input field.
- m_bmp_value_revert .LoadFile(from_u8(var("action_undo.png")), wxBITMAP_TYPE_PNG);
- m_bmp_white_bullet .LoadFile(from_u8(var("bullet_white.png")), wxBITMAP_TYPE_PNG);
+ m_bmp_value_revert .LoadFile(from_u8(var(luma >= 128 ? "action_undo.png" : "action_undo_grey.png")), wxBITMAP_TYPE_PNG);
+ m_bmp_white_bullet .LoadFile(from_u8(var("bullet_white.png")), wxBITMAP_TYPE_PNG);
m_bmp_question .LoadFile(from_u8(var("question_mark_01.png")), wxBITMAP_TYPE_PNG);
fill_icon_descriptions();