Bug 137055 - phase style; poor color choice for trees in tree view
Summary: phase style; poor color choice for trees in tree view
Status: RESOLVED FIXED
Alias: None
Product: artwork
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDE Artists Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-08 18:30 UTC by Matthew Woehlke
Modified: 2008-02-03 23:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Woehlke 2006-11-08 18:30:34 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Compiled From Sources
Compiler:          gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.1) 
OS:                Linux

Color choices for the "phase" style in tree views (e.g. the one in KControl) can result in the tree lines and arrows being invisible if QColorGroup::mid() and QColorGroup::base() are the same (e.g. with the built-in Solaris color scheme).

Solution: use QColorGroup::text() instead of QColorGroup::mid() for drawing, or alternitavely use a modified QColorGroup::base() to maintain the 'softer' style without running into the 'invisible color' problem.
Comment 1 Matthew Woehlke 2006-11-08 20:34:06 UTC
Here is a patch demonstrating one possible way to fix this (consistent with many styles, but arguably not the 'softer' phase look):

--- styles/phase/phasestyle.cpp     2006-03-17 04:08:45.000000000 -0600
+++ styles/phase/phasestyle-new.cpp 2006-11-08 13:31:26.331437437 -0600
@@ -1061,7 +1061,7 @@
           break;

       case KPE_ListViewExpander:
-          painter->setPen(group.mid());
+          painter->setPen(group.text());
           if (flags & Style_On) {
               painter->drawPixmap(x+w/2-4, y+h/2-4, rexpand);
           } else {
@@ -1070,7 +1070,7 @@
           break;

       case KPE_ListViewBranch:
-          painter->setPen(group.mid());
+          painter->setPen(group.text());
           if (flags & Style_Horizontal) {
               painter->drawLine(x, cy, x2, cy);
           } else {
Comment 2 David Johnson 2008-02-03 23:41:43 UTC
SVN commit 770536 by brandybuck:

BUG: 137055
Better color choice for tree view branches in darker color schemes.


 M  +19 -5     phasestyle.cpp  
 M  +1 -0      phasestyle.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=770536