From c28eb688e55da296bef200734c37613adeda00e0 Mon Sep 17 00:00:00 2001 From: Nab <22328803+NABN00B@users.noreply.github.com> Date: Sat, 29 Aug 2026 15:31:39 +0200 Subject: [PATCH] Fix button size in SliderPopup --- Common/UI/PopupScreens.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Common/UI/PopupScreens.cpp b/Common/UI/PopupScreens.cpp index a21f9e4f4c..b8be8afea1 100644 --- a/Common/UI/PopupScreens.cpp +++ b/Common/UI/PopupScreens.cpp @@ -642,8 +642,8 @@ void SliderPopupScreen::CreatePopupContents(UI::ViewGroup *parent) { vert->Add(slider_); LinearLayout *lin = vert->Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(UI::Margins(10, 10)))); - lin->Add(new Button("", ImageID("I_MINUS")))->OnClick.Handle(this, &SliderPopupScreen::OnDecrease); - lin->Add(new Button("", ImageID("I_PLUS")))->OnClick.Handle(this, &SliderPopupScreen::OnIncrease); + lin->Add(new Button("", ImageID("I_MINUS"), new LayoutParams(60.0f, 60.0f)))->OnClick.Handle(this, &SliderPopupScreen::OnDecrease); + lin->Add(new Button("", ImageID("I_PLUS"), new LayoutParams(60.0f, 60.0f)))->OnClick.Handle(this, &SliderPopupScreen::OnIncrease); edit_ = new TextEdit("", Title(), "", new LinearLayoutParams(1.0f)); edit_->SetMaxLen(16); @@ -658,7 +658,7 @@ void SliderPopupScreen::CreatePopupContents(UI::ViewGroup *parent) { if (defaultValue_ != NO_DEFAULT_FLOAT) { auto di = GetI18NCategory(I18NCat::DIALOG); - lin->Add(new Button(di->T("Reset")))->OnClick.Add([=](UI::EventParams &) { + lin->Add(new Button(di->T("Reset"), new LayoutParams(WRAP_CONTENT, 64.0f)))->OnClick.Add([=](UI::EventParams &) { sliderValue_ = defaultValue_; changing_ = true; UpdateTextBox(); @@ -684,8 +684,8 @@ void SliderFloatPopupScreen::CreatePopupContents(UI::ViewGroup *parent) { vert->Add(slider_); LinearLayout *lin = vert->Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(UI::Margins(10, 10)))); - lin->Add(new Button("", ImageID("I_MINUS")))->OnClick.Handle(this, &SliderFloatPopupScreen::OnDecrease); - lin->Add(new Button("", ImageID("I_PLUS")))->OnClick.Handle(this, &SliderFloatPopupScreen::OnIncrease); + lin->Add(new Button("", ImageID("I_MINUS"), new LayoutParams(60.0f, 60.0f)))->OnClick.Handle(this, &SliderFloatPopupScreen::OnDecrease); + lin->Add(new Button("", ImageID("I_PLUS"), new LayoutParams(60.0f, 60.0f)))->OnClick.Handle(this, &SliderFloatPopupScreen::OnIncrease); edit_ = new TextEdit("", Title(), "", new LinearLayoutParams(1.0f)); edit_->SetMaxLen(16); @@ -701,7 +701,7 @@ void SliderFloatPopupScreen::CreatePopupContents(UI::ViewGroup *parent) { if (defaultValue_ != NO_DEFAULT_FLOAT) { auto di = GetI18NCategory(I18NCat::DIALOG); - lin->Add(new Button(di->T("Reset")))->OnClick.Add([=](UI::EventParams &) { + lin->Add(new Button(di->T("Reset"), new LayoutParams(WRAP_CONTENT, 64.0f)))->OnClick.Add([=](UI::EventParams &) { sliderValue_ = defaultValue_; if (liveUpdate_) { *value_ = defaultValue_;