From f017ad648ccd4c2e78aabe80f81190c2614d8f98 Mon Sep 17 00:00:00 2001 From: Yusef Aslam Date: Wed, 30 Apr 2025 07:59:39 +0100 Subject: [PATCH] kde-plasma/klassy: new package, add 6.2 Signed-off-by: Yusef Aslam --- kde-plasma/klassy/Manifest | 1 + .../klassy-6.2-port-to-kdecoration3.patch | 1329 +++++++++++++++++ kde-plasma/klassy/klassy-6.2.ebuild | 59 + kde-plasma/klassy/metadata.xml | 21 + 4 files changed, 1410 insertions(+) create mode 100644 kde-plasma/klassy/Manifest create mode 100644 kde-plasma/klassy/files/klassy-6.2-port-to-kdecoration3.patch create mode 100644 kde-plasma/klassy/klassy-6.2.ebuild create mode 100644 kde-plasma/klassy/metadata.xml diff --git a/kde-plasma/klassy/Manifest b/kde-plasma/klassy/Manifest new file mode 100644 index 0000000000..94ee29a812 --- /dev/null +++ b/kde-plasma/klassy/Manifest @@ -0,0 +1 @@ +DIST klassy-6.2.tar.gz 56800241 BLAKE2B 8575f83588504375cdac1d628376ad22315102472361afb19d9cef1183c5a3609f02dbea858899ce283fa95b862c2c518bd93c6cd7ae07586516741227df94c8 SHA512 cfdcc18db37c975b820e7dc97d54213945b0386aca9e6f520fc217e6e5c84e3e07b5ff7bf57c8a340d9d0fd08b8453ea919294881a9ee509c337fd27e7185306 diff --git a/kde-plasma/klassy/files/klassy-6.2-port-to-kdecoration3.patch b/kde-plasma/klassy/files/klassy-6.2-port-to-kdecoration3.patch new file mode 100644 index 0000000000..b3230793a5 --- /dev/null +++ b/kde-plasma/klassy/files/klassy-6.2-port-to-kdecoration3.patch @@ -0,0 +1,1329 @@ +From 2543c3e584c9553e5ad33f410fc031c680ed2379 Mon Sep 17 00:00:00 2001 +From: Foxinatel +Date: Fri, 10 Jan 2025 16:08:24 +0000 +Subject: [PATCH 1/2] naive bump from KDecoration2 to KDecoration3 for Plasma + 6.3 + +--- + CMakeLists.txt | 2 +- + README.md | 4 +- + kdecoration/CMakeLists.txt | 2 +- + kdecoration/breezebutton.cpp | 90 +++++------ + kdecoration/breezebutton.h | 10 +- + kdecoration/breezedecoration.cpp | 204 ++++++++++++------------- + kdecoration/breezedecoration.h | 46 +++--- + kdecoration/breezesettingsprovider.cpp | 2 +- + kdecoration/config/CMakeLists.txt | 2 +- + kdecoration/config/buttoncolors.cpp | 2 +- + kstyle/breezehelper.cpp | 2 +- + libbreezecommon/breeze.h | 31 ++-- + 12 files changed, 198 insertions(+), 199 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 27cc41efc..ecb0aee1e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -165,7 +165,7 @@ function(build_Qt6) + add_subdirectory(libbreezecommon libbreezecommon6) + + if(WITH_DECORATIONS) +- find_package(KDecoration2 REQUIRED) ++ find_package(KDecoration3 REQUIRED) + add_subdirectory(kdecoration) + add_subdirectory(icons) + add_subdirectory(layout-templates) +diff --git a/README.md b/README.md +index e4fc72caf..3f9e880f8 100644 +--- a/README.md ++++ b/README.md +@@ -86,7 +86,7 @@ sudo zypper in git cmake kf6-extra-cmake-modules gettext + ``` + + ``` +-sudo zypper in "cmake(KF5Config)" "cmake(KF5CoreAddons)" "cmake(KF5FrameworkIntegration)" "cmake(KF5GuiAddons)" "cmake(KF5Kirigami2)" "cmake(KF5WindowSystem)" "cmake(KF5I18n)" "cmake(KF5KCMUtils)" "cmake(Qt5DBus)" "cmake(Qt5Quick)" "cmake(Qt5Widgets)" "cmake(Qt5X11Extras)" "cmake(KDecoration2)" "cmake(KF6ColorScheme)" "cmake(KF6Config)" "cmake(KF6CoreAddons)" "cmake(KF6FrameworkIntegration)" "cmake(KF6GuiAddons)" "cmake(KF6I18n)" "cmake(KF6KCMUtils)" "cmake(KF6KirigamiPlatform)" "cmake(KF6WindowSystem)" "cmake(Qt6Core)" "cmake(Qt6DBus)" "cmake(Qt6Quick)" "cmake(Qt6Svg)" "cmake(Qt6Widgets)" "cmake(Qt6Xml)" ++sudo zypper in "cmake(KF5Config)" "cmake(KF5CoreAddons)" "cmake(KF5FrameworkIntegration)" "cmake(KF5GuiAddons)" "cmake(KF5Kirigami2)" "cmake(KF5WindowSystem)" "cmake(KF5I18n)" "cmake(KF5KCMUtils)" "cmake(Qt5DBus)" "cmake(Qt5Quick)" "cmake(Qt5Widgets)" "cmake(Qt5X11Extras)" "cmake(KDecoration3)" "cmake(KF6ColorScheme)" "cmake(KF6Config)" "cmake(KF6CoreAddons)" "cmake(KF6FrameworkIntegration)" "cmake(KF6GuiAddons)" "cmake(KF6I18n)" "cmake(KF6KCMUtils)" "cmake(KF6KirigamiPlatform)" "cmake(KF6WindowSystem)" "cmake(Qt6Core)" "cmake(Qt6DBus)" "cmake(Qt6Quick)" "cmake(Qt6Svg)" "cmake(Qt6Widgets)" "cmake(Qt6Xml)" + ``` + + #### Debian/Ubuntu build dependencies +@@ -110,7 +110,7 @@ sudo dnf install git cmake extra-cmake-modules gettext + ``` + + ``` +-sudo dnf install "cmake(KF5Config)" "cmake(KF5CoreAddons)" "cmake(KF5FrameworkIntegration)" "cmake(KF5GuiAddons)" "cmake(KF5Kirigami2)" "cmake(KF5WindowSystem)" "cmake(KF5I18n)" "cmake(Qt5DBus)" "cmake(Qt5Quick)" "cmake(Qt5Widgets)" "cmake(Qt5X11Extras)" "cmake(KDecoration2)" "cmake(KF6ColorScheme)" "cmake(KF6Config)" "cmake(KF6CoreAddons)" "cmake(KF6FrameworkIntegration)" "cmake(KF6GuiAddons)" "cmake(KF6I18n)" "cmake(KF6KCMUtils)" "cmake(KF6KirigamiPlatform)" "cmake(KF6WindowSystem)" "cmake(Qt6Core)" "cmake(Qt6DBus)" "cmake(Qt6Quick)" "cmake(Qt6Svg)" "cmake(Qt6Widgets)" "cmake(Qt6Xml)" ++sudo dnf install "cmake(KF5Config)" "cmake(KF5CoreAddons)" "cmake(KF5FrameworkIntegration)" "cmake(KF5GuiAddons)" "cmake(KF5Kirigami2)" "cmake(KF5WindowSystem)" "cmake(KF5I18n)" "cmake(Qt5DBus)" "cmake(Qt5Quick)" "cmake(Qt5Widgets)" "cmake(Qt5X11Extras)" "cmake(KDecoration3)" "cmake(KF6ColorScheme)" "cmake(KF6Config)" "cmake(KF6CoreAddons)" "cmake(KF6FrameworkIntegration)" "cmake(KF6GuiAddons)" "cmake(KF6I18n)" "cmake(KF6KCMUtils)" "cmake(KF6KirigamiPlatform)" "cmake(KF6WindowSystem)" "cmake(Qt6Core)" "cmake(Qt6DBus)" "cmake(Qt6Quick)" "cmake(Qt6Svg)" "cmake(Qt6Widgets)" "cmake(Qt6Xml)" + ``` + + ### Step 2: Then download, build and install +diff --git a/kdecoration/CMakeLists.txt b/kdecoration/CMakeLists.txt +index 414dac1cb..59f798394 100644 +--- a/kdecoration/CMakeLists.txt ++++ b/kdecoration/CMakeLists.txt +@@ -33,7 +33,7 @@ target_link_libraries(klassydecoration + KF6::I18n + KF6::IconThemes + KF6::WindowSystem +- KDecoration2::KDecoration ++ KDecoration3::KDecoration + ) + + install(TARGETS klassydecoration DESTINATION ${KDE_INSTALL_PLUGINDIR}/${KDECORATION_PLUGIN_DIR}) +diff --git a/kdecoration/breezebutton.cpp b/kdecoration/breezebutton.cpp +index ea7831c20..07d439ff3 100644 +--- a/kdecoration/breezebutton.cpp ++++ b/kdecoration/breezebutton.cpp +@@ -14,8 +14,8 @@ + + #include + #include +-#include +-#include ++#include ++#include + #include + #include + +@@ -26,17 +26,17 @@ + namespace Breeze + { + +-using KDecoration2::ColorGroup; +-using KDecoration2::ColorRole; ++using KDecoration3::ColorGroup; ++using KDecoration3::ColorRole; + + //__________________________________________________________________ +-Button::Button(KDecoration2::DecorationButtonType type, Decoration *decoration, QObject *parent) ++Button::Button(KDecoration3::DecorationButtonType type, Decoration *decoration, QObject *parent) + : DecorationButton(type, decoration, parent) + , m_d(qobject_cast(decoration)) + , m_animation(new QVariantAnimation(this)) + , m_isGtkCsdButton(false) + { +- auto c = decoration->client(); ++ auto c = decoration->window(); + + // setup animation + // It is important start and end value are of the same type, hence 0.0 and not just 0 +@@ -66,16 +66,16 @@ Button::Button(KDecoration2::DecorationButtonType type, Decoration *decoration, + // connections + connect(c, SIGNAL(iconChanged(QIcon)), this, SLOT(update())); + connect(decoration, &Decoration::reconfigured, this, &Button::reconfigure); +- connect(this, &KDecoration2::DecorationButton::hoveredChanged, this, &Button::updateAnimationState); +- connect(this, &KDecoration2::DecorationButton::hoveredChanged, this, &Button::updateThinWindowOutlineWithButtonColor); +- connect(this, &KDecoration2::DecorationButton::pressedChanged, this, &Button::updateThinWindowOutlineWithButtonColor); ++ connect(this, &KDecoration3::DecorationButton::hoveredChanged, this, &Button::updateAnimationState); ++ connect(this, &KDecoration3::DecorationButton::hoveredChanged, this, &Button::updateThinWindowOutlineWithButtonColor); ++ connect(this, &KDecoration3::DecorationButton::pressedChanged, this, &Button::updateThinWindowOutlineWithButtonColor); + + reconfigure(); + } + + //__________________________________________________________________ + Button::Button(QObject *parent, const QVariantList &args) +- : Button(args.at(0).value(), args.at(1).value(), parent) ++ : Button(args.at(0).value(), args.at(1).value(), parent) + { + m_standAlone = true; + //! small button size must return to !valid because it was altered from the default constructor, +@@ -84,40 +84,40 @@ Button::Button(QObject *parent, const QVariantList &args) + } + + //__________________________________________________________________ +-Button *Button::create(KDecoration2::DecorationButtonType type, KDecoration2::Decoration *decoration, QObject *parent) ++Button *Button::create(KDecoration3::DecorationButtonType type, KDecoration3::Decoration *decoration, QObject *parent) + { + if (auto d = qobject_cast(decoration)) { +- auto c = d->client(); ++ auto c = d->window(); + + Button *b = new Button(type, d, parent); + switch (type) { +- case KDecoration2::DecorationButtonType::Close: ++ case KDecoration3::DecorationButtonType::Close: + b->setVisible(c->isCloseable()); +- QObject::connect(c, &KDecoration2::DecoratedClient::closeableChanged, b, &Breeze::Button::setVisible); ++ QObject::connect(c, &KDecoration3::DecoratedWindow::closeableChanged, b, &Breeze::Button::setVisible); + break; + +- case KDecoration2::DecorationButtonType::Maximize: ++ case KDecoration3::DecorationButtonType::Maximize: + b->setVisible(c->isMaximizeable()); +- QObject::connect(c, &KDecoration2::DecoratedClient::maximizeableChanged, b, &Breeze::Button::setVisible); ++ QObject::connect(c, &KDecoration3::DecoratedWindow::maximizeableChanged, b, &Breeze::Button::setVisible); + break; + +- case KDecoration2::DecorationButtonType::Minimize: ++ case KDecoration3::DecorationButtonType::Minimize: + b->setVisible(c->isMinimizeable()); +- QObject::connect(c, &KDecoration2::DecoratedClient::minimizeableChanged, b, &Breeze::Button::setVisible); ++ QObject::connect(c, &KDecoration3::DecoratedWindow::minimizeableChanged, b, &Breeze::Button::setVisible); + break; + +- case KDecoration2::DecorationButtonType::ContextHelp: ++ case KDecoration3::DecorationButtonType::ContextHelp: + b->setVisible(c->providesContextHelp()); +- QObject::connect(c, &KDecoration2::DecoratedClient::providesContextHelpChanged, b, &Breeze::Button::setVisible); ++ QObject::connect(c, &KDecoration3::DecoratedWindow::providesContextHelpChanged, b, &Breeze::Button::setVisible); + break; + +- case KDecoration2::DecorationButtonType::Shade: ++ case KDecoration3::DecorationButtonType::Shade: + b->setVisible(c->isShadeable()); +- QObject::connect(c, &KDecoration2::DecoratedClient::shadeableChanged, b, &Breeze::Button::setVisible); ++ QObject::connect(c, &KDecoration3::DecoratedWindow::shadeableChanged, b, &Breeze::Button::setVisible); + break; + +- case KDecoration2::DecorationButtonType::Menu: +- QObject::connect(c, &KDecoration2::DecoratedClient::iconChanged, b, [b]() { ++ case KDecoration3::DecorationButtonType::Menu: ++ QObject::connect(c, &KDecoration3::DecoratedWindow::iconChanged, b, [b]() { + b->update(); + }); + break; +@@ -133,7 +133,7 @@ Button *Button::create(KDecoration2::DecorationButtonType type, KDecoration2::De + } + + //__________________________________________________________________ +-void Button::paint(QPainter *painter, const QRect &repaintRegion) ++void Button::paint(QPainter *painter, const QRectF &repaintRegion) + { + if (!geometry().intersects(repaintRegion)) { + return; +@@ -141,7 +141,7 @@ void Button::paint(QPainter *painter, const QRect &repaintRegion) + if (!m_d) { + return; + } +- auto c = m_d->client(); ++ auto c = m_d->window(); + + m_buttonPalette = + m_d->decorationColors()->buttonPalette(static_cast(type())); // this is in paint() in-case caching type on m_buttonPalette changes +@@ -170,7 +170,7 @@ void Button::paint(QPainter *painter, const QRect &repaintRegion) + painter->save(); + + // menu button (with application icon) +- if (type() == KDecoration2::DecorationButtonType::Menu) { ++ if (type() == KDecoration3::DecorationButtonType::Menu) { + // draw a background only with Full-sized background shapes; + // for standalone/GTK we draw small buttons so can't draw menu + if (m_d->buttonBackgroundType() == ButtonBackgroundType::FullHeight && !(isStandAlone() || m_isGtkCsdButton)) +@@ -271,7 +271,7 @@ void Button::drawIcon(QPainter *painter) const + painter->setPen(pen); + + if (m_renderSystemIcon) { +- auto c = m_d->client(); ++ auto c = m_d->window(); + QString systemIconName; + systemIconName = isChecked() ? m_systemIconCheckedName : m_systemIconName; + SystemIconTheme iconRenderer(painter, +@@ -310,16 +310,16 @@ QColor Button::foregroundColor(const bool getNonAnimatedColor) const + if (!m_d) + return QColor(); + +- auto c = m_d->client(); ++ auto c = m_d->window(); + const bool active = c->isActive(); + + // return a variant of normal, hover and press colours, depending on state + if (isPressed()) { + return foregroundPressActiveStateAnimated(active, getNonAnimatedColor); + } else if (isChecked() +- && (type() == KDecoration2::DecorationButtonType::KeepBelow || type() == KDecoration2::DecorationButtonType::KeepAbove +- || type() == KDecoration2::DecorationButtonType::Shade +- || (type() == KDecoration2::DecorationButtonType::OnAllDesktops && !m_titlebarTextPinnedInversion))) { ++ && (type() == KDecoration3::DecorationButtonType::KeepBelow || type() == KDecoration3::DecorationButtonType::KeepAbove ++ || type() == KDecoration3::DecorationButtonType::Shade ++ || (type() == KDecoration3::DecorationButtonType::OnAllDesktops && !m_titlebarTextPinnedInversion))) { + if (m_d->internalSettings()->buttonStateChecked(active) == InternalSettings::EnumButtonStateChecked::Hover) { + return foregroundHoverActiveStateAnimated(active, getNonAnimatedColor); + } else { +@@ -407,16 +407,16 @@ QColor Button::backgroundColor(const bool getNonAnimatedColor) const + return QColor(); + } + +- auto c = m_d->client(); ++ auto c = m_d->window(); + const bool active = c->isActive(); + + // return a variant of normal, hover and press colours, depending on state + if (isPressed()) { + return backgroundPressActiveStateAnimated(active, getNonAnimatedColor); + } else if (isChecked() +- && (type() == KDecoration2::DecorationButtonType::KeepBelow || type() == KDecoration2::DecorationButtonType::KeepAbove +- || type() == KDecoration2::DecorationButtonType::Shade +- || (type() == KDecoration2::DecorationButtonType::OnAllDesktops && !m_titlebarTextPinnedInversion))) { ++ && (type() == KDecoration3::DecorationButtonType::KeepBelow || type() == KDecoration3::DecorationButtonType::KeepAbove ++ || type() == KDecoration3::DecorationButtonType::Shade ++ || (type() == KDecoration3::DecorationButtonType::OnAllDesktops && !m_titlebarTextPinnedInversion))) { + if (m_d->internalSettings()->buttonStateChecked(active) == InternalSettings::EnumButtonStateChecked::Hover) { + return backgroundHoverActiveStateAnimated(active, getNonAnimatedColor); + } else { +@@ -503,16 +503,16 @@ QColor Button::outlineColor(const bool getNonAnimatedColor) const + if (!m_d) + return QColor(); + +- auto c = m_d->client(); ++ auto c = m_d->window(); + const bool active = c->isActive(); + + // return a variant of normal, hover and press colours, depending on state + if (isPressed()) { + return outlinePressActiveStateAnimated(active, getNonAnimatedColor); + } else if (isChecked() +- && (type() == KDecoration2::DecorationButtonType::KeepBelow || type() == KDecoration2::DecorationButtonType::KeepAbove +- || type() == KDecoration2::DecorationButtonType::Shade +- || (type() == KDecoration2::DecorationButtonType::OnAllDesktops && !m_titlebarTextPinnedInversion))) { ++ && (type() == KDecoration3::DecorationButtonType::KeepBelow || type() == KDecoration3::DecorationButtonType::KeepAbove ++ || type() == KDecoration3::DecorationButtonType::Shade ++ || (type() == KDecoration3::DecorationButtonType::OnAllDesktops && !m_titlebarTextPinnedInversion))) { + if (m_d->internalSettings()->buttonStateChecked(active) == InternalSettings::EnumButtonStateChecked::Hover) { + return outlineHoverActiveStateAnimated(active, getNonAnimatedColor); + } else { +@@ -597,10 +597,10 @@ bool Button::titlebarTextPinnedInversion() const + { + if (!m_d) + return false; +- auto c = m_d->client(); ++ auto c = m_d->window(); + bool active = c->isActive(); + +- return type() == KDecoration2::DecorationButtonType::OnAllDesktops ++ return type() == KDecoration3::DecorationButtonType::OnAllDesktops + && m_d->internalSettings()->buttonIconStyle() != InternalSettings::EnumButtonIconStyle::StyleSystemIconTheme + && (m_d->internalSettings()->buttonBackgroundOpacity(active) > 50 && m_d->internalSettings()->buttonIconOpacity(active) > 50 + && (((m_d->internalSettings()->buttonBackgroundColors(active) == InternalSettings::EnumButtonBackgroundColors::TitleBarText +@@ -671,7 +671,7 @@ void Button::updateThinWindowOutlineWithButtonColor(bool on) + // This is to prevent glitches when you directly mouse over one button to another and the second button does not trigger on. + // In the case where another button is hovered/pressed do not send an off flag. + const auto decButtons = m_d->leftButtons()->buttons() + m_d->rightButtons()->buttons(); +- for (KDecoration2::DecorationButton *decButton : decButtons) { ++ for (KDecoration3::DecorationButton *decButton : decButtons) { + Button *button = static_cast