From 6965d012e4befc0de8e9690fb47c32276d317b3c Mon Sep 17 00:00:00 2001 From: Jeremy Plsek Date: Tue, 9 Jan 2018 19:25:48 -0500 Subject: [PATCH] Update min version to qt 5.8 Using new fallback style function for setting the style to Fusion Groupbox width now the same as the window Version bump --- .travis.yml | 6 +++--- README.md | 14 +++++++------- app/app.pro | 2 +- app/main.cpp | 7 ++++++- app/ui/Account.qml | 1 + app/ui/Advanced.qml | 3 +++ app/ui/General.qml | 2 ++ app/ui/KeyBindings.qml | 2 ++ puush-qt.pri | 5 +++-- 9 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 98923f1..31e439d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,12 +9,12 @@ os: - linux before_install: - - sudo add-apt-repository -y ppa:beineri/opt-qt571-trusty + - sudo add-apt-repository -y ppa:beineri/opt-qt58-trusty - sudo apt-get -qq update - - sudo apt-get install -qy libxcb-keysyms1-dev qt57-meta-minimal qt57quickcontrols2 qt57quickcontrols + - sudo apt-get install -qy libxcb-keysyms1-dev qt58-meta-minimal qt58quickcontrols2 qt58quickcontrols script: - - source /opt/qt57/bin/qt57-env.sh + - source /opt/qt58/bin/qt58-env.sh - qmake -v - qmake puush-qt.pro - make diff --git a/README.md b/README.md index 128a4c4..9bd6d66 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,15 @@ Ubuntu: `scrot qt5-default qml-module-qtquick-{controls,controls2,templates2,dia ## Compiling ### Extra Build Dependencies -Ubuntu 17.04 or newer: `qtbase5-private-dev libxcb-keysyms1-dev qtdeclarative5-dev` -For other Ubuntu versions, you will need qt5.7 or newer. PPA's are available [here](https://launchpad.net/~beineri/+ppa-packages). -This is an example for 16.04 with qt5.7: +Ubuntu 17.10 or newer: `qtbase5-private-dev libxcb-keysyms1-dev qtdeclarative5-dev` +For other Ubuntu versions, you will need qt5.8 or newer. PPA's are available [here](https://launchpad.net/~beineri/+ppa-packages). +This is an example for 16.04 with qt5.8: ``` -sudo add-apt-repository ppa:beineri/opt-qt571-xenial -sudo apt-get install qt57-meta-minimal qt57quickcontrols2 qt57quickcontrols -qtchooser -install qt5.7 /opt/qt57/bin/qmake -export QT_SELECT=qt5.7 +sudo add-apt-repository ppa:beineri/opt-qt58-xenial +sudo apt-get install qt58-meta-minimal qt58quickcontrols2 qt58quickcontrols +qtchooser -install qt5.8 /opt/qt58/bin/qmake +export QT_SELECT=qt5.8 ``` ### Building diff --git a/app/app.pro b/app/app.pro index ac54fe7..8bad502 100644 --- a/app/app.pro +++ b/app/app.pro @@ -1,6 +1,6 @@ include($$PWD/../puush-qt.pri) -QT += core network widgets qml quick +QT += core network widgets qml quick quickcontrols2 TEMPLATE = app TARGET = puush-qt diff --git a/app/main.cpp b/app/main.cpp index 8ecf8ec..d5a1e97 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include "systray.h" #include "information.h" @@ -16,7 +17,7 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); QApplication::setOrganizationName("puush-qt"); QApplication::setApplicationName("puush-qt"); - QApplication::setApplicationVersion("0.2.1"); + QApplication::setApplicationVersion("0.2.2"); // TODO // keep only one instance of the application up at a time @@ -36,6 +37,10 @@ int main(int argc, char *argv[]) QApplication::setQuitOnLastWindowClosed(false); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + // Linux desktops (particularly Plasma) may have pre-built styles, + // so we will set the fallback to Fusion until native styles are one day implemented (please?) + QQuickStyle::setFallbackStyle("Fusion"); + Systray *systray = new Systray(); Information *information = new Information(); Authentication *authentication = new Authentication(); diff --git a/app/ui/Account.qml b/app/ui/Account.qml index 759991f..2f9876f 100644 --- a/app/ui/Account.qml +++ b/app/ui/Account.qml @@ -66,6 +66,7 @@ Item { GroupBox { id: accountBox title: qsTr("Account Details") + width: root.width Column { Column { diff --git a/app/ui/Advanced.qml b/app/ui/Advanced.qml index a7df5a5..2c2f2fc 100644 --- a/app/ui/Advanced.qml +++ b/app/ui/Advanced.qml @@ -21,6 +21,7 @@ Item { GroupBox { title: qsTr("Screen Capture Quality") + width: root.width Column { RadioButton { @@ -57,6 +58,7 @@ Item { GroupBox { title: qsTr("Fullscreen Capture") + width: root.width Column { RadioButton { @@ -80,6 +82,7 @@ Item { } GroupBox { title: "API Location" + width: root.width GridLayout { columns: 2 diff --git a/app/ui/General.qml b/app/ui/General.qml index cfba21d..85d31af 100644 --- a/app/ui/General.qml +++ b/app/ui/General.qml @@ -30,6 +30,7 @@ Item { GroupBox { title: qsTr("On Successful Puush") + width: root.width Column { CheckBox { @@ -80,6 +81,7 @@ Item { GroupBox { title: qsTr("Tray Icon Behavior on Double Click") + width: root.width Column { RadioButton { diff --git a/app/ui/KeyBindings.qml b/app/ui/KeyBindings.qml index 31941cb..bee041e 100644 --- a/app/ui/KeyBindings.qml +++ b/app/ui/KeyBindings.qml @@ -48,9 +48,11 @@ Item { GroupBox { id: keyBindingsBox title: qsTr("Key Bindings") + width: root.width Column { spacing: 10 + width: parent.width GridLayout { columns: 3 diff --git a/puush-qt.pri b/puush-qt.pri index 7ec2cde..d8dd1a3 100644 --- a/puush-qt.pri +++ b/puush-qt.pri @@ -1,10 +1,11 @@ # qt-5.7 is needed because of "qt-quick control 2". +# qt-5.8 is needed for QQuickStyle::setFallbackStyle() # can't use QT_VERSION, because lessThan is for integers -MIN_MESSAGE = "This application requires a minimum verion of Qt 5.7" +MIN_MESSAGE = "This application requires a minimum verion of Qt 5.8" lessThan(QT_MAJOR_VERSION, 5) { error($${MIN_MESSAGE}) } -equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 7) { +equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 8) { error($${MIN_MESSAGE}) }