Skip to content

Commit c1446a0

Browse files
authored
Merge pull request #225 from Bali10050/feature
Feature
2 parents 39b4100 + 2a37829 commit c1446a0

File tree

5 files changed

+86
-23
lines changed

5 files changed

+86
-23
lines changed

.github/workflows/darkly-ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,10 @@ jobs:
8484
uses: ./.github/workflows/archlinux.yml
8585
with:
8686
version: ${{ needs.release-ci.outputs.VERSION }}
87+
88+
Flatpak:
89+
needs: release-ci
90+
uses: ./.github/workflows/flatpak.yml
91+
with:
92+
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
93+
version: ${{ needs.release-ci.outputs.VERSION }}

.github/workflows/flatpak.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Flatpak build support
2+
on:
3+
workflow_call:
4+
inputs:
5+
cache-file-path:
6+
required: true
7+
type: string
8+
version:
9+
required: true
10+
type: string
11+
env:
12+
QT6_RUNTIME_VERSION: 6.9
13+
QT5_RUNTIME_VERSION: 5.15-24.08
14+
jobs:
15+
build:
16+
runs-on: ubuntu-24.04
17+
steps:
18+
- uses: actions/cache/restore@v4
19+
with:
20+
key: ${{ runner.os }}-v${{ inputs.version }}-${{ hashFiles(inputs.cache-file-path) }}
21+
path: ${{ inputs.cache-file-path }}
22+
fail-on-cache-miss: true
23+
- name: Install build dependencies
24+
run: |
25+
sudo apt update -y
26+
sudo apt dist-upgrade -y
27+
sudo apt install flatpak flatpak-builder git -y
28+
- name: Extract release tarball
29+
run: tar xvf ${{ inputs.cache-file-path }}
30+
- name: Flatpak remote-add flathub
31+
run: sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
32+
- name: Flatpak build setup - QT6
33+
run: |
34+
sudo flatpak install org.kde.Sdk/x86_64/${{ env.QT6_RUNTIME_VERSION }} -y
35+
sudo flatpak install org.kde.Platform/x86_64/${{ env.QT6_RUNTIME_VERSION }} -y
36+
- name: Flatpak build setup - QT5
37+
run: |
38+
sudo flatpak install org.kde.Sdk/x86_64/${{ env.QT5_RUNTIME_VERSION }} -y
39+
sudo flatpak install org.kde.Platform/x86_64/${{ env.QT5_RUNTIME_VERSION }} -y
40+
- name: Flatpak build & bundle - QT6
41+
run: |
42+
sudo flatpak-builder flatpak-build --repo=local --force-clean --ccache Darkly-${{inputs.version}}/org.kde.KStyle.Darkly6.json
43+
sudo flatpak build-bundle local/ darkly-qt${{ env.QT6_RUNTIME_VERSION }}-${{ inputs.version }}-x86_64.flatpak runtime/org.kde.KStyle.Darkly/x86_64/${{ env.QT6_RUNTIME_VERSION }}
44+
- name: Flatpak build & bundle - QT5
45+
run: |
46+
sudo flatpak-builder flatpak-build --repo=local --force-clean --ccache Darkly-${{inputs.version}}/org.kde.KStyle.Darkly5.json
47+
sudo flatpak build-bundle local/ darkly-qt${{ env.QT5_RUNTIME_VERSION }}-${{ inputs.version }}-x86_64.flatpak runtime/org.kde.KStyle.Darkly/x86_64/${{ env.QT5_RUNTIME_VERSION }}
48+
- name: Release
49+
uses: softprops/action-gh-release@v2.0.8
50+
if: startsWith(github.ref, 'refs/tags/')
51+
with:
52+
files: |
53+
darkly-qt${{ env.QT6_RUNTIME_VERSION }}-${{ inputs.version }}-x86_64.flatpak
54+
darkly-qt${{ env.QT5_RUNTIME_VERSION }}-${{ inputs.version }}-x86_64.flatpak

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.22
1+
0.5.23

kstyle/darklyblurhelper.cpp

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -338,30 +338,32 @@ QRegion BlurHelper::blurTabWidgetRegion(QWidget *widget) const
338338
QRegion BlurHelper::blurSettingsDialogRegion(QWidget *widget) const
339339
{
340340
QRegion region;
341-
QList<QWidget *> widgets = widget->findChildren<QWidget *>();
342341

343342
// settings only change it for konsole or dolphin about window
344343
if ((widget->windowFlags() & Qt::WindowType_Mask) == Qt::Dialog
345344
&& (widget->inherits("KAboutApplicationDialog") || widget->inherits("KDEPrivate::KAboutKdeDialog"))) {
346-
for (auto w : widgets) {
347-
if (qobject_cast<QTabWidget *>(w) && (widget->inherits("KAboutApplicationDialog") || widget->inherits("KDEPrivate::KAboutKdeDialog"))) {
348-
// about dialog
349-
const QTabWidget *tw = qobject_cast<QTabWidget *>(w);
350-
QSize tbSize(tw->rect().size());
351-
// the blur region is too small without adjusting the height of the tabbar height
352-
tbSize.setHeight(tw->tabBar()->rect().height() + 4);
353-
region += roundedRegion(QRect(tw->pos(), tbSize), StyleConfigData::cornerRadius(), false, false, true, false);
354-
} else {
355-
// settings main dialog
356-
region += roundedRegion(QRect(w->mapToGlobal(w->pos()), w->rect().size()), StyleConfigData::cornerRadius(), false, false, true, false);
357-
}
358-
if (w->inherits("KPageWidget")) {
359-
// sidebar
360-
QList<QWidget *> KPageWidgets = w->findChildren<QWidget *>(QString(), Qt::FindDirectChildrenOnly);
361-
for (auto wid : KPageWidgets) {
362-
if (wid->property(PropertyNames::sidePanelView).toBool()) {
363-
region += roundedRegion(QRect(wid->pos(), wid->rect().size()), StyleConfigData::cornerRadius(), false, false, true, false);
364-
break;
345+
QList<QWidget *> widgets = widget->findChildren<QWidget *>();
346+
if (widgets.length() > 0) {
347+
for (auto w : widgets) {
348+
if (qobject_cast<QTabWidget *>(w) && (widget->inherits("KAboutApplicationDialog") || widget->inherits("KDEPrivate::KAboutKdeDialog"))) {
349+
// about dialog
350+
const QTabWidget *tw = qobject_cast<QTabWidget *>(w);
351+
QSize tbSize(tw->rect().size());
352+
// the blur region is too small without adjusting the height of the tabbar height
353+
tbSize.setHeight(tw->tabBar()->rect().height() + 4);
354+
region += roundedRegion(QRect(tw->pos(), tbSize), StyleConfigData::cornerRadius(), false, false, true, false);
355+
} else {
356+
// settings main dialog
357+
region += roundedRegion(QRect(w->mapToGlobal(w->pos()), w->rect().size()), StyleConfigData::cornerRadius(), false, false, true, false);
358+
}
359+
if (w->inherits("KPageWidget")) {
360+
// sidebar
361+
QList<QWidget *> KPageWidgets = w->findChildren<QWidget *>(QString(), Qt::FindDirectChildrenOnly);
362+
for (auto wid : KPageWidgets) {
363+
if (wid->property(PropertyNames::sidePanelView).toBool()) {
364+
region += roundedRegion(QRect(wid->pos(), wid->rect().size()), StyleConfigData::cornerRadius(), false, false, true, false);
365+
break;
366+
}
365367
}
366368
}
367369
}

org.kde.KStyle.Darkly6.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"id": "org.kde.KStyle.Darkly",
3-
"branch": "6.8",
3+
"branch": "6.9",
44
"runtime": "org.kde.Platform",
55
"build-extension": true,
66
"sdk": "org.kde.Sdk",
7-
"runtime-version": "6.8",
7+
"runtime-version": "6.9",
88
"appstream-compose": false,
99
"separate-locales": false,
1010
"modules": [

0 commit comments

Comments
 (0)