[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:37:20
Message-ID: 1124408240.353266.3066.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 450754 by giessl:
SVN_CLIENT cleanup
M +0 -141 plastik.cpp
--- trunk/KDE/kdelibs/kstyles/plastik/plastik.cpp #450753:450754
@@ -2876,114 +2876,7 @@
// }
// }
// }
-//
-// void PlastikStyle::drawComplexControl(ComplexControl control,
-// QPainter *p,
-// const QWidget *widget,
-// const QRect &r,
-// const QColorGroup &cg,
-// SFlags flags,
-// SCFlags controls,
-// SCFlags active,
-// const QStyleOption& opt) const
-// {
-// const bool reverseLayout = QApplication::reverseLayout();
-//
-// const bool enabled = (flags & Style_Enabled);
-//
-// // TOOLBUTTON
-// // ----------
-// case CC_ToolButton: {
-// const QToolButton *tb = (const QToolButton *) widget;
-//
-// QRect button, menuarea;
-// button = querySubControlMetrics(control, widget, SC_ToolButton, opt);
-// menuarea = querySubControlMetrics(control, widget, SC_ToolButtonMenu, opt);
-//
-// SFlags bflags = flags,
-// mflags = flags;
-//
-// if (kornMode) {
-// drawPrimitive(PE_ButtonTool, p, button, cg, bflags, opt);
-// break;
-// } else {
-// // don't want to have the buttoncolor as the background...
-// p->fillRect(r, cg.background());
-// bflags &= ~Style_MouseOver;
-// }
-//
-// if (active & SC_ToolButton)
-// bflags |= Style_Down;
-//
-// if (active & SC_ToolButtonMenu)
-// mflags |= Style_Down;
-//
-// if (controls & SC_ToolButton) {
-// // If we're pressed, on, or raised...
-// if (bflags & (Style_Down | Style_On | Style_Raised) || widget==hoverWidget ) {
-// drawPrimitive(PE_ButtonTool, p, button, cg, bflags, opt);
-// } else if (tb->parentWidget() &&
-// tb->parentWidget()->backgroundPixmap() &&
-// !tb->parentWidget()->backgroundPixmap()->isNull()) {
-// QPixmap pixmap = *(tb->parentWidget()->backgroundPixmap());
-// p->drawTiledPixmap( r, pixmap, tb->pos() );
-// }
-// }
-//
-// // Draw a toolbutton menu indicator if required
-// if (controls & SC_ToolButtonMenu) {
-// if (mflags & (Style_Down | Style_On | Style_Raised)) {
-// drawPrimitive(PE_ButtonDropDown, p, menuarea, cg, mflags, opt);
-// }
-// drawPrimitive(PE_ArrowDown, p, menuarea, cg, mflags, opt);
-// }
-//
-// if (tb->hasFocus() && !tb->focusProxy()) {
-// QRect fr = tb->rect();
-// fr.addCoords(2, 2, -2, -2);
-// drawPrimitive(PE_FocusRect, p, fr, cg);
-// }
-//
-// // Set the color for the ToolButton menu indicator
-// p->setPen(cg.buttonText() );
-//
-// break;
-// }
-
-// default:
-// KStyle::drawComplexControl(control, p, widget,
-// r, cg, flags, controls,
-// active, opt);
-// break;
-// }
-// }
-//
-//
-// QRect PlastikStyle::subRect(SubRect r, const QWidget *widget) const
-// {
-// switch (r) {
-// case SR_ComboBoxFocusRect: {
-// return querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField );
-// }
-//
-// // Don't use KStyles progressbar subrect
-// // TODO:
-// case SR_ProgressBarGroove: {
-// return QRect(widget->rect());
-// }
-// case SR_ProgressBarContents:
-// case SR_ProgressBarLabel: {
-// QRect rw = widget->rect();
-// return QRect(rw.left()+2, rw.top()+2, rw.width()-4, rw.height()-4 );
-// }
-//
-// default: {
-// return KStyle::subRect(r, widget);
-// }
-// }
-// }
-
// int PlastikStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
// {
// switch(m) {
@@ -3077,41 +2970,7 @@
// return KStyle::pixelMetric(m, widget);
// }
// }
-//
-//
-// QSize PlastikStyle::sizeFromContents(ContentsType t,
-// const QWidget *widget,
-// const QSize &s,
-// const QStyleOption &opt) const
-// {
-// switch (t) {
-// case CT_PushButton:
-// {
-// const QPushButton* btn = static_cast<const QPushButton*>(widget);
-//
-// int w = s.width() + 2 * pixelMetric(PM_ButtonMargin, widget);
-// int h = s.height() + 2 * pixelMetric(PM_ButtonMargin, widget);
-// if ( btn->text().isEmpty() && s.width() < 32 ) return QSize(w, h);
-//
-// return QSize( w+25, h+5 );
-// }
-//
-// case CT_ToolButton:
-// {
-// if(widget->parent() && qobject_cast<Q3ToolBar>(widget->parent()) )
-// return QSize( s.width()+2*4, s.height()+2*4 );
-// else
-// return KStyle::sizeFromContents (t, widget, s, opt);
-// }
-//
-// default:
-// return KStyle::sizeFromContents (t, widget, s, opt);
-// }
-//
-// return KStyle::sizeFromContents (t, widget, s, opt);
-// }
-//
// int PlastikStyle::styleHint( StyleHint stylehint,
// const QWidget *widget,
// const QStyleOption &option,
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic