diff options
author | YuSanka <yusanka@gmail.com> | 2019-04-14 00:46:52 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2019-04-14 00:46:52 +0300 |
commit | f7ddddcff58b1c3de8740c70e3c297f2734602f5 (patch) | |
tree | 6b268b6e57b89de8a107720f538ed74149d3c3d2 /src/slic3r/GUI/OptionsGroup.hpp | |
parent | a74c608c7a8eda5c2b5593db7236a6f89374e7f5 (diff) |
Application Scaling for MSW: Next big step
- Added rescale() function for the most of controls
- Created PrusaBitmap and PrusaButton classes like a wrap to wxBitmap and wxButton accordingly
Diffstat (limited to 'src/slic3r/GUI/OptionsGroup.hpp')
-rw-r--r-- | src/slic3r/GUI/OptionsGroup.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/slic3r/GUI/OptionsGroup.hpp b/src/slic3r/GUI/OptionsGroup.hpp index dbe1ea1a2..34f571603 100644 --- a/src/slic3r/GUI/OptionsGroup.hpp +++ b/src/slic3r/GUI/OptionsGroup.hpp @@ -72,7 +72,7 @@ private: std::vector<widget_t> m_extra_widgets;//! {std::vector<widget_t>()}; }; -using column_t = std::function<wxWindow*(wxWindow* parent, const Line&)>;//std::function<wxSizer*(const Line&)>; +using column_t = std::function<wxWindow*(wxWindow* parent, const Line&)>; using t_optionfield_map = std::map<t_config_option_key, t_field>; using t_opt_map = std::map< std::string, std::pair<std::string, int> >; @@ -82,9 +82,10 @@ class OptionsGroup { public: const bool staticbox {true}; const wxString title {wxString("")}; - size_t label_width = 20 * wxGetApp().em_unit();// {200}; + size_t label_width = 20 ;// {200}; wxSizer* sizer {nullptr}; column_t extra_column {nullptr}; + std::function<void(wxWindow* win)> rescale_extra_column { nullptr }; t_change m_on_change { nullptr }; t_kill_focus m_fill_empty_value { nullptr }; t_kill_focus m_set_focus { nullptr }; @@ -191,6 +192,7 @@ protected: std::map<t_config_option_key, Option> m_options; wxWindow* m_parent {nullptr}; std::vector<ConfigOptionMode> m_options_mode; + std::vector<wxWindow*> m_extra_column_ptrs; /// Field list, contains unique_ptrs of the derived type. /// using types that need to know what it is beyond the public interface @@ -259,6 +261,7 @@ public: void Hide(); void Show(const bool show); bool update_visibility(ConfigOptionMode mode); + void rescale(); boost::any config_value(const std::string& opt_key, int opt_index, bool deserialize); // return option value from config boost::any get_config_value(const DynamicPrintConfig& config, const std::string& opt_key, int opt_index = -1); |