mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-03 18:27:59 -05:00
LabeledCheckBox class (#15761)
* init * extend feature set * update * fix tidy * fix tidy * Update calib_dlg.cpp * simplify class * update * align labels with RadioGroup * replace ImportCheckBox * Update LabeledCheckBox.cpp * apply to more dialog * add to ai skills * update * fix Tooltip only reaches the children on the first call * fix Label can stay grey after a theme switch * Update release dialog * change focus target for all platforms --------- Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
1 parent
f5305fa542
commit
ff93256eff
31 files changed
+671
-337
No files matched your search
@@ -23,7 +23,7 @@
|
||||
#include <exception>
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include "slic3r/GUI/Widgets/HyperLink.hpp"
|
||||
#include "slic3r/GUI/Widgets/CheckBox.hpp"
|
||||
#include "slic3r/GUI/Widgets/LabeledCheckBox.hpp"
|
||||
#include <sstream>
|
||||
#include <ios>
|
||||
#include <iomanip>
|
||||
@@ -54,7 +54,6 @@
|
||||
#include <wx/simplebook.h>
|
||||
#include <wx/webview.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/tglbtn.h>
|
||||
#include <wx/webrequest.h>
|
||||
#include <wx/timer.h>
|
||||
#include "Plater.hpp"
|
||||
@@ -382,16 +381,14 @@ UpdateVersionDialog::UpdateVersionDialog(wxWindow *parent)
|
||||
EndModal(wxID_NO);
|
||||
});
|
||||
|
||||
m_cb_stable_only = new CheckBox(this);
|
||||
m_cb_stable_only = new LabeledCheckBox(this, _L("Check for stable updates only"));
|
||||
m_cb_stable_only->SetFont(Label::Body_12);
|
||||
m_cb_stable_only->SetValue(wxGetApp().app_config->get_bool("check_stable_update_only"));
|
||||
m_cb_stable_only->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent& e) {
|
||||
m_cb_stable_only->Bind(wxEVT_CHECKBOX, [this](wxCommandEvent& e) {
|
||||
wxGetApp().app_config->set_bool("check_stable_update_only", m_cb_stable_only->GetValue());
|
||||
e.Skip();
|
||||
});
|
||||
|
||||
auto stable_only_label = new Label(this, _L("Check for stable updates only"));
|
||||
stable_only_label->SetFont(Label::Body_12);
|
||||
|
||||
m_button_cancel = new Button(this, _L("Cancel"));
|
||||
m_button_cancel->SetStyle(ButtonStyle::Regular, ButtonType::Choice);
|
||||
|
||||
@@ -402,7 +399,6 @@ UpdateVersionDialog::UpdateVersionDialog(wxWindow *parent)
|
||||
//sizer_button->Add(m_remind_choice, 0, wxALL | wxEXPAND, FromDIP(5));
|
||||
|
||||
sizer_button->Add(m_cb_stable_only , 0, wxALIGN_CENTER);
|
||||
sizer_button->Add(stable_only_label , 0, wxALIGN_CENTER | wxLEFT, FromDIP(5));
|
||||
sizer_button->AddStretchSpacer();
|
||||
sizer_button->Add(m_button_download , 0, wxLEFT, FromDIP(10));
|
||||
sizer_button->Add(m_button_skip_version, 0, wxLEFT, FromDIP(10));
|
||||
@@ -600,8 +596,8 @@ SecondaryCheckDialog::SecondaryCheckDialog(wxWindow* parent, wxWindowID id, cons
|
||||
|
||||
if (not_show_again_check) {
|
||||
auto checkbox_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_show_again_checkbox = new wxCheckBox(this, wxID_ANY, _L("Don't show again"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_show_again_checkbox->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, [this](wxCommandEvent& e) {
|
||||
m_show_again_checkbox = new LabeledCheckBox(this, _L("Don't show again"));
|
||||
m_show_again_checkbox->Bind(wxEVT_CHECKBOX, [this](wxCommandEvent& e) {
|
||||
not_show_again = !not_show_again;
|
||||
m_show_again_checkbox->SetValue(not_show_again);
|
||||
});
|
||||
@@ -1184,8 +1180,8 @@ ConfirmBeforeSendDialog::ConfirmBeforeSendDialog(wxWindow* parent, wxWindowID id
|
||||
|
||||
if (not_show_again_check) {
|
||||
auto checkbox_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_show_again_checkbox = new wxCheckBox(this, wxID_ANY, _L("Don't show again"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_show_again_checkbox->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, [this](wxCommandEvent& e) {
|
||||
m_show_again_checkbox = new LabeledCheckBox(this, _L("Don't show again"));
|
||||
m_show_again_checkbox->Bind(wxEVT_CHECKBOX, [this](wxCommandEvent& e) {
|
||||
not_show_again = !not_show_again;
|
||||
m_show_again_checkbox->SetValue(not_show_again);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user