Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37478162
en ru br
ALT Linux repos
S:5.6.8-alt1

Group :: Graphical desktop/Other
RPM: dtkwidget

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: dtkwidget-5.6.2-alt-fix-missing-icon-on-titlebar-button.patch
Download


From ac3219c24ddd1077d2dd1cd69b8675f8445ad0cd Mon Sep 17 00:00:00 2001
From: Leontiy Volodin <lvol@altlinux.org>
Date: Wed, 25 Jan 2023 13:38:45 +0300
Subject: [PATCH] fix: missing icon on titlebar button
---
 src/widgets/dstyle.cpp | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/widgets/dstyle.cpp b/src/widgets/dstyle.cpp
index 8b96b08..26fba73 100644
--- a/src/widgets/dstyle.cpp
+++ b/src/widgets/dstyle.cpp
@@ -647,11 +647,10 @@ void drawTitleBarMenuButton(QPainter *pa, const QRectF &rect)
     pa->setPen(pen);
 
-    const DDciIcon &icon = DDciIcon::fromTheme(QLatin1String("window_menu"));
-    auto devicePixelRatio = pa->device() ? pa->device()->devicePixelRatioF()
-                                         : qApp->devicePixelRatio();
-    auto appTheme = DGuiApplicationHelper::toColorType(pa->pen().color());
-    DDciIcon::Theme theme = appTheme == DGuiApplicationHelper::LightType ? DDciIcon::Light : DDciIcon::Dark;
-    DDciIconPalette palette(pa->pen().color());
-    icon.paint(pa, rect.toRect(), devicePixelRatio, theme, DDciIcon::Normal, Qt::AlignCenter, palette);
+    pa->setRenderHint(QPainter::Antialiasing, pa->device()->devicePixelRatioF() > 1.0);
+    pa->drawLine(content_rect.x(), content_rect.y(), content_rect.topRight().x() - 2, content_rect.topRight().y());
+    pa->drawLine(content_rect.bottomLeft(), content_rect.bottomRight());
+
+    qreal y = content_rect.center().y();
+    pa->drawLine(content_rect.x(), y, content_rect.topRight().x(), y);
 }
 
--
libgit2 1.3.2
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin