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
|
@ -19,6 +19,7 @@
|
|||
#include "UnsavedChangesDialog.hpp"
|
||||
|
||||
class wxNotebook;
|
||||
class wxBookCtrlBase;
|
||||
class wxProgressDialog;
|
||||
|
||||
namespace Slic3r {
|
||||
|
@ -52,14 +53,16 @@ struct PresetTab {
|
|||
// SettingsDialog
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class SettingsDialog : public DPIDialog
|
||||
class SettingsDialog : public DPIFrame//DPIDialog
|
||||
{
|
||||
wxNotebook* m_tabpanel { nullptr };
|
||||
MainFrame* m_main_frame { nullptr };
|
||||
wxBookCtrlBase* m_tabpanel { nullptr };
|
||||
MainFrame* m_main_frame { nullptr };
|
||||
wxMenuBar* m_menubar{ nullptr };
|
||||
public:
|
||||
SettingsDialog(MainFrame* mainframe);
|
||||
~SettingsDialog() = default;
|
||||
void set_tabpanel(wxNotebook* tabpanel) { m_tabpanel = tabpanel; }
|
||||
void set_tabpanel(wxBookCtrlBase* tabpanel) { m_tabpanel = tabpanel; }
|
||||
wxMenuBar* menubar() { return m_menubar; }
|
||||
|
||||
protected:
|
||||
void on_dpi_changed(const wxRect& suggested_rect) override;
|
||||
|
@ -80,8 +83,6 @@ class MainFrame : public DPIFrame
|
|||
wxMenuItem* m_menu_item_reslice_now { nullptr };
|
||||
wxSizer* m_main_sizer{ nullptr };
|
||||
|
||||
|
||||
|
||||
size_t m_last_selected_tab;
|
||||
|
||||
std::string get_base_name(const wxString &full_name, const char *extension = nullptr) const;
|
||||
|
@ -161,7 +162,9 @@ public:
|
|||
void init_menubar_as_editor();
|
||||
void init_menubar_as_gcodeviewer();
|
||||
void update_menubar();
|
||||
|
||||
#ifdef _WIN32
|
||||
void show_tabs_menu(bool show);
|
||||
#endif
|
||||
void update_ui_from_settings();
|
||||
bool is_loaded() const { return m_loaded; }
|
||||
bool is_last_input_file() const { return !m_qs_last_input_file.IsEmpty(); }
|
||||
|
@ -194,11 +197,12 @@ public:
|
|||
#endif // ENABLE_PROJECT_DIRTY_STATE
|
||||
|
||||
void add_to_recent_projects(const wxString& filename);
|
||||
void technology_changed();
|
||||
|
||||
PrintHostQueueDialog* printhost_queue_dlg() { return m_printhost_queue_dlg; }
|
||||
|
||||
Plater* m_plater { nullptr };
|
||||
wxNotebook* m_tabpanel { nullptr };
|
||||
wxBookCtrlBase* m_tabpanel { nullptr };
|
||||
SettingsDialog m_settings_dialog;
|
||||
DiffPresetDialog diff_dialog;
|
||||
wxWindow* m_plater_page{ nullptr };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue