mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
DarkMode for MSW (#6632)
* MSW specific: Dark Mode: First implementation * Use menu instead of NoteBook * Implemented MessageDialog + Fixed DarkMode for all dialogs and ColorPicker * MSW DarkMode: Added missed updates for the switching between modes * MSW DarkMode: Updated all existed context menus after switching of the mode + Added markers for the menu item witch is related to the selected tab * Used wxFrame instead of wxDialog for SettingsDialog (this change allow us to use menu bar in SettingsDialog) + fix for #6548 - Prusa Slicer 2.3.1 not activating non-modal settings window if settings window is minimized * Implemented "Always use Dark mode colors" preference option * Fixes for non_MSW build * Next fixes for non-MSW builds * Preferences: Fixed selection of the Settings Layout for non-MSW platforms + Updated DarkMode for colorpickers * Windows DarkMode next fixes * MSWDarkMode: Suppress to use system color to the PrusaSlicer Select "Preferences -> Use Dark color mode (experimental)" to allow dark mode for the application * Fixed MSW build * MSWDarkMode: Upadteed color mode for ExtruderSequenceDialog and for dialogs related to the DoubleSlider * Implemented Auto recreation of the PrusaSlicer when color mode is changed. * Preferences: Added option "Set settings tabs as menu items (experimental)"
This commit is contained in:
parent
65f440c2ba
commit
fd071421cb
66 changed files with 2011 additions and 443 deletions
|
@ -20,7 +20,8 @@
|
|||
class wxMenuItem;
|
||||
class wxMenuBar;
|
||||
class wxTopLevelWindow;
|
||||
class wxNotebook;
|
||||
class wxDataViewCtrl;
|
||||
class wxBookCtrlBase;
|
||||
struct wxLanguageInfo;
|
||||
|
||||
namespace Slic3r {
|
||||
|
@ -118,6 +119,13 @@ private:
|
|||
wxColour m_color_label_modified;
|
||||
wxColour m_color_label_sys;
|
||||
wxColour m_color_label_default;
|
||||
wxColour m_color_window_default;
|
||||
#ifdef _WIN32
|
||||
wxColour m_color_highlight_label_default;
|
||||
wxColour m_color_hovered_btn_label;
|
||||
wxColour m_color_highlight_default;
|
||||
//bool m_force_sys_colors_update { false }; // #ysDarkMSW - Use to force dark colors for SystemLightMode
|
||||
#endif
|
||||
|
||||
wxFont m_small_font;
|
||||
wxFont m_bold_font;
|
||||
|
@ -170,6 +178,14 @@ public:
|
|||
void init_label_colours();
|
||||
void update_label_colours_from_appconfig();
|
||||
void update_label_colours();
|
||||
// update color mode for window
|
||||
void UpdateDarkUI(wxWindow *window, bool highlited = false, bool just_font = false);
|
||||
// update color mode for whole dialog including all children
|
||||
void UpdateDlgDarkUI(wxDialog* dlg);
|
||||
// update color mode for DataViewControl
|
||||
void UpdateDVCDarkUI(wxDataViewCtrl* dvc, bool highlited = false);
|
||||
// update color mode for panel including all static texts controls
|
||||
void UpdateAllStaticTextDarkUI(wxWindow* parent);
|
||||
void init_fonts();
|
||||
void update_fonts(const MainFrame *main_frame = nullptr);
|
||||
void set_label_clr_modified(const wxColour& clr);
|
||||
|
@ -178,6 +194,14 @@ public:
|
|||
const wxColour& get_label_clr_modified(){ return m_color_label_modified; }
|
||||
const wxColour& get_label_clr_sys() { return m_color_label_sys; }
|
||||
const wxColour& get_label_clr_default() { return m_color_label_default; }
|
||||
const wxColour& get_window_default_clr(){ return m_color_window_default; }
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
const wxColour& get_label_highlight_clr() { return m_color_highlight_label_default; }
|
||||
const wxColour& get_highlight_default_clr() { return m_color_highlight_default; }
|
||||
// void force_sys_colors_update() { m_force_sys_colors_update = true; } // #ysDarkMSW - Use to force dark colors for SystemLightMode
|
||||
#endif
|
||||
|
||||
const wxFont& small_font() { return m_small_font; }
|
||||
const wxFont& bold_font() { return m_bold_font; }
|
||||
|
@ -256,7 +280,7 @@ public:
|
|||
|
||||
PresetUpdater* get_preset_updater() { return preset_updater; }
|
||||
|
||||
wxNotebook* tab_panel() const ;
|
||||
wxBookCtrlBase* tab_panel() const ;
|
||||
int extruders_cnt() const;
|
||||
int extruders_edited_cnt() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue