Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37739751
en ru br
Репозитории ALT
S:4.8.7-alt25
5.1: 4.6.3-alt1.M51.1
4.1: 4.4.3-alt1.M41.1
4.0: 4.3.4-alt5.M40.1
3.0: 4.0.1-alt1
+updates:4.0.1-alt2
+backports:4.2.3-alt7.1.M30
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: qt4

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

Патч: 0192-itemdelegate-palette-state.diff
Скачать


qt-bugs@ issue : 178507
Trolltech task ID : 179170
applied: no
author: Matthew Woehlke <mw_triad@users.sourceforge.net>
This patch fixes incorrect setting of the palette color group in
QItemDelegate that resulted in inactive colors being used for widgets
in active windows.
--- src/gui/itemviews/qitemdelegate.cpp
+++ src/gui/itemviews/qitemdelegate.cpp
@@ -635,10 +635,10 @@
     QPen pen = painter->pen();
     QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
-                              ? QPalette::Normal : QPalette::Disabled;
-    if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))
-        cg = QPalette::Inactive;
+                              ? option.palette.currentColorGroup() : QPalette::Disabled;
     if (option.state & QStyle::State_Selected) {
+       if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))
+           cg = QPalette::Inactive;
         painter->fillRect(rect, option.palette.brush(cg, QPalette::Highlight));
         painter->setPen(option.palette.color(cg, QPalette::HighlightedText));
     } else {
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin