summaryrefslogtreecommitdiff
authorleseb <leseb>2002-07-02 21:23:40 (UTC)
committer leseb <leseb>2002-07-02 21:23:40 (UTC)
commitd83f58a1a4a314a3ef8b25dd78432488922a9e31 (patch) (unidiff)
tree353b815ff13bb34594fa8db4d15233ed6b8c27e4
parent2481ac4013794f95c53580f99b4b761142e4ee8f (diff)
downloadopie-d83f58a1a4a314a3ef8b25dd78432488922a9e31.zip
opie-d83f58a1a4a314a3ef8b25dd78432488922a9e31.tar.gz
opie-d83f58a1a4a314a3ef8b25dd78432488922a9e31.tar.bz2
Fix QToolButton drawing
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/theme/othemestyle.cpp8
-rw-r--r--noncore/styles/theme/othemestyle.h6
2 files changed, 14 insertions, 0 deletions
diff --git a/noncore/styles/theme/othemestyle.cpp b/noncore/styles/theme/othemestyle.cpp
index 61127b8..d97b026 100644
--- a/noncore/styles/theme/othemestyle.cpp
+++ b/noncore/styles/theme/othemestyle.cpp
@@ -300,24 +300,32 @@ void OThemeStyle::drawComboButtonMask( QPainter *p, int x, int y, int w, int h )
300{ 300{
301 drawBaseMask( p, x, y, w, h, roundComboBox() ); 301 drawBaseMask( p, x, y, w, h, roundComboBox() );
302} 302}
303 303
304void OThemeStyle::drawBevelButton( QPainter *p, int x, int y, int w, int h, 304void OThemeStyle::drawBevelButton( QPainter *p, int x, int y, int w, int h,
305 const QColorGroup &g, bool sunken, 305 const QColorGroup &g, bool sunken,
306 const QBrush * ) 306 const QBrush * )
307{ 307{
308 WidgetType type = sunken ? BevelDown : Bevel; 308 WidgetType type = sunken ? BevelDown : Bevel;
309 drawBaseButton( p, x, y, w, h, *colorGroup( g, type ), sunken, false, type ); 309 drawBaseButton( p, x, y, w, h, *colorGroup( g, type ), sunken, false, type );
310} 310}
311 311
312void OThemeStyle::drawToolButton( QPainter *p, int x, int y, int w, int h,
313 const QColorGroup &g, bool sunken,
314 const QBrush * )
315{
316 WidgetType type = sunken ? ToolButtonDown : ToolButton;
317 drawBaseButton( p, x, y, w, h, *colorGroup( g, type ), sunken, false, type );
318}
319
312#if 0 320#if 0
313void OThemeStyle::drawKToolBarButton( QPainter *p, int x, int y, int w, int h, 321void OThemeStyle::drawKToolBarButton( QPainter *p, int x, int y, int w, int h,
314 const QColorGroup &g, bool sunken, 322 const QColorGroup &g, bool sunken,
315 bool raised, bool enabled, bool popup, 323 bool raised, bool enabled, bool popup,
316 KToolButtonType type, const QString &btext, 324 KToolButtonType type, const QString &btext,
317 const QPixmap *pixmap, QFont *font, 325 const QPixmap *pixmap, QFont *font,
318 QWidget * ) 326 QWidget * )
319{ 327{
320 QFont tmp_font( QString::fromLatin1( "Helvetica" ), 10 ); 328 QFont tmp_font( QString::fromLatin1( "Helvetica" ), 10 );
321 if ( font ) 329 if ( font )
322 tmp_font = *font; 330 tmp_font = *font;
323 QFontMetrics fm( tmp_font ); 331 QFontMetrics fm( tmp_font );
diff --git a/noncore/styles/theme/othemestyle.h b/noncore/styles/theme/othemestyle.h
index 02bec78..52445c4 100644
--- a/noncore/styles/theme/othemestyle.h
+++ b/noncore/styles/theme/othemestyle.h
@@ -100,24 +100,30 @@ public:
100 virtual void drawButton( QPainter *p, int x, int y, int w, int h, 100 virtual void drawButton( QPainter *p, int x, int y, int w, int h,
101 const QColorGroup &g, bool sunken = FALSE, 101 const QColorGroup &g, bool sunken = FALSE,
102 const QBrush *fill = 0 ); 102 const QBrush *fill = 0 );
103 /** 103 /**
104 * Draw a bevel button. 104 * Draw a bevel button.
105 * 105 *
106 * This calls @ref drawBaseButton() with Bevel as the 106 * This calls @ref drawBaseButton() with Bevel as the
107 * widget type. 107 * widget type.
108 */ 108 */
109 virtual void drawBevelButton( QPainter *p, int x, int y, int w, int h, 109 virtual void drawBevelButton( QPainter *p, int x, int y, int w, int h,
110 const QColorGroup &g, bool sunken = FALSE, 110 const QColorGroup &g, bool sunken = FALSE,
111 const QBrush *fill = 0 ); 111 const QBrush *fill = 0 );
112 /**
113 * Draw a toolbar button.
114 */
115 virtual void drawToolButton ( QPainter *p, int x, int y, int w, int h,
116 const QColorGroup &g, bool sunken = FALSE,
117 const QBrush *fill = 0 );
112#if 0 118#if 0
113 /** 119 /**
114 * Draw a toolbar button. 120 * Draw a toolbar button.
115 */ 121 */
116 virtual void drawKToolBarButton( QPainter *p, int x, int y, int w, int h, 122 virtual void drawKToolBarButton( QPainter *p, int x, int y, int w, int h,
117 const QColorGroup &g, bool sunken = false, 123 const QColorGroup &g, bool sunken = false,
118 bool raised = true, bool enabled = true, 124 bool raised = true, bool enabled = true,
119 bool popup = false, KToolButtonType type = Icon, 125 bool popup = false, KToolButtonType type = Icon,
120 const QString &btext = QString::null, 126 const QString &btext = QString::null,
121 const QPixmap *icon = NULL, 127 const QPixmap *icon = NULL,
122 QFont *font = NULL, QWidget *btn = NULL ); 128 QFont *font = NULL, QWidget *btn = NULL );
123 /** 129 /**