From bc8a7912d2e6baa1aff0a78438ee41657f4c0f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 11 Apr 2023 15:20:07 +0800 Subject: Mode is now enum class too --- Bootstrap.cxx | 8 ++++---- Bootstrap.hxx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Bootstrap.cxx b/Bootstrap.cxx index 7c7f686..31681a4 100644 --- a/Bootstrap.cxx +++ b/Bootstrap.cxx @@ -12,7 +12,7 @@ Bootstrap::Bootstrap(QObject *parent): QObject{parent}, - bsMode{Light}, + bsMode{Mode::Light}, bsTheme{Theme::None}, bodyColors{{"#212529", "#adb5bd"}}, bodyBgs{{"#fff", "#212529"}}, @@ -74,15 +74,15 @@ void Bootstrap::setTheme(Theme theme) QColor Bootstrap::bodyColor() const { - return bodyColors.at(bsMode); + return bodyColors.at(static_cast(bsMode)); } QColor Bootstrap::bodyBg() const { - return bodyBgs.at(bsMode); + return bodyBgs.at(static_cast(bsMode)); } QColor Bootstrap::borderColor() const { - return borderColors.at(bsMode); + return borderColors.at(static_cast(bsMode)); } diff --git a/Bootstrap.hxx b/Bootstrap.hxx index 0c28504..e266f5d 100644 --- a/Bootstrap.hxx +++ b/Bootstrap.hxx @@ -27,7 +27,7 @@ class Bootstrap : public QObject explicit Bootstrap(QObject *parent = nullptr); static Bootstrap *qmlAttachedProperties(QObject *object); - enum Mode { + enum class Mode { Light, Dark }; -- cgit v1.2.3