mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 05:37:52 -06:00
Hint notification
Reads data from hints.ini. Has hyperlinks to highlight settings, toolbars and gizmos.
This commit is contained in:
parent
7fd34e52c1
commit
0d74502aeb
29 changed files with 2116 additions and 197 deletions
|
@ -11,14 +11,14 @@
|
|||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
PreferencesDialog::PreferencesDialog(wxWindow* parent) :
|
||||
PreferencesDialog::PreferencesDialog(wxWindow* parent, int selected_tab) :
|
||||
DPIDialog(parent, wxID_ANY, _L("Preferences"), wxDefaultPosition,
|
||||
wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
|
||||
{
|
||||
#ifdef __WXOSX__
|
||||
isOSX = true;
|
||||
#endif
|
||||
build();
|
||||
build(selected_tab);
|
||||
}
|
||||
|
||||
static std::shared_ptr<ConfigOptionsGroup>create_options_tab(const wxString& title, wxBookCtrlBase* tabs)
|
||||
|
@ -44,7 +44,7 @@ static void activate_options_tab(std::shared_ptr<ConfigOptionsGroup> optgroup)
|
|||
sizer->Add(optgroup->sizer, 0, wxEXPAND | wxALL, 10);
|
||||
}
|
||||
|
||||
void PreferencesDialog::build()
|
||||
void PreferencesDialog::build(size_t selected_tab)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
wxGetApp().UpdateDarkUI(this);
|
||||
|
@ -349,13 +349,20 @@ void PreferencesDialog::build()
|
|||
option = Option(def, "tabs_as_menu");
|
||||
m_optgroup_gui->append_single_option_line(option);
|
||||
#endif
|
||||
|
||||
def.label = L("Show \"Did you know\" hints after start");
|
||||
def.type = coBool;
|
||||
def.tooltip = L("If enabled, useful hints are displayed at startup.");
|
||||
def.set_default_value(new ConfigOptionBool{ app_config->get("show_hints") == "1" });
|
||||
option = Option(def, "show_hints");
|
||||
m_optgroup_gui->append_single_option_line(option);
|
||||
|
||||
def.label = L("Use custom size for toolbar icons");
|
||||
def.type = coBool;
|
||||
def.tooltip = L("If enabled, you can change size of toolbar icons manually.");
|
||||
def.set_default_value(new ConfigOptionBool{ app_config->get("use_custom_toolbar_size") == "1" });
|
||||
option = Option(def, "use_custom_toolbar_size");
|
||||
m_optgroup_gui->append_single_option_line(option);
|
||||
m_optgroup_gui->append_single_option_line(option);
|
||||
}
|
||||
|
||||
activate_options_tab(m_optgroup_gui);
|
||||
|
@ -387,6 +394,9 @@ void PreferencesDialog::build()
|
|||
}
|
||||
#endif // ENABLE_ENVIRONMENT_MAP
|
||||
|
||||
if (selected_tab < tabs->GetPageCount())
|
||||
tabs->SetSelection(selected_tab);
|
||||
|
||||
auto sizer = new wxBoxSizer(wxVERTICAL);
|
||||
sizer->Add(tabs, 1, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue