From b2d7ea11f579df04a1db497765d38fff955753ed Mon Sep 17 00:00:00 2001 From: Satori Date: Sat, 26 Sep 2020 23:26:37 +0100 Subject: [PATCH] [Qt] Add constructor to XCheckBox that takes a text parameter --- src/xenia/ui/qt/widgets/checkbox.cc | 5 +++++ src/xenia/ui/qt/widgets/checkbox.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/xenia/ui/qt/widgets/checkbox.cc b/src/xenia/ui/qt/widgets/checkbox.cc index 356a3f5d7..5b596cfdc 100644 --- a/src/xenia/ui/qt/widgets/checkbox.cc +++ b/src/xenia/ui/qt/widgets/checkbox.cc @@ -13,6 +13,11 @@ XCheckBox::XCheckBox(QWidget* parent) setFocusPolicy(Qt::TabFocus); // disable retaining focus through mouse click } +XCheckBox::XCheckBox(const QString& title, QWidget* parent) + : Themeable("XCheckBox", title, parent) { + setFocusPolicy(Qt::TabFocus); // disable retaining focus through mouse click +} + void XCheckBox::paintEvent(QPaintEvent* e) { QStyleOptionButton option; initStyleOption(&option); diff --git a/src/xenia/ui/qt/widgets/checkbox.h b/src/xenia/ui/qt/widgets/checkbox.h index 029b85df1..a27184faa 100644 --- a/src/xenia/ui/qt/widgets/checkbox.h +++ b/src/xenia/ui/qt/widgets/checkbox.h @@ -19,6 +19,7 @@ class XCheckBox : public Themeable { public: explicit XCheckBox(QWidget* parent = nullptr); + XCheckBox(const QString& text, QWidget* parent = nullptr); bool custom() const { return custom_; } void set_custom(bool value) { custom_ = value; }