diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b8dfce1..7ab33063 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ set(CMAKE_AUTORCC ON) option(USE_SYSTEM_NTCORE OFF "Use the system NTCore (Linux only)") option(USE_SYSTEM_PROTOBUF OFF "Use the system protobuf (Linux only)") -find_package(Qt6 6.7 REQUIRED COMPONENTS Quick Multimedia) +find_package(Qt6 6.7 REQUIRED COMPONENTS Quick Multimedia QuickControls2) add_subdirectory(3rd_party EXCLUDE_FROM_ALL) qt_standard_project_setup(REQUIRES 6.7) @@ -186,6 +186,7 @@ set_target_properties(${Dashboard_EXEC_NAME} PROPERTIES target_link_libraries(${Dashboard_EXEC_NAME} PRIVATE Qt6::Quick Qt6::Multimedia + Qt6::QuickControls2 BuildConfig ntcore ) diff --git a/Main.qml b/Main.qml index f3bc9ff5..47a832f9 100644 --- a/Main.qml +++ b/Main.qml @@ -1,6 +1,8 @@ import QtQuick import QtQuick.Controls +import QtQuick.Controls.Universal + import QFRCDashboard ApplicationWindow { @@ -10,6 +12,9 @@ ApplicationWindow { visible: true title: titleManager.title + Universal.theme: Universal.Dark + Universal.accent: "Lime" + AccentEditor { id: accentEditor @@ -59,7 +64,8 @@ ApplicationWindow { delegate: MenuItem { text: qsTr("&" + index + ". " + modelData) onTriggered: { - if (modelData === "" || modelData === null) return; + if (modelData === "" || modelData === null) + return tlm.clear() tlm.load(modelData) } @@ -109,5 +115,3 @@ ApplicationWindow { anchors.fill: parent } } - - diff --git a/main.cpp b/main.cpp index e50e80dc..28545694 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -22,6 +23,9 @@ int main(int argc, char *argv[]) app.setApplicationName(BuildConfig.APP_NAME); app.setApplicationVersion(BuildConfig.versionString()); + qDebug() << QQuickStyle::name(); + QQuickStyle::setStyle("Universal"); + TopicStore store(&app); TopicListModel *topics = new TopicListModel(store, &app);