From 9a1dbfa6cf4fbef9c9ad92972f23aa246c9d6701 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 23 Apr 2018 10:27:42 +0200 Subject: [PATCH] Updated action_undo.png icon and added sys_unlock_grey.png & action_undo_grey.png for dark themes of OS --- lib/Slic3r/GUI/Plater.pm | 2 -- resources/icons/action_undo.png | Bin 491 -> 510 bytes resources/icons/action_undo_grey.png | Bin 0 -> 480 bytes resources/icons/sys_unlock_grey.png | Bin 0 -> 423 bytes xs/src/slic3r/GUI/Tab.cpp | 8 +++++--- 5 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 resources/icons/action_undo_grey.png create mode 100644 resources/icons/sys_unlock_grey.png diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 023ec4ae5..893cc366b 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -546,8 +546,6 @@ sub _on_select_preset { wxTheApp->{preset_bundle}->update_platter_filament_ui($idx, $choice); } else { my $selected_item = $choice->GetSelection(); - print ("selected_item = $selected_item\n"); - print ("selected_item_$group = ". $self->{"selected_item_$group"}. "\n"); return if ($selected_item == $self->{"selected_item_$group"}); my $selected_string = $choice->GetString($selected_item); diff --git a/resources/icons/action_undo.png b/resources/icons/action_undo.png index 877f159868640a0399143631438313a31dacf1a1..06bb98b22a6d98e035059205bc4cc35f5164443f 100644 GIT binary patch delta 434 zcmV;j0Zsnv1O5Y$R)3R8L_t(IPnDCqO9Md=#$)0mf`WyextrNXE|AhR0g-^EwdoXW zt!!-dK(Me7dmH}=D?7Edw6IVD#zH|%p&-5zzgcr3xyvCA40}8G&2MM+<}zUzX6yBO zF7BBW>(@xG3)E`0(YTA)klL4Z*n4qzP#jRHRK_Gp`|8ZFYJdC}kSC%UtZIA-t9V$Y+zjoifGbbX@YMRcbW>K%YmhN6?)*X4=*|x7LP<} c9)@A|2OVI(RMldGuK)l507*qoM6N<$f{oS4Pyhe` delta 415 zc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UI/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();