Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use new in Qt6.8 windows fluent style #7416

Merged
merged 6 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ name: drone desktop client

steps:
- name: cmake
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.7.3-1
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.1-2
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- cmake /drone/src -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt6.7.3 -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 -DADD_E2E_TESTS=ON
- cmake /drone/src -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 -DADD_E2E_TESTS=ON

- name: compile
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.7.3-1
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.1-2
volumes:
- name: build
path: /drone/build
Expand All @@ -22,7 +22,7 @@ steps:
- ninja

- name: test
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.7.3-1
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.1-2
volumes:
- name: build
path: /drone/build
Expand All @@ -38,7 +38,7 @@ services:
image: ghcr.io/nextcloud/continuous-integration-shallow-server:latest # also change in updateScreenshots.sh
environment:
EVAL: true
SERVER_VERSION: 'stable28'
SERVER_VERSION: 'stable30'
commands:
- BRANCH="$SERVER_VERSION" /usr/local/bin/initnc.sh
- echo 127.0.0.1 server >> /etc/hosts
Expand Down Expand Up @@ -79,23 +79,23 @@ name: qt-5.15-clang

steps:
- name: cmake
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.7.3-1
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.1-2
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- cmake /drone/src -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt6.7.3 -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 -DADD_E2E_TESTS=ON
- cmake /drone/src -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 -DADD_E2E_TESTS=ON
- name: compile
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.7.3-1
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.1-2
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- ninja
- name: test
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.7.3-1
image: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.1-2
volumes:
- name: build
path: /drone/build
Expand All @@ -111,7 +111,7 @@ services:
image: ghcr.io/nextcloud/continuous-integration-shallow-server:latest # also change in updateScreenshots.sh
environment:
EVAL: true
SERVER_VERSION: 'stable28'
SERVER_VERSION: 'stable30'
commands:
- BRANCH="$SERVER_VERSION" /usr/local/bin/initnc.sh
- echo 127.0.0.1 server >> /etc/hosts
Expand Down Expand Up @@ -168,6 +168,5 @@ trigger:
- push
---
kind: signature
hmac: 20a4eb306b48377c21036520acc47ad69253eca7fbf607e95153cfcd2274db37

hmac: 4296d3beb6775fd1589c30b86412298de4f67e9791843c7bb484fc6d5bb01e4e
...
4 changes: 2 additions & 2 deletions .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:
jobs:
clang-tidy:
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.0-1
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.1-2
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Prepare compile_commands.json
run: |
cmake -G Ninja -B build -DCMAKE_PREFIX_PATH=/opt/qt6.8.0 -DQT_MAJOR_VERSION=6 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DOPENSSL_ROOT_DIR=/usr/local/lib64
cmake -G Ninja -B build -DCMAKE_PREFIX_PATH=/opt/qt -DQT_MAJOR_VERSION=6 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DOPENSSL_ROOT_DIR=/usr/local/lib64
cd build && ninja
- name: Create results directory
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-clang-compile-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
name: Linux Clang compilation and tests
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.0-1
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.1-2
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -15,7 +15,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt6.8.0 -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
ninja
- name: Run tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-gcc-compile-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
name: Linux GCC compilation and tests
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.0-1
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.1-2
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -15,7 +15,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt6.8.0 -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQT_MAJOR_VERSION=6 -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
ninja
- name: Run tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
name: SonarCloud analysis
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.0-1
container: ghcr.io/nextcloud/continuous-integration-client-qt6:client-6.8.1-2
env:
SONAR_SERVER_URL: "https://sonarcloud.io"
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
Expand All @@ -25,7 +25,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt6.8.0 -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DQT_MAJOR_VERSION=6 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 -DBUILD_COVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=/opt/qt -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DQT_MAJOR_VERSION=6 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 -DBUILD_COVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} ninja
- name: Run tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
include(${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake)

set(QT_VERSION_MAJOR "6")
set(REQUIRED_QT_VERSION "6.7.0")
set(REQUIRED_QT_VERSION "6.8.0")

# CfAPI Shell Extensions
set( CFAPI_SHELL_EXTENSIONS_LIB_NAME CfApiShellExtensions )
Expand Down
6 changes: 3 additions & 3 deletions src/gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#include <QtGlobal>

Check failure on line 15 in src/gui/main.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/main.cpp:15:10 [clang-diagnostic-error]

'QtGlobal' file not found

#include <cmath>
#include <csignal>
Expand Down Expand Up @@ -82,16 +82,16 @@

#if defined Q_OS_MAC
style = QStringLiteral("macOS");
#elif defined Q_OS_WIN
style = QStringLiteral("Fusion");
#endif

QQuickStyle::setStyle(style);
QQuickStyle::setFallbackStyle(QStringLiteral("Fusion"));

#if defined Q_OS_WIN
if (QOperatingSystemVersion::current().version() < QOperatingSystemVersion::Windows11.version()) {
QApplication::setStyle(QStyleFactory::create("Fusion"));
QApplication::setStyle(QStyleFactory::create("Universal"));
} else {
style = QStringLiteral("FluentWinUI3");
}
#endif

Expand Down
6 changes: 3 additions & 3 deletions src/gui/tray/MainWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ ApplicationWindow {
radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
border.width: Style.trayWindowBorderWidth
border.color: palette.dark
color: palette.base
color: Style.colorWithoutTransparency(palette.base)
}

property int userIndex: 0
Expand Down Expand Up @@ -180,7 +180,7 @@ ApplicationWindow {
radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
border.width: Style.trayWindowBorderWidth
border.color: palette.dark
color: palette.base
color: Style.colorWithoutTransparency(palette.base)
}

property var folderAccountState: ({})
Expand Down Expand Up @@ -239,7 +239,7 @@ ApplicationWindow {
clip: true

radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
color: palette.base
color: Style.colorWithoutTransparency(palette.base)

Accessible.role: Accessible.Grouping
Accessible.name: qsTr("Nextcloud desktop main dialog")
Expand Down
5 changes: 5 additions & 0 deletions theme/Style/Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,9 @@ QtObject {
function variableSize(size) {
return size * (1 + Math.min(pixelSize / 100, 1));
}

// some platforms (e.g. Windows 11) have a transparency set on palette colours, this function removes that
function colorWithoutTransparency(color) {
return Qt.rgba(color.r, color.g, color.b, 1)
}
}
Loading