From 993b6d22e46a8b1ba1f709918f4517d710e57646 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Mon, 2 Sep 2024 10:42:50 +0200 Subject: [PATCH] Add a compile option to build for QLC5. Remove qml slot depreciation. Adapt disclaimer text size to content. --- CMakeLists.txt | 2 ++ qmlui/qml/popup/CustomPopupDialog.qml | 2 +- qmlui/qml/popup/PopupDisclaimer.qml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 874b02f6dc..bbdb6f9e74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.16) project(qlcplus VERSION 4.13.1 LANGUAGES C CXX) +option(qmlui "Build for QLC+ 5 QML UI" OFF) + # Set Release build type by default if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) diff --git a/qmlui/qml/popup/CustomPopupDialog.qml b/qmlui/qml/popup/CustomPopupDialog.qml index 475c3da791..c14a5c0cfd 100644 --- a/qmlui/qml/popup/CustomPopupDialog.qml +++ b/qmlui/qml/popup/CustomPopupDialog.qml @@ -95,7 +95,7 @@ Dialog contentItem.implicitHeight: UISettings.iconSizeDefault - onClicked: + onClicked: function(button) { if (button === standardButton(Dialog.Yes)) control.clicked(Dialog.Yes) diff --git a/qmlui/qml/popup/PopupDisclaimer.qml b/qmlui/qml/popup/PopupDisclaimer.qml index 74ded5fb4d..30d81d8de6 100644 --- a/qmlui/qml/popup/PopupDisclaimer.qml +++ b/qmlui/qml/popup/PopupDisclaimer.qml @@ -62,6 +62,8 @@ CustomPopupDialog "Reports of what is marked as 'Work in progress' or 'Missing'
" + " will be ignored. You've been warned." onLinkActivated: Qt.openUrlExternally(link) + Layout.fillWidth: true + wrapMode: Text.WordWrap MouseArea {