[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kstyles/plastik
From: Sandro Giessl <sandro () giessl ! com>
Date: 2005-08-18 23:12:27
Message-ID: 1124406747.469804.2154.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 450741 by giessl:
implement Header primitives
M +41 -36 plastik.cpp
--- trunk/KDE/kdelibs/kstyles/plastik/plastik.cpp #450740:450741
@@ -1267,6 +1267,47 @@
}
break;
+
+ case WT_Header:
+ {
+ switch (primitive)
+ {
+ case Header::SectionHor:
+ case Header::SectionVert:
+ {
+ if (const QStyleOptionHeader *header = qstyleoption_cast<const \
QStyleOptionHeader *>(opt)) { + bool isFirst = \
(primitive==Header::SectionHor)&&(header->position == QStyleOptionHeader::Beginning); \
+ + // TODO: mouseOver highlight...
+ bool mouseOver = false;
+
+ uint contourFlags = Draw_Right|Draw_Top|Draw_Bottom;
+ if (isFirst)
+ contourFlags |= Draw_Left;
+ if(!enabled) contourFlags|=Is_Disabled;
+ renderContour(p, r, pal.background().color(), \
getColor(pal,ButtonContour), + contourFlags);
+
+ uint surfaceFlags = \
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal; + \
if(!enabled) surfaceFlags|=Is_Disabled; + else {
+ if(flags&State_On || flags&State_Sunken) \
surfaceFlags|=Is_Sunken; + else {
+ if(mouseOver) {
+ \
surfaceFlags|=Is_Highlight|Highlight_Top|Highlight_Bottom; + \
} + }
+ }
+ renderSurface(p, QRect(isFirst?r.left()+1:r.left(), \
r.top()+1, isFirst?r.width()-2:r.width()-1, r.height()-2), + \
pal.background().color(), pal.button().color(), getColor(pal,MouseOverHighlight), \
_contrast, + surfaceFlags);
+ }
+
+ return;
+ }
+ }
+ }
+ break;
}
@@ -2619,42 +2660,6 @@
// p->drawWinFocusRect( r );
// break;
// }
-//
-// case PE_HeaderSection: {
-// // the taskbar buttons seems to be painted with PE_HeaderSection but \
I
-// // want them look like normal buttons (at least for now. :) )
-// if(!kickerMode) {
-// // detect if this is the left most header item
-// bool isFirst = false;
-// Q3Header *header = dynamic_cast<Q3Header*>(p->device() );
-// if (header) {
-// isFirst = header->mapToIndex(header->sectionAt(r.x() ) ) == \
0;
-// }
-//
-// uint contourFlags = Draw_Right|Draw_Top|Draw_Bottom;
-// if (isFirst)
-// contourFlags |= Draw_Left;
-// if(!enabled) contourFlags|=Is_Disabled;
-// renderContour(p, r, cg.background(), getColor(cg,ButtonContour),
-// contourFlags);
-//
-// uint surfaceFlags = \
Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
-// if(!enabled) surfaceFlags|=Is_Disabled;
-// else {
-// if(on||down) surfaceFlags|=Is_Sunken;
-// else {
-// if(mouseOver) {
-// \
surfaceFlags|=Is_Highlight|Highlight_Top|Highlight_Bottom;
-// }
-// }
-// }
-// renderSurface(p, QRect(isFirst?r.left()+1:r.left(), r.top()+1, \
isFirst?r.width()-2:r.width()-1, r.height()-2),
-// cg.background(), cg.button(), \
getColor(cg,MouseOverHighlight), _contrast,
-// surfaceFlags);
-//
-// break;
-// }
-// }
//
// // CHECKBOXES
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic