Status of konqueror / dolphin as file manager
Matthew Woehlke
mw_triad at users.sourceforge.net
Tue Oct 30 22:08:39 GMT 2007
Peter Penz wrote:
> On Tuesday, 30. October 2007 22:11, Matthew Woehlke wrote:
>> I've got a worse one... using Selection::NormalBackground for the 'extra
>> info' text in icon view. This is violating not one, but two HIG rules:
>>
>> - do not use background colors to draw text
>> - do not mix color sets
>>
>> This breaks in quite a few cases. This needs to use one of the extra
>> foreground roles instead. Specifically this looks like it should be
>> using View::InactiveText (and of course Selection::InactiveText when
>> selected).
>>
>> (Anyone know where the code for this is? I'd take a crack at fixing it,
>> but I didn't find it...)
>
> It's in kdelibs/kio/kio/kfileitemdelegate.cpp. Please take care giving Fredrik
> a note when you do changes in this class (see CC). If I can help somewhere,
> just let me know...
Thanks for the pointer. This was pretty straight-forward, here's a
suggested patch:
Index: kio/kfileitemdelegate.cpp
===================================================================
--- kio/kfileitemdelegate.cpp (revision 731181)
+++ kio/kfileitemdelegate.cpp (working copy)
@@ -843,12 +843,12 @@
if (!infoLayout.text().isEmpty())
{
QColor color;
+ KColorScheme::ColorSet cs;
if (option.state & QStyle::State_Selected)
- {
- color = option.palette.color(QPalette::HighlightedText);
- color.setAlphaF(.5);
- } else
- color = option.palette.color(QPalette::Highlight);
+ cs = KColorScheme::Selection;
+ else
+ cs = KColorScheme::View;
+ color = KColorScheme(option.palette.currentColorGroup(),
cs).foreground(KColorScheme::InactiveText).color();
painter->setPen(color);
infoLayout.draw(painter, QPoint());
===================================================================
--
Matthew
<punchline removed due to distasteful content>
More information about the kde-core-devel
mailing list