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

Add lightly-qt6 #1074

Merged
merged 5 commits into from
Apr 5, 2024
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
1 change: 1 addition & 0 deletions anda/themes/lightly-qt6/VER6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6
186 changes: 186 additions & 0 deletions anda/themes/lightly-qt6/add-missing-files.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
diff --git a/kdecoration/config/CMakeLists.txt b/kdecoration/config/CMakeLists.txt
new file mode 100644
index 00000000..e4b08f0a
--- /dev/null
+++ b/kdecoration/config/CMakeLists.txt
@@ -0,0 +1,37 @@
+##### config classes ææææææ
+
+set(lightlydecoration_config_SRCS
+ ../lightlyexceptionlist.cpp
+ lightlyconfigwidget.cpp
+ lightlydetectwidget.cpp
+ lightlyexceptiondialog.cpp
+ lightlyexceptionlistwidget.cpp
+ lightlyexceptionmodel.cpp
+ lightlyitemmodel.cpp
+)
+ki18n_wrap_ui(lightlydecoration_config_SRCS
+ ui/lightlyconfigurationui.ui
+ ui/lightlydetectwidget.ui
+ ui/lightlyexceptiondialog.ui
+ ui/lightlyexceptionlistwidget.ui
+)
+
+kcoreaddons_add_plugin(kcm_lightlydecoration SOURCES kcm_lightlydecoration.cpp ${lightlydecoration_config_SRCS} INSTALL_NAMESPACE "${KDECORATION_KCM_PLUGIN_DIR}")
+kconfig_add_kcfg_files(kcm_lightlydecoration ../lightlysettings.kcfgc)
+target_include_directories(kcm_lightlydecoration PRIVATE ${CMAKE_SOURCE_DIR}/kdecoration ${CMAKE_BINARY_DIR}/kdecoration/)
+target_link_libraries(kcm_lightlydecoration
+ PUBLIC
+ Qt6::Core
+ Qt6::Gui
+ Qt6::DBus
+ KDecoration2::KDecoration
+ PRIVATE
+ KF6::CoreAddons
+ KF6::ConfigWidgets
+ KF6::GuiAddons
+ KF6::I18n
+ KF6::IconThemes
+ KF6::WindowSystem
+ KF6::KCMUtils
+)
+kcmutils_generate_desktop_file(kcm_lightlydecoration)
diff --git a/kdecoration/config/kcm_lightlydecoration.cpp b/kdecoration/config/kcm_lightlydecoration.cpp
new file mode 100644
index 00000000..de9ac802
--- /dev/null
+++ b/kdecoration/config/kcm_lightlydecoration.cpp
@@ -0,0 +1,6 @@
+#include "lightlyconfigwidget.h"
+#include <KPluginFactory>
+
+K_PLUGIN_CLASS_WITH_JSON(Lightly::ConfigWidget, "kcm_lightlydecoration.json")
+
+#include "kcm_lightlydecoration.moc"
diff --git a/kdecoration/config/kcm_lightlydecoration.json b/kdecoration/config/kcm_lightlydecoration.json
new file mode 100644
index 00000000..d2013276
--- /dev/null
+++ b/kdecoration/config/kcm_lightlydecoration.json
@@ -0,0 +1,60 @@
+{
+ "KPlugin": {
+ "Description": "Modify the appearance of window decorations",
+ "Description[ar]": "عدّل مظهر زخرفات النّوافذ",
+ "Description[az]": "Pəncərə tərtibatının görünüşünü dəyişdirin",
+ "Description[bg]": "Настройване на външния изглед на прозорците",
+ "Description[ca@valencia]": "Modifica l'aparença de les decoracions de les finestres",
+ "Description[ca]": "Modifica l'aparença de les decoracions de les finestres",
+ "Description[cs]": "Změnit vzhled dekorace oken",
+ "Description[da]": "Ændr vinduesdekorationers udseende",
+ "Description[de]": "Das Erscheinungsbild der Fensterdekoration ändern",
+ "Description[el]": "Τροποποίηση εμφάνισης της διακόσμησης παραθύρου",
+ "Description[en_GB]": "Modify the appearance of window decorations",
+ "Description[es]": "Modificar el aspecto de las decoraciones de las ventanas",
+ "Description[et]": "Akna dekoratsioonide välimuse muutmine",
+ "Description[eu]": "Aldatu leiho apainduren itxura",
+ "Description[fi]": "Muuta ikkunoiden kehysten ulkoasua",
+ "Description[fr]": "Modifier l'apparence des décorations des fenêtres",
+ "Description[gl]": "Modifica a aparencia da decoración da xanela",
+ "Description[he]": "התאם את מראה מסגרות החלונות",
+ "Description[hi]": "विंडो सजावटों की दिखावट को परिवर्तित करें",
+ "Description[hu]": "Az ablakdekorációk megjelenésének módosítása",
+ "Description[ia]": "Modifica le apparentia de decorationes de fenestra",
+ "Description[id]": "Memodifikasi penampilan dekorasi window",
+ "Description[it]": "Modifica l'aspetto delle decorazioni delle finestre",
+ "Description[ja]": "ウィンドウ装飾の外観を編集",
+ "Description[ko]": "창 장식의 모습을 수정합니다",
+ "Description[lt]": "Keisti lango dekoracijų išvaizdą",
+ "Description[nb]": "Endre utseende for vindusdekorasjoner",
+ "Description[nl]": "Wijzig het uiterlijk van vensterdecoraties",
+ "Description[nn]": "Endra utsjånad på vindaugspynt",
+ "Description[pa]": "ਵਿੰਡੋ ਸਜਾਵਟ ਦੀ ਦਿੱਖ ਨੂੰ ਸੋਧੋ",
+ "Description[pl]": "Zmień wygląd i wystrój okien",
+ "Description[pt]": "Modificar a aparência das decorações das janelas",
+ "Description[pt_BR]": "Modifica a aparência das decorações da janela",
+ "Description[ro]": "Modifică aspectul decorațiilor pentru ferestre",
+ "Description[ru]": "Настройка заголовков окон в стиле Breeze",
+ "Description[sk]": "Zmena vzhľadu dekorácie okien",
+ "Description[sl]": "Spremenite videz okrasitve oken",
+ "Description[sr@ijekavian]": "Измијените изглед декорација прозора",
+ "Description[sr@ijekavianlatin]": "Izmijenite izgled dekoracija prozora",
+ "Description[sr@latin]": "Izmenite izgled dekoracija prozora",
+ "Description[sr]": "Измените изглед декорација прозора",
+ "Description[sv]": "Ändra utseendet hos fönsterdekorationer",
+ "Description[tg]": "Тағйир додани ороиши намуди зоҳирии равзанаҳо",
+ "Description[tr]": "Pencere dekorasyonlarının görünümünü değiştir",
+ "Description[uk]": "Зміна вигляду декорацій вікон",
+ "Description[x-test]": "xxModify the appearance of window decorationsxx",
+ "Description[zh_CN]": "修改窗口装饰外观",
+ "Description[zh_TW]": "變更視窗裝飾外觀",
+ "Icon": "preferences-system-windows",
+ "Name": "Lightly: Window Decoration",
+ "ServiceTypes": [
+ "KCModule"
+ ]
+ },
+ "X-KDE-Keywords": "Lightly,decoration",
+ "X-KDE-ParentApp": "kcontrol",
+ "X-KDE-Weight": 50
+}
diff --git a/kstyle/config/lightlystyleconfig.json b/kstyle/config/lightlystyleconfig.json
new file mode 100644
index 00000000..f4f58aeb
--- /dev/null
+++ b/kstyle/config/lightlystyleconfig.json
@@ -0,0 +1,59 @@
+{
+ "KPlugin": {
+ "Description": "Modify the appearance of widgets",
+ "Description[ar]": "عدّل مظهر الودجات",
+ "Description[az]": "Vidjetin görünüşünü dəyişin",
+ "Description[bg]": "Настройване на външния изглед на приставките",
+ "Description[ca@valencia]": "Modifica l'aparença dels ginys",
+ "Description[ca]": "Modifica l'aparença dels ginys",
+ "Description[cs]": "Změnit vzhled widgetů",
+ "Description[da]": "Ændr kontrollers udseende",
+ "Description[de]": "Das Erscheinungsbild der Bedienelemente ändern",
+ "Description[el]": "Τροποποίηση εμφάνισης συστατικών",
+ "Description[en_GB]": "Modify the appearance of widgets",
+ "Description[es]": "Modificar el aspecto de los elementos gráficos",
+ "Description[et]": "Vidinate välimuse muutmine",
+ "Description[eu]": "Aldatu trepeten itxura",
+ "Description[fi]": "Muuta elementtien ulkoasua",
+ "Description[fr]": "Modifier l'apparence des composants graphiques",
+ "Description[gl]": "Modifica a aparencia dos trebellos",
+ "Description[he]": "התאם את המראה של היישומונים",
+ "Description[hi]": "विजेट की दिखावट को परिवर्तित करें",
+ "Description[hu]": "Az elemek megjelenésének módosítása",
+ "Description[ia]": "Modifica le apparentia de widgets",
+ "Description[id]": "Memodifikasi penampilan widget",
+ "Description[it]": "Modifica l'aspetto degli oggetti",
+ "Description[ja]": "ウィジェットの外観を編集",
+ "Description[ko]": "위젯의 모습을 수정합니다",
+ "Description[lt]": "Keisti valdiklių išvaizdą",
+ "Description[nb]": "Endre utseende for skjermelementer",
+ "Description[nl]": "Wijzig het uiterlijk van widgets",
+ "Description[nn]": "Endra utsjånaden på skjermkontrollar",
+ "Description[pl]": "Zmień wygląd interfejsu",
+ "Description[pt]": "Modificar a aparência dos elementos gráficos",
+ "Description[pt_BR]": "Modifica a aparência dos widgets",
+ "Description[ro]": "Modifică aspectul controalelor",
+ "Description[ru]": "Настройка элементов интерфейса в стиле Breeze",
+ "Description[sk]": "Zmena vzhľadu miniaplikácií",
+ "Description[sl]": "Spremenite videz gradnikov",
+ "Description[sr@ijekavian]": "Измијените изглед виџета̂",
+ "Description[sr@ijekavianlatin]": "Izmijenite izgled vidžetâ̂",
+ "Description[sr@latin]": "Izmenite izgled vidžetâ̂",
+ "Description[sr]": "Измените изглед виџета̂",
+ "Description[sv]": "Ändra utseende hos grafiska komponenter",
+ "Description[tg]": "Тағйир додани намуди зоҳирии виҷетҳо",
+ "Description[tr]": "Araç takımlarının görünümünü değiştir",
+ "Description[uk]": "Зміна вигляду віджетів",
+ "Description[x-test]": "xxModify the appearance of widgetsxx",
+ "Description[zh_CN]": "调整窗口部件外观",
+ "Description[zh_TW]": "變更元件外觀",
+ "Icon": "preferences-desktop-theme",
+ "Name": "Lightly: Widget Style",
+ "ServiceTypes": [
+ "KCModule"
+ ]
+ },
+ "X-KDE-Keywords": "lightly,widget,style",
+ "X-KDE-ParentApp": "kcontrol",
+ "X-KDE-Weight": 60
+}
6 changes: 6 additions & 0 deletions anda/themes/lightly-qt6/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project "pkg" {
arches = ["x86_64", "aarch64"]
rpm {
spec = "lightly-qt6.spec"
}
}
102 changes: 102 additions & 0 deletions anda/themes/lightly-qt6/lightly-qt6.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
%global style Lightly
%global _style lightly
%global dev boehs
%global _qt_major_version 6

%global forgeurl https://github.com/%{dev}/%{style}
%global commit 00ca23447844114d41bfc0d37cf8823202c082e8
%global date 20240229

%forgemeta

Name: %{_style}-qt%{_qt_major_version}
Version: 6.80
Release: %autorelease
Summary: A modern style for qt applications
License: GPL-2.0-or-later
Group: System/GUI/KDE

URL: %{forgeurl}
Source: %{forgesource}
Patch0: add-missing-files.patch

BuildRequires: gcc-c++
BuildRequires: cmake >= 3.16
BuildRequires: extra-cmake-modules >= 5.240.0

BuildRequires: kf%{_qt_major_version}-rpm-macros
BuildRequires: kf%{_qt_major_version}-filesystem

BuildRequires: cmake(Qt%{_qt_major_version}Core)
BuildRequires: cmake(Qt%{_qt_major_version}DBus)
BuildRequires: cmake(Qt%{_qt_major_version}Gui)
BuildRequires: cmake(Qt%{_qt_major_version}Quick)
BuildRequires: cmake(Qt%{_qt_major_version}UiTools)
BuildRequires: cmake(Qt%{_qt_major_version}Widgets)

BuildRequires: cmake(KF%{_qt_major_version}CoreAddons)
BuildRequires: cmake(KF%{_qt_major_version}Config)
BuildRequires: cmake(KF%{_qt_major_version}ConfigWidgets)
BuildRequires: cmake(KF%{_qt_major_version}Crash)
BuildRequires: cmake(KF%{_qt_major_version}FrameworkIntegration)
BuildRequires: cmake(KF%{_qt_major_version}GuiAddons)
BuildRequires: cmake(KF%{_qt_major_version}GlobalAccel)
BuildRequires: cmake(KF%{_qt_major_version}I18n)
BuildRequires: cmake(KF%{_qt_major_version}IconThemes)
BuildRequires: cmake(KF%{_qt_major_version}KCMUtils)
BuildRequires: cmake(KF%{_qt_major_version}KIO)
BuildRequires: cmake(KF%{_qt_major_version}Kirigami2)
BuildRequires: cmake(KF%{_qt_major_version}Notifications)
BuildRequires: cmake(KF%{_qt_major_version}Package)
BuildRequires: cmake(KF%{_qt_major_version}WindowSystem)

BuildRequires: cmake(KDecoration2)
BuildRequires: cmake(KWayland)
BuildRequires: cmake(Plasma)
BuildRequires: cmake(Plasma5Support)

BuildRequires: pkgconfig(x11-xcb)
BuildRequires: pkgconfig(xcb)

BuildRequires: kwin-devel
BuildRequires: libepoxy-devel
BuildRequires: kf%{_qt_major_version}-kpackage-devel

Obsoletes: %{_style} <= %{version}

%description
Lightly is a fork of breeze theme style that aims to be visually modern and minimalistic.

%prep
%forgeautosetup -p1

%build
%cmake_kf6 -DQT_MAJOR_VERSION=%{_qt_major_version}
%cmake_build

%install
%cmake_install

%files
%license COPYING
%doc AUTHORS README.md

%{_bindir}/lightly-settings%{_qt_major_version}

%{_libdir}/cmake/%{style}/
%{_libdir}/lib%{_style}common%{_qt_major_version}.so.*

%{_qt6_plugindir}/kstyle_config/%{_style}styleconfig.so
%{_qt6_plugindir}/org.kde.kdecoration2/org.kde.%{_style}.so
%{_qt6_plugindir}/org.kde.kdecoration2.kcm/kcm_%{_style}decoration.so
%{_qt6_plugindir}/styles/%{_style}%{_qt_major_version}.so

%{_datadir}/applications/kcm_%{_style}decoration.desktop
%{_datadir}/applications/%{_style}styleconfig.desktop
%{_datadir}/color-schemes/%{style}.colors
%{_datadir}/icons/hicolor/scalable/apps/%{_style}-settings.svgz
%{_datadir}/kservices%{_qt_major_version}/%{_style}decorationconfig.desktop
%{_datadir}/kstyle/themes/%{_style}.themerc

%changelog
%autochangelog
7 changes: 7 additions & 0 deletions anda/themes/lightly-qt6/update.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
let repos = get("https://repology.org/api/v1/project/qt").json_arr();
let branch = sh("git rev-parse --abbrev-ref HEAD", #{"stdout": "piped"}).ctx.stdout;
branch.crop(1);
branch.trim();
let vers = repos.filter(|r| r.repo == `fedora_${branch}`).map(|r| [find("^(\\d+)\\.(\\d+)\\..+$", r.version, 1), find("^(\\d+)\\.(\\d+)\\..+$", r.version, 2)]);
let ver = vers.find(|v| v[0] == "6")[1]; // assume there is only 1 package for v6.x
open_file("anda/themes/lightly-qt6/VER6.txt").write(`${ver}`); // will trig rebuild when changed
Loading