Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37788081
en ru br
Репозитории ALT

Группа :: Графические оболочки/Прочее
Пакет: dtkwidget

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: dtkwidget-5.6.2-alt-fix-missing-icon-on-titlebar-button.patch
Скачать


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
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin