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

List:       kde-devel
Subject:    [PATCH] Fix for Web style Vertical sliders
From:       Wynn Wilkes <wynnw () calderasystems ! com>
Date:       2001-07-30 22:01:22
[Download RAW message or body]

Hey,

(I sent this to core-devel, but it's not showing up, so hopefully some one 
will see it here)

This is a patch that fixes the Web style to draw vertical sliders...it only 
drew horizontal before.  I've tested and it looks a lot better...please let 
me know if I should commit.


Index: webstyle.cpp
===================================================================
RCS file: /home/kde/kdelibs/kstyles/web/webstyle.cpp,v
retrieving revision 1.11
diff -u -p -B -w -r1.11 webstyle.cpp
--- webstyle.cpp        2001/07/29 21:16:15     1.11
+++ webstyle.cpp        2001/07/30 20:38:17
@@ -900,13 +900,18 @@ WebStyle::drawSliderGroove
  int h,
  const QColorGroup & g,
  QCOORD /* c */,
- Orientation /* o */
+ Orientation o
 )
 {
   p->save();
 
   p->setPen(QPen(g.dark(), 0, Qt::DotLine));
+
+  if( o == Qt::Horizontal )
   p->drawLine(x, y + h / 2, w, y + h / 2);
+  else
+  if( o == Qt::Vertical )
+    p->drawLine(x + w / 2, y, x + w / 2, h);
 
   p->restore();
 }
@@ -938,7 +943,7 @@ WebStyle::drawSlider
  int w,
  int h,
  const QColorGroup & g,
- Orientation /* o */,
+ Orientation o,
  bool /* tickAbove */,
  bool /* tickBelow */
 )
@@ -951,7 +956,11 @@ WebStyle::drawSlider
 
   int sl = sliderLength();
 
+  if( o == Qt::Horizontal )
   p->drawEllipse(x, y + h / 2 - sl / 2, sl, sl);
+  else
+  if( o == Qt::Vertical )
+    p->drawEllipse(x + w / 2 - sl / 2, y, sl, sl);
 
   p->restore();


Thanks,
Wynn 
-- 
Wynn Wilkes
Caldera Systems, Inc.

 
>> 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