PrusaSlicer-NonPlainar/src/slic3r/GUI/Preferences.hpp
YuSanka 3c996111aa Layouts:
1. Fixed crash on OSX after change of the settings layout (PreferencesDialog should be destroyed before call of recreate_GUI)
2. Fixed dialog message during GUI recreation
3. In PreferencesDialog changed radio buttons view (under OSX they were bold)
4. slDlg mode - fixed switching between main frame and settings dialog (dialog->SetFocus() doesn't work under OSX, so we just hide it and show again)
2020-05-07 15:37:18 +02:00

48 lines
1.1 KiB
C++

#ifndef slic3r_Preferences_hpp_
#define slic3r_Preferences_hpp_
#include "GUI.hpp"
#include "GUI_Utils.hpp"
#include <wx/dialog.h>
#include <map>
class wxRadioBox;
namespace Slic3r {
namespace GUI {
class ConfigOptionsGroup;
class PreferencesDialog : public DPIDialog
{
std::map<std::string, std::string> m_values;
std::shared_ptr<ConfigOptionsGroup> m_optgroup_general;
std::shared_ptr<ConfigOptionsGroup> m_optgroup_camera;
std::shared_ptr<ConfigOptionsGroup> m_optgroup_gui;
wxSizer* m_icon_size_sizer;
wxRadioBox* m_layout_mode_box;
bool isOSX {false};
bool m_settings_layout_changed {false};
public:
PreferencesDialog(wxWindow* parent);
~PreferencesDialog() {}
bool settings_layout_changed() { return m_settings_layout_changed; }
void build();
void accept();
protected:
void on_dpi_changed(const wxRect &suggested_rect) override;
void layout();
void create_icon_size_slider();
void create_settings_mode_widget();
};
} // GUI
} // Slic3r
#endif /* slic3r_Preferences_hpp_ */