fix(stable): wx 3.3.2 StateHandler::attach Initialisiererlisten-Ambiguität (10 Dateien)

This commit is contained in:
thysson2701
2026-06-11 22:34:40 +02:00
parent 79e1060bde
commit e8895c16f3
10 changed files with 10 additions and 10 deletions

View File

@@ -44,7 +44,7 @@ bool TabButton::Create(wxWindow *parent, wxString text, ScalableBitmap &bmp, lon
{
StaticBox::Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, style);
newtag_img = ScalableBitmap(this, "monitor_hms_new",7);
state_handler.attach({&text_color, &border_color});
state_handler.attach(std::vector<StateColor const*>{&text_color, &border_color});
state_handler.update_binds();
//BBS set default font
SetFont(Label::Body_14);

View File

@@ -56,7 +56,7 @@ AxisCtrlButton::AxisCtrlButton(wxWindow *parent, ScalableBitmap &icon, long stly
inner_background_color.append(BUTTON_IN_BG_COL, StateColor::Normal);
inner_background_color.append(BUTTON_IN_BG_COL, StateColor::Enabled);
state_handler.attach({ &border_color, &background_color });
state_handler.attach(std::vector<StateColor const*>{ &border_color, &background_color });
state_handler.update_binds();
}

View File

@@ -48,7 +48,7 @@ Button::Button(wxWindow* parent, wxString text, wxString icon, long style, int i
bool Button::Create(wxWindow* parent, wxString text, wxString icon, long style, int iconSize, wxWindowID btn_id)
{
StaticBox::Create(parent, btn_id, wxDefaultPosition, wxDefaultSize, style);
state_handler.attach({&text_color});
state_handler.attach(std::vector<StateColor const*>{&text_color});
state_handler.update_binds();
//BBS set default font
SetFont(Label::Body_14);

View File

@@ -57,7 +57,7 @@ void DropDown::Create(wxWindow *parent, long style)
PopupWindow::Create(parent, wxPU_CONTAINS_CONTROLS);
SetBackgroundStyle(wxBG_STYLE_PAINT);
SetBackgroundColour(*wxWHITE);
state_handler.attach({&border_color, &text_color, &selector_border_color, &selector_background_color});
state_handler.attach(std::vector<StateColor const*>{&border_color, &text_color, &selector_border_color, &selector_background_color});
state_handler.update_binds();
if ((style & DD_NO_CHECK_ICON) == 0)
check_bitmap = ScalableBitmap(this, "checked", 16);

View File

@@ -66,7 +66,7 @@ bool LabeledStaticBox::Create(
PickDC(dc);
}));
state_handler.attach({&text_color, &background_color, &border_color});
state_handler.attach(std::vector<StateColor const*>{&text_color, &background_color, &border_color});
state_handler.update_binds();
#ifndef __WXOSX__
SetBackgroundStyle(wxBG_STYLE_PAINT);

View File

@@ -45,7 +45,7 @@ SideButton::SideButton(wxWindow* parent, wxString text, wxString icon, long stly
SetBottomColour(wxColour("#3B4446"));
state_handler.attach({ &border_color, &text_color, &background_color });
state_handler.attach(std::vector<StateColor const*>{ &border_color, &text_color, &background_color });
state_handler.update_binds();
// icon only

View File

@@ -55,7 +55,7 @@ void SpinInput::Create(wxWindow *parent,
StaticBox::Create(parent, wxID_ANY, pos, size);
SetFont(Label::Body_12);
wxWindow::SetLabel(label);
state_handler.attach({&label_color, &text_color});
state_handler.attach(std::vector<StateColor const*>{&label_color, &text_color});
state_handler.update_binds();
text_ctrl = new TextCtrl(this, wxID_ANY, text, {20, 4}, wxDefaultSize, style | wxBORDER_NONE | wxTE_PROCESS_ENTER, wxTextValidator(wxFILTER_DIGITS));
text_ctrl->SetFont(Label::Body_14);

View File

@@ -40,7 +40,7 @@ bool StaticBox::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, cons
if (style & wxBORDER_NONE)
border_width = 0;
wxWindow::Create(parent, id, pos, size, style);
state_handler.attach({&border_color, &background_color, &background_color2});
state_handler.attach(std::vector<StateColor const*>{&border_color, &background_color, &background_color2});
state_handler.update_binds();
SetBackgroundColour(GetParentBackgroundColor(parent));
return true;

View File

@@ -84,7 +84,7 @@ void TempInput::Create(wxWindow *parent, wxString text, wxString label, wxString
StaticBox::Create(parent, wxID_ANY, pos, size, style);
wxWindow::SetLabel(label);
style &= ~wxALIGN_CENTER_HORIZONTAL;
state_handler.attach({&label_color, &text_color});
state_handler.attach(std::vector<StateColor const*>{&label_color, &text_color});
state_handler.update_binds();
text_ctrl = new wxTextCtrl(this, wxID_ANY, text, {5, 5}, wxDefaultSize, wxTE_PROCESS_ENTER | wxBORDER_NONE, wxTextValidator(wxFILTER_NUMERIC), wxTextCtrlNameStr);
text_ctrl->SetBackgroundColour(StateColor::darkModeColorFor(*wxWHITE));

View File

@@ -57,7 +57,7 @@ void TextInput::Create(wxWindow * parent,
wxWindow::SetLabel(label);
assert((style & wxRIGHT) == 0);
style &= ~wxALIGN_MASK;
state_handler.attach({&label_color, & text_color});
state_handler.attach(std::vector<StateColor const*>{&label_color, & text_color});
state_handler.update_binds();
text_ctrl = new TextCtrl(this, wxID_ANY, text, {4, 4}, wxDefaultSize, style | wxBORDER_NONE | wxTE_PROCESS_ENTER);
text_ctrl->SetFont(Label::Body_14);