mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 10:11:10 -06:00
Preferences Highlighter
This commit is contained in:
parent
aecd7e2b93
commit
ffc29a2536
6 changed files with 92 additions and 6 deletions
|
|
@ -20,6 +20,7 @@ namespace Slic3r {
|
|||
namespace GUI {
|
||||
|
||||
class ConfigOptionsGroup;
|
||||
class OG_CustomCtrl;
|
||||
|
||||
class PreferencesDialog : public DPIDialog
|
||||
{
|
||||
|
|
@ -39,7 +40,7 @@ class PreferencesDialog : public DPIDialog
|
|||
bool m_recreate_GUI{false};
|
||||
|
||||
public:
|
||||
explicit PreferencesDialog(wxWindow* parent, int selected_tab = 0);
|
||||
explicit PreferencesDialog(wxWindow* parent, int selected_tab = 0, const std::string& highlight_opt_key = std::string());
|
||||
~PreferencesDialog() = default;
|
||||
|
||||
bool settings_layout_changed() const { return m_settings_layout_changed; }
|
||||
|
|
@ -55,6 +56,22 @@ protected:
|
|||
void create_icon_size_slider();
|
||||
void create_settings_mode_widget();
|
||||
void create_settings_text_color_widget();
|
||||
void init_highlighter(const t_config_option_key& opt_key);
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
} // GUI
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue