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

List:       kde-core-devel
Subject:    Oxygen style bad drawing
From:       Rafael =?utf-8?q?Fern=C3=A1ndez_L=C3=B3pez?= <ereslibre () kde ! org>
Date:       2008-03-07 19:44:00
Message-ID: 200803072044.03860.ereslibre () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


Hi all,

When going deeper into the WoC strategy applied to MVC, I ran into a problem 
(Oxygen specific). I set a green background in purpose to check what was 
going on:

http://media.ereslibre.es/2008/03/goyatest1.png

I was rendering with QWidget::render() method, and I wasn't setting the flag 
QWidget::DrawWindowBackground. Note that a border is drawn, making a really 
ugly effect.

I tried with other styles, and this didn't happen. For instance, Plastique:

http://media.ereslibre.es/2008/03/goyatest2.png

Then, I took a look to Oxygen's style code, and reached the point of the 
method OxygenStyle::renderWindowBackground. That seems to be the root of the 
problem. The attached patch "fixes" this problem. I guess we want this method 
only for certain widgets (windows), so we probably should make a cast inside, 
but I wasn't sure for which widgets we want the radial gradient. What is for 
sure is that we don't want it for all widgets.

The attached patch produces something like:

http://media.ereslibre.es/2008/03/goyatest3.png

So is just to point here something to the oxygen style team.


Bye and thanks,
Rafael Fernández López

GPG Fingerprint: B9F4 4730 43F8 FFDD CC5E BA8E 724E 406E 3F01 D070

["kstyles.diff" (text/x-diff)]

Index: runtime/kstyles/oxygen/oxygen.cpp
===================================================================
--- runtime/kstyles/oxygen/oxygen.cpp	(revisión: 783101)
+++ runtime/kstyles/oxygen/oxygen.cpp	(copia de trabajo)
@@ -3108,6 +3108,12 @@ QIcon OxygenStyle::standardIconImplement
 
 void OxygenStyle::renderWindowBackground(QPainter *p, const QRect &clipRect, const \
QWidget *widget) const  {
+#if 1
+    // TODO: do not apply to all widgets. See what happens to buttons borders, for \
instance: +    //       http://media.ereslibre.es/2008/03/goyatest1.png
+    return;
+#endif
+
     QRect r = widget->rect();
     QColor color = widget->palette().color(widget->backgroundRole());
     int splitY = qMin(300, 3*r.height()/4);


["signature.asc" (application/pgp-signature)]

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

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