OrcaSlicer/src/slic3r/GUI/GUI_ObjectSettings.hpp
Oleksandra Yushchenko fd071421cb
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)"
2021-06-18 19:46:04 +02:00

65 lines
1.8 KiB
C++

#ifndef slic3r_GUI_ObjectSettings_hpp_
#define slic3r_GUI_ObjectSettings_hpp_
#include <memory>
#include <vector>
#include <wx/panel.h>
#include "wxExtensions.hpp"
class wxBoxSizer;
namespace Slic3r {
class DynamicPrintConfig;
class ModelConfig;
namespace GUI {
class ConfigOptionsGroup;
class OG_Settings
{
protected:
std::shared_ptr<ConfigOptionsGroup> m_og;
wxWindow* m_parent;
public:
OG_Settings(wxWindow* parent, const bool staticbox);
virtual ~OG_Settings() {}
virtual bool IsShown();
virtual void Show(const bool show);
virtual void Hide();
virtual void UpdateAndShow(const bool show);
virtual wxSizer* get_sizer();
ConfigOptionsGroup* get_og() { return m_og.get(); }
wxWindow* parent() const {return m_parent; }
};
class ObjectSettings : public OG_Settings
{
// sizer for extra Object/Part's settings
wxBoxSizer* m_settings_list_sizer{ nullptr };
// option groups for settings
std::vector <std::shared_ptr<ConfigOptionsGroup>> m_og_settings;
ScalableBitmap m_bmp_delete;
ScalableBitmap m_bmp_delete_focus;
public:
ObjectSettings(wxWindow* parent);
~ObjectSettings() {}
bool update_settings_list();
/* Additional check for override options: Add options, if its needed.
* Example: if Infill is set to 100%, and Fill Pattern is missed in config_to,
* we should add fill_pattern to avoid endless loop in update
*/
bool add_missed_options(ModelConfig *config_to, const DynamicPrintConfig &config_from);
void update_config_values(ModelConfig *config);
void UpdateAndShow(const bool show) override;
void msw_rescale();
void sys_color_changed();
};
}}
#endif // slic3r_GUI_ObjectSettings_hpp_