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

List:       kde-commits
Subject:    koffice/kexi/tableview
From:       Jaroslaw Staniek <js () iidea ! pl>
Date:       2004-09-14 15:34:39
Message-ID: 20040914153439.CA40D1D90 () office ! kde ! org
[Download RAW message or body]

CVS commit by staniek: 

TableView
- hack added for KDownArrowPushButton for drawing with thinkeramik style. 


  M +11 -2     kexicomboboxtableedit.cpp   1.26


--- koffice/kexi/tableview/kexicomboboxtableedit.cpp  #1.25:1.26
@@ -53,12 +53,13 @@ class KDownArrowPushButton : public KPus
                         KPushButton::drawButton(p);
 
+                        QRect r = rect();
+                        r.setHeight(r.height()+m_fixForHeight);
                         if (m_drawComplexControl) {
 //                              style().drawControl(QStyle::CE_PushButton, p, this, \
                rect(), colorGroup(), flags);
-                                style().drawComplexControl( QStyle::CC_ComboBox, p, \
this, rect(), colorGroup(), +                                \
                style().drawComplexControl( QStyle::CC_ComboBox, p, this, r, \
                colorGroup(),
                                     flags, (uint)(QStyle::SC_ComboBoxArrow /*| \
                QStyle::SC_ComboBoxFrame*/), //QStyle::SC_All ^ \
                QStyle::SC_ComboBoxFrame,
                                      /*QStyle::SC_ComboBoxArrow */ QStyle::SC_None \
);  }
                         else {
-                                QRect r = rect();
                                 r.setWidth(r.width()+2);
                                 style().drawPrimitive( QStyle::PE_ArrowDown, p, r, \
colorGroup(), flags); @@ -66,4 +67,11 @@ class KDownArrowPushButton : public KPus
                 }
                 virtual void styleChange( QStyle & oldStyle ) {
+                        //<hack>
+                  if (qstricmp(style().name(),"thinkeramik")==0) {
+                                m_fixForHeight = 3;
+                        }
+                        else
+                                m_fixForHeight = 0;
+                        //</hack>
                         m_drawComplexControl = style().inherits("KStyle") || \
                qstricmp(style().name(),"platinum")==0;
                         setFixedWidth( style().querySubControlMetrics( \
QStyle::CC_ComboBox,  @@ -72,4 +80,5 @@ class KDownArrowPushButton : public KPus
                 }
 
+                int m_fixForHeight;
                 bool m_drawComplexControl : 1;
 };


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

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