[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kde4/kdebase
From: Wilco Greven <greven () kde ! org>
Date: 2005-05-31 8:06:40
Message-ID: 1117526800.767084.27709.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 420056 by wgreven:
Build the colors control panel.
M +1 -0 kcontrol/colors/colorscm.cpp
M +24 -8 kcontrol/colors/widgetcanvas.cpp
M +0 -1 missings
--- branches/work/kde4/kdebase/kcontrol/colors/colorscm.cpp #420055:420056
@@ -144,6 +144,7 @@
Q3GroupBox *group = new Q3GroupBox( i18n("Color Scheme"), this );
group->setOrientation( Qt::Vertical );
+ group->setColumns( 1 );
topLayout->addWidget( group, 1, 0 );
sList = new KListBox( group );
--- branches/work/kde4/kdebase/kcontrol/colors/widgetcanvas.cpp #420055:420056
@@ -12,6 +12,7 @@
#include <qbitmap.h>
#include <qtooltip.h>
#include <qstyle.h>
+#include <qstyleoption.h>
#include <q3popupmenu.h>
#include <kcolordrag.h>
@@ -307,6 +308,7 @@
back.dark(lowlightVal),
back.dark(120),
txt, window );
+ QPalette palette(cg, cg, cg);
// We will need this brush.
@@ -320,16 +322,18 @@
// TODO: vertScrollBar->setStyle( new QMotifStyle() );
vertScrollBar->setGeometry( 400, 400, SCROLLBAR_SIZE, height());
vertScrollBar->setRange( 0, 0 );
- vertScrollBar->setPalette( QPalette(cg,cg,cg));
+ vertScrollBar->setPalette( palette );
vertScrollBar->show();
QPixmap pm( vertScrollBar->width(), vertScrollBar->height() );
pm.fill( back );
#ifndef __osf__
- QPainter::redirect( vertScrollBar, &pm );
+ QPainter::setRedirected( vertScrollBar, &pm );
#endif
vertScrollBar->repaint();
- QPainter::redirect( vertScrollBar, 0 );
+#ifndef __osf__
+ QPainter::restoreRedirected( vertScrollBar );
+#endif
vertScrollBar->hide();
// Reset the titlebar pixmaps
@@ -436,16 +440,26 @@
// Menu bar
//qDrawShadePanel ( &paint, 25, 55, width()-52, 28, cg, FALSE, 2, &brush);
- kapp->style()->drawPrimitive(QStyle::PE_PanelMenuBar, &paint,
- QRect(QPoint(25, 55), QSize(width()-52, 28)), cg);
+ {
+ QStyleOption option;
+ option.rect = QRect(25, 55, width()-52, 28);
+ option.palette = palette;
+ kapp->style()->drawPrimitive(QStyle::PE_PanelMenuBar, &option, &paint);
+ }
paint.setFont( menuFont );
paint.setPen(txt );
QString file = i18n("File");
textLen = paint.fontMetrics().width( file );
+
//qDrawShadePanel ( &paint, 30, 59, textLen + 10, 21, cg, FALSE, 2, &brush);
- kapp->style()->drawPrimitive(QStyle::PE_Panel, &paint,
- QRect(30, 59, textLen + 10, 21), cg);
+ {
+ QStyleOptionMenuItem option;
+ option.rect = QRect(30, 59, textLen + 10, 21);
+ option.palette = palette;
+ option.state = QStyle::State_Selected;
+ kapp->style()->drawControl(QStyle::CE_MenuBarItem, &option, &paint);
+ }
paint.drawText( 35, 74, file );
hotspots[ spot++ ] =
@@ -529,8 +543,10 @@
cg2.setColor(QColorGroup::Button, button);
cg2.setColor(QColorGroup::Background, window);
//qDrawWinButton(&paint, xpos, ypos, textLen+32, 28, cg, false, &brush);
+/*
kapp->style().drawPrimitive(QStyle::PE_ButtonCommand, &paint,
QRect(xpos, ypos, textLen+32, 28), cg2, QStyle::Style_Enabled | QStyle::Style_Raised);
+*/
paint.setPen(buttonTxt);
paint.drawText(xpos, ypos, textLen+32, 28, Qt::AlignCenter,
i18n("Push Button"));
@@ -561,7 +577,7 @@
Q3PopupMenu *popup = new Q3PopupMenu( this );
popup->setFont( menuFont );
- popup->setPalette( QPalette(cg,cg,cg));
+ popup->setPalette( palette );
popup->insertItem(i18n("New"));
popup->insertItem(i18n("Open"));
int id = popup->insertItem(i18n("Save"));
--- branches/work/kde4/kdebase/missings #420055:420056
@@ -1,5 +1,4 @@
kcontrol/clock/dtime.lo
-kcontrol/colors/widgetcanvas.lo
kioslave/ldap/kio_ldap.lo
kioslave/man/kio_man.lo
kioslave/pop3/pop3.lo
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic