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:
Diffstat (limited to 'src/slic3r/GUI/Preferences.hpp')
-rw-r--r--src/slic3r/GUI/Preferences.hpp29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/slic3r/GUI/Preferences.hpp b/src/slic3r/GUI/Preferences.hpp
index 6c8012195..f8b1d1237 100644
--- a/src/slic3r/GUI/Preferences.hpp
+++ b/src/slic3r/GUI/Preferences.hpp
@@ -3,6 +3,7 @@
#include "GUI.hpp"
#include "GUI_Utils.hpp"
+#include "wxExtensions.hpp"
#include <wx/dialog.h>
#include <wx/timer.h>
@@ -10,6 +11,7 @@
#include <map>
class wxColourPickerCtrl;
+class wxBookCtrlBase;
namespace Slic3r {
@@ -39,24 +41,29 @@ class PreferencesDialog : public DPIDialog
wxSizer* m_icon_size_sizer;
wxColourPickerCtrl* m_sys_colour {nullptr};
wxColourPickerCtrl* m_mod_colour {nullptr};
+ wxBookCtrlBase* tabs {nullptr};
+
bool isOSX {false};
bool m_settings_layout_changed {false};
bool m_seq_top_layer_only_changed{ false };
bool m_recreate_GUI{false};
public:
- explicit PreferencesDialog(wxWindow* parent, int selected_tab = 0, const std::string& highlight_opt_key = std::string());
+ explicit PreferencesDialog(wxWindow* paren);
~PreferencesDialog() = default;
bool settings_layout_changed() const { return m_settings_layout_changed; }
bool seq_top_layer_only_changed() const { return m_seq_top_layer_only_changed; }
bool recreate_GUI() const { return m_recreate_GUI; }
- void build(size_t selected_tab = 0);
+ void build();
void update_ctrls_alignment();
void accept(wxEvent&);
+ void show(const std::string& highlight_option = std::string(), const std::string& tab_name = std::string());
protected:
- void on_dpi_changed(const wxRect &suggested_rect) override;
+ void msw_rescale();
+ void on_dpi_changed(const wxRect& suggested_rect) override { msw_rescale(); }
+ void on_sys_color_changed() override;
void layout();
void create_icon_size_slider();
void create_settings_mode_widget();
@@ -64,20 +71,8 @@ protected:
void init_highlighter(const t_config_option_key& opt_key);
std::vector<ConfigOptionsGroup*> optgroups();
- struct PreferencesHighlighter
- {
- void set_timer_owner(wxEvtHandler* owner, int timerid = wxID_ANY);
- void init(std::pair<OG_CustomCtrl*, bool*>);
- void blink();
- void invalidate();
-
- private:
- OG_CustomCtrl* m_custom_ctrl{ nullptr };
- bool* m_show_blink_ptr{ nullptr };
- int m_blink_counter{ 0 };
- wxTimer m_timer;
- }
- m_highlighter;
+ HighlighterForWx m_highlighter;
+ std::map<std::string, BlinkingBitmap*> m_blinkers;
};
} // GUI