-rw-r--r-- | noncore/styles/liquid/embeddata.h | 2 | ||||
-rw-r--r-- | noncore/styles/liquid/liquid.cpp | 20 | ||||
-rw-r--r-- | noncore/styles/liquid/opie-liquid.diff | 141 |
3 files changed, 112 insertions, 51 deletions
diff --git a/noncore/styles/liquid/embeddata.h b/noncore/styles/liquid/embeddata.h index e4ccc27..5207fb1 100644 --- a/noncore/styles/liquid/embeddata.h +++ b/noncore/styles/liquid/embeddata.h @@ -975,3 +975,3 @@ static int cmpEmbedImage(const void *a, const void *b) } -inline const QImage& qembed_findImage(const char* name) +static const QImage& qembed_findImage(const char* name) { diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp index ba732aa..c8f8d20 100644 --- a/noncore/styles/liquid/liquid.cpp +++ b/noncore/styles/liquid/liquid.cpp @@ -2007,2 +2007,11 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, + QPixmap *dummy = 0; + + if ( mi-> pixmap ( ) && !mi-> pixmap ( )-> isNull ( )) { + dummy = new QPixmap ( mi-> pixmap ( )-> size ( )); + QBitmap dummy_mask ( dummy-> size ( )); + dummy_mask. fill ( color1 ); + dummy-> setMask ( dummy_mask ); + } + if(active){ @@ -2011,3 +2020,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, AlignCenter|ShowPrefix|DontClip|SingleLine, - g, mi->isEnabled(), NULL, mi->text(), + g, mi->isEnabled(), dummy, mi->text(), -1, &shadow); @@ -2015,3 +2024,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, AlignCenter|ShowPrefix|DontClip|SingleLine, - g, mi->isEnabled(), NULL, mi->text(), + g, mi->isEnabled(), mi-> pixmap ( ), mi->text(), -1, &g.text()); @@ -2021,3 +2030,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, AlignCenter|ShowPrefix|DontClip|SingleLine, - g, mi->isEnabled(), NULL, mi->text(), + g, mi->isEnabled(), dummy, mi->text(), -1, &shadow); @@ -2025,5 +2034,6 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, AlignCenter|ShowPrefix|DontClip|SingleLine, - g, mi->isEnabled(), NULL, mi->text(), + g, mi->isEnabled(), mi-> pixmap ( ), mi->text(), -1, &g.text()); } + delete dummy; } @@ -2034,3 +2044,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, AlignCenter|ShowPrefix|DontClip|SingleLine, - g, mi->isEnabled(), NULL, mi->text(), + g, mi->isEnabled(), mi-> pixmap ( ), mi->text(), -1, &g.text()); diff --git a/noncore/styles/liquid/opie-liquid.diff b/noncore/styles/liquid/opie-liquid.diff index 29ae6f3..d90433c 100644 --- a/noncore/styles/liquid/opie-liquid.diff +++ b/noncore/styles/liquid/opie-liquid.diff @@ -5,3 +5,3 @@ Features: ---- - 2002-11-18 04:47:41.000000000 +0100 +--- - 2002-11-21 20:45:47.000000000 +0100 +++ liquid.h 2002-11-18 03:32:40.000000000 +0100 @@ -143,4 +143,4 @@ Features: QPixmap *pixmaps[BITMAP_ITEMS]; ---- - 2002-11-18 04:47:41.000000000 +0100 -+++ liquid.cpp 2002-11-18 04:46:13.000000000 +0100 +--- - 2002-11-21 20:45:47.000000000 +0100 ++++ liquid.cpp 2002-11-21 20:27:48.000000000 +0100 @@ -2,6 +2,9 @@ @@ -343,5 +343,6 @@ Features: - w->repaint(); -- } -- } + wid-> setBackgroundMode( QWidget::PaletteBackground ); + } ++ delete ol; + } } @@ -366,5 +367,4 @@ Features: - ((LiquidStyle*)parent())->applyCustomAttributes((QPushButton *)w); -+ delete ol; - } - } +- } +- } + return(false); @@ -496,6 +496,6 @@ Features: + pixmaps[CBDown] = processEmbedded("checkboxdown", btnH, btnS, btnV /*, true*/); - break; ++ break; + case CBDownHover: + pixmaps[CBDownHover] = processEmbedded("checkboxdown", btnHoverH, btnHoverS, btnHoverV /*, true*/); -+ break; + break; + @@ -1574,3 +1574,3 @@ Features: p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider)->mask() : -@@ -2065,203 +1980,26 @@ +@@ -2065,243 +1980,76 @@ p->drawLineSegments(a); @@ -1635,5 +1635,5 @@ Features: - } -- --} +-} +- -void LiquidStyle::drawKToolBar(QPainter *p, int x, int y, int w, int h, @@ -1790,3 +1790,49 @@ Features: else -@@ -2300,8 +2038,8 @@ + shadow = g.background().dark(130); + ++ QPixmap *dummy = 0; ++ ++ if ( mi-> pixmap ( ) && !mi-> pixmap ( )-> isNull ( )) { ++ dummy = new QPixmap ( mi-> pixmap ( )-> size ( )); ++ QBitmap dummy_mask ( dummy-> size ( )); ++ dummy_mask. fill ( color1 ); ++ dummy-> setMask ( dummy_mask ); ++ } ++ + if(active){ + drawClearBevel(p, x+1, y+1, w-1, h-1, g.button(), g.background()); + QApplication::style().drawItem(p, x+1, y+1, w, h, + AlignCenter|ShowPrefix|DontClip|SingleLine, +- g, mi->isEnabled(), NULL, mi->text(), ++ g, mi->isEnabled(), dummy, mi->text(), + -1, &shadow); + QApplication::style().drawItem(p, x, y, w, h, + AlignCenter|ShowPrefix|DontClip|SingleLine, +- g, mi->isEnabled(), NULL, mi->text(), ++ g, mi->isEnabled(), mi-> pixmap ( ), mi->text(), + -1, &g.text()); + } + else{ + QApplication::style().drawItem(p, x+1, y+1, w, h, + AlignCenter|ShowPrefix|DontClip|SingleLine, +- g, mi->isEnabled(), NULL, mi->text(), ++ g, mi->isEnabled(), dummy, mi->text(), + -1, &shadow); + QApplication::style().drawItem(p, x, y, w, h, + AlignCenter|ShowPrefix|DontClip|SingleLine, +- g, mi->isEnabled(), NULL, mi->text(), ++ g, mi->isEnabled(), mi-> pixmap ( ), mi->text(), + -1, &g.text()); + } ++ delete dummy; + } + else{ + if(active) + drawClearBevel(p, x+1, y+1, w-1, h-1, g.button(), g.background()); + QApplication::style().drawItem(p, x, y, w, h, + AlignCenter|ShowPrefix|DontClip|SingleLine, +- g, mi->isEnabled(), NULL, mi->text(), ++ g, mi->isEnabled(), mi-> pixmap ( ), mi->text(), + -1, &g.text()); + } } @@ -1801,3 +1847,3 @@ Features: switch(menuHandler->transType()){ -@@ -2336,8 +2074,6 @@ +@@ -2336,8 +2084,6 @@ @@ -1810,3 +1856,3 @@ Features: QColorGroup itemg = dis ? pal.disabled() : pal.active(); -@@ -2363,7 +2099,7 @@ +@@ -2363,7 +2109,7 @@ p->fillRect(x, y, w, h, menuBrush); @@ -1819,3 +1865,3 @@ Features: } -@@ -2508,25 +2244,6 @@ +@@ -2508,25 +2254,6 @@ return h; @@ -1845,3 +1891,3 @@ Features: const QColorGroup &g, const QColor *c, -@@ -2536,29 +2253,29 @@ +@@ -2536,29 +2263,29 @@ if(p->device()->devType() == QInternal::Widget){ @@ -1880,3 +1926,3 @@ Features: QPixmap tilePix; -@@ -2671,7 +2388,7 @@ +@@ -2671,7 +2398,7 @@ vFrame = 8; // was 10 @@ -1889,3 +1935,3 @@ Features: -@@ -2699,7 +2416,7 @@ +@@ -2699,7 +2426,7 @@ p->drawLine(x+1, y+1, x+1, y2-1); @@ -1898,3 +1944,3 @@ Features: int x2 = x+w-1; -@@ -2726,105 +2443,6 @@ +@@ -2726,105 +2453,6 @@ } @@ -2004,3 +2050,3 @@ Features: { -@@ -2988,110 +2606,5 @@ +@@ -2988,110 +2616,5 @@ } @@ -2115,5 +2161,5 @@ Features: /* vim: set noet sw=8 ts=8: */ ---- - 2002-11-18 04:47:41.000000000 +0100 -+++ plugin.cpp 2002-11-18 03:54:56.000000000 +0100 -@@ -1,29 +1,79 @@ +--- - 2002-11-21 20:45:47.000000000 +0100 ++++ plugin.cpp 2002-11-18 18:11:41.000000000 +0100 +@@ -1,29 +1,84 @@ +#include <qapplication.h> @@ -2131,2 +2177,11 @@ Features: +} ++ ++LiquidInterface::~LiquidInterface ( ) ++{ ++} ++ ++QStyle *LiquidInterface::style ( ) ++{ ++ return new LiquidStyle ( ); ++} @@ -2137,4 +2192,5 @@ Features: - const char *description(); -+LiquidInterface::~LiquidInterface ( ) ++QString LiquidInterface::name ( ) const +{ ++ return qApp-> translate ( "Styles", "Liquid" ); } @@ -2142,6 +2198,6 @@ Features: -KStyle* allocate() -+QStyle *LiquidInterface::style ( ) ++QString LiquidInterface::description ( ) const { - return(new LiquidStyle); -+ return new LiquidStyle ( ); ++ return qApp-> translate ( "Styles", "High Performance Liquid style by Mosfet" ); } @@ -2149,6 +2205,6 @@ Features: -int minor_version() -+QString LiquidInterface::name ( ) const ++bool LiquidInterface::hasSettings ( ) const { - return(0); -+ return qApp-> translate ( "Styles", "Liquid" ); ++ return true; } @@ -2156,6 +2212,8 @@ Features: -int major_version() -+QString LiquidInterface::description ( ) const ++QWidget *LiquidInterface::create ( QWidget *parent, const char *name ) { - return(1); -+ return qApp-> translate ( "Styles", "High Performance Liquid style by Mosfet" ); ++ m_widget = new LiquidSettings ( parent, name ? name : "LIQUID-SETTINGS" ); ++ ++ return m_widget; } @@ -2163,17 +2221,5 @@ Features: -const char *description() -+bool LiquidInterface::hasSettings ( ) const ++bool LiquidInterface::accept ( ) { - return(i18n("High performance liquid plugin").utf8()); -+ return true; -+} -+ -+QWidget *LiquidInterface::create ( QWidget *parent, const char *name ) -+{ -+ m_widget = new LiquidSettings ( parent, name ? name : "LIQUID-SETTINGS" ); -+ -+ return m_widget; -+} -+ -+bool LiquidInterface::accept ( ) -+{ + if ( !m_widget ) @@ -2211 +2257,6 @@ Features: + ++ ++// For Sharp ROM ++ ++extern "C" { QStyle *allocate ( ) { return new LiquidStyle ( ); } } ++extern "C" { void drawmenubaritem ( QStyle *sty, QPainter *p, int x, int y, int w, int h, QMenuItem *mi, QColorGroup &g, bool enabled, bool active ) { return ((LiquidStyle *) sty )-> drawMenuBarItem ( p, x, y, w, h, mi, g, enabled, active ); } } |