[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [PATCH] laptop decoration scheme should honor blend color
From:       Rob Napier <rnapier () employees ! org>
Date:       2001-03-30 17:11:01
[Download RAW message or body]

I noticed that no matter how I messed with the titlebar blend, The
laptop window decorations ignored it. This patch makes it pay
attention.

Personally, I love the laptop decoration scheme because it is the only
one I know that puts the close widget where it belongs (away from the
other widgets). The only weird thing (to me) is that it blends top to
bottom, whereas the Colors dialog gives the impression that it will
blend left to right. Does that bother anyone? Probably not a big deal,
but I found it surprising (especially because even with my changes,
the blend is less than obvious due to the small distance top to
bottom; OTOH, it still does look nicer IMO, when the gradient is
steep). It's of course possible to add a horizontal versus vertical
blend option in the Colors dialog... thoughts? Give me a chance to
write actual code instead of just patching for Solaris :)

Even with this, the Colors dialog wouldn't exactly match since it
doesn't load the decorations modules (so the window name is in the
wrong place, for instance, and laptop does this stippling effect). But
getting the colors dialog to display the current decorations seems
much harder (haven't gone poking yet to see how it displays the
samples box).

Enough chatter. Here's the code:

Index: laptopclient.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/clients/laptop/laptopclient.cpp,v
retrieving revision 1.14
diff -u -3 -p -r1.14 laptopclient.cpp
--- laptopclient.cpp	2001/02/20 01:20:37	1.14
+++ laptopclient.cpp	2001/03/30 17:04:33
@@ -129,15 +129,17 @@ static void create_pixmaps()
         aUpperGradient->resize(32, titleHeight+2);
         iUpperGradient = new KPixmap;
         iUpperGradient->resize(32, titleHeight+2);
-        QColor bgColor = options->color(Options::TitleBar, true);
+        QColor titleColor = options->color(Options::TitleBar, true);
+        QColor titleBlend = options->color(Options::TitleBlend, true);
         KPixmapEffect::gradient(*aUpperGradient,
-                                bgColor.light(120),
-                                bgColor.dark(120),
+                                titleColor,
+                                titleBlend,
                                 KPixmapEffect::VerticalGradient);
-        bgColor = options->color(Options::TitleBar, false);
+        titleColor = options->color(Options::TitleBar, false);
+        titleBlend = options->color(Options::TitleBlend, false);
         KPixmapEffect::gradient(*iUpperGradient,
-                                bgColor.light(120),
-                                bgColor.dark(120),
+                                titleColor,
+                                titleBlend,
                                 KPixmapEffect::VerticalGradient);
     }
     // buttons (active/inactive, sunken/unsunken, 2 sizes each)
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic