Preferences: notify_relese option with Choice type Field.

OptionsGroup:: Added possibility of the right alignment of the controls
+ Added separator line to Preferences
This commit is contained in:
David Kocik 2021-10-13 15:36:07 +02:00
parent 405a7e84d6
commit ac6259e387
9 changed files with 275 additions and 66 deletions

View file

@ -33,6 +33,8 @@ class OG_CustomCtrl :public wxPanel
wxSize m_bmp_mode_sz;
wxSize m_bmp_blinking_sz;
int m_max_win_width{0};
struct CtrlLine {
wxCoord height { wxDefaultCoord };
OG_CustomCtrl* ctrl { nullptr };
@ -50,16 +52,20 @@ class OG_CustomCtrl :public wxPanel
bool draw_mode_bitmap = true);
~CtrlLine() { ctrl = nullptr; }
int get_max_win_width();
void correct_items_positions();
void msw_rescale();
void update_visibility(ConfigOptionMode mode);
void render_separator(wxDC& dc, wxCoord v_pos);
void render(wxDC& dc, wxCoord v_pos);
wxCoord draw_mode_bmp(wxDC& dc, wxCoord v_pos);
wxCoord draw_text (wxDC& dc, wxPoint pos, const wxString& text, const wxColour* color, int width, bool is_url = false);
wxPoint draw_blinking_bmp(wxDC& dc, wxPoint pos, bool is_blinking);
wxCoord draw_act_bmps(wxDC& dc, wxPoint pos, const wxBitmap& bmp_undo_to_sys, const wxBitmap& bmp_undo, bool is_blinking, size_t rect_id = 0);
bool launch_browser() const;
bool is_separator() const { return og_line.is_separator(); }
std::vector<wxRect> rects_undo_icon;
std::vector<wxRect> rects_undo_to_sys_icon;
@ -86,6 +92,9 @@ public:
bool update_visibility(ConfigOptionMode mode);
void correct_window_position(wxWindow* win, const Line& line, Field* field = nullptr);
void correct_widgets_position(wxSizer* widget, const Line& line, Field* field = nullptr);
void init_max_win_width();
void set_max_win_width(int max_win_width);
int get_max_win_width() { return m_max_win_width; }
void msw_rescale();
void sys_color_changed();