commit: c8169055a8faaaf4de218e4c542d90496ed88910 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Tue Feb 24 20:30:30 2026 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Tue Feb 24 20:45:50 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8169055
kde-frameworks/qqc2-desktop-style: Add recommended upstream fix Menu: make sure implicitWidth/height is never 0 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=516151 See also: https://mail.kde.org/pipermail/distributions/2026-February/001672.html Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> ...esktop-style-6.23.0-fix-menu-width-height.patch | 38 ++++++++++++++++++++++ .../qqc2-desktop-style-6.23.0-r1.ebuild | 37 +++++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-6.23.0-fix-menu-width-height.patch b/kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-6.23.0-fix-menu-width-height.patch new file mode 100644 index 000000000000..d6248aa89010 --- /dev/null +++ b/kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-6.23.0-fix-menu-width-height.patch @@ -0,0 +1,38 @@ +From 6d79bb7309352c4f77980ed1c68c984c074745f1 Mon Sep 17 00:00:00 2001 +From: Akseli Lahtinen <[email protected]> +Date: Wed, 18 Feb 2026 15:46:14 +0200 +Subject: [PATCH] Menu: make sure implicitWidth/height is never 0 + +Make sure to always have at least 1 in implicitWidth and implicitHeight, +so that they get updated properly. + +BUG: 516151 +--- + org.kde.desktop/Menu.qml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/org.kde.desktop/Menu.qml b/org.kde.desktop/Menu.qml +index 3b3caeef..5070fde4 100644 +--- a/org.kde.desktop/Menu.qml ++++ b/org.kde.desktop/Menu.qml +@@ -40,14 +40,14 @@ T.Menu { + property bool hasCheckables: false + property bool hasIcons: false + +- implicitWidth: contentItem.children +- .reduce((maxWidth, child) => Math.max(maxWidth, child.implicitWidth), 0) ++ // Make sure the value is never 0. ++ implicitWidth: Math.max(1, contentWidth, contentItem.children.reduce((maxWidth, child) => Math.max(maxWidth, child.implicitWidth), 0)) + // Some non-zero value, so the whole menu does not get stuck zero + // sized. Otherwise ListView just refuses to update implicitHeight -- just zero. + // `contentHeight` reports a wrong estimated height when all items are invisible. + // Use visibleChildren instead, and set the startup value to 1, so the space available + // is just slightly more than needed, avoiding random scrollbars. +- implicitHeight: Math.min(contentHeight, contentItem.visibleChildren.reduce((acc, item) => (acc += item.implicitHeight), 1)) ++ implicitHeight: Math.max(1, contentHeight, contentItem.visibleChildren.reduce((acc, item) => (acc += item.implicitHeight), 1)) + + model: control.contentModel + +-- +GitLab + diff --git a/kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-6.23.0-r1.ebuild b/kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-6.23.0-r1.ebuild new file mode 100644 index 000000000000..0eaefdf8562a --- /dev/null +++ b/kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-6.23.0-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_QTHELP="false" +QTMIN=6.10.1 +inherit ecm frameworks.kde.org + +DESCRIPTION="Style for QtQuickControls 2 that uses QWidget's QStyle for painting" + +LICENSE="|| ( GPL-2+ LGPL-3+ )" +KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="" + +# Qt_6_PRIVATE_API matches org.kde.desktop.so, see also: +# https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/379 +DEPEND=" + >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,widgets] + >=dev-qt/qtdeclarative-${QTMIN}:6= + =kde-frameworks/kcolorscheme-${KDE_CATV}*:6 + =kde-frameworks/kconfig-${KDE_CATV}*:6 + =kde-frameworks/kiconthemes-${KDE_CATV}*:6 + =kde-frameworks/kirigami-${KDE_CATV}*:6 + =kde-frameworks/sonnet-${KDE_CATV}*:6[qml] +" +RDEPEND="${DEPEND} + >=dev-qt/qt5compat-${QTMIN}:6 +" +BDEPEND=">=dev-qt/qttools-${QTMIN}:6[linguist]" + +PATCHES=( "${FILESDIR}/${P}-fix-menu-width-height.patch" ) + +CMAKE_SKIP_TESTS=( + # bug 926509 + animationspeedmodifiertest +)
