summaryrefslogtreecommitdiff
path: root/noncore/styles
Unidiff
Diffstat (limited to 'noncore/styles') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/embeddata.h2
-rw-r--r--noncore/styles/liquid/liquid.cpp20
-rw-r--r--noncore/styles/liquid/opie-liquid.diff141
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)
975} 975}
976inline const QImage& qembed_findImage(const char* name) 976static const QImage& qembed_findImage(const char* name)
977{ 977{
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,
2007 2007
2008 QPixmap *dummy = 0;
2009
2010 if ( mi-> pixmap ( ) && !mi-> pixmap ( )-> isNull ( )) {
2011 dummy = new QPixmap ( mi-> pixmap ( )-> size ( ));
2012 QBitmap dummy_mask ( dummy-> size ( ));
2013 dummy_mask. fill ( color1 );
2014 dummy-> setMask ( dummy_mask );
2015 }
2016
2008 if(active){ 2017 if(active){
@@ -2011,3 +2020,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
2011 AlignCenter|ShowPrefix|DontClip|SingleLine, 2020 AlignCenter|ShowPrefix|DontClip|SingleLine,
2012 g, mi->isEnabled(), NULL, mi->text(), 2021 g, mi->isEnabled(), dummy, mi->text(),
2013 -1, &shadow); 2022 -1, &shadow);
@@ -2015,3 +2024,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
2015 AlignCenter|ShowPrefix|DontClip|SingleLine, 2024 AlignCenter|ShowPrefix|DontClip|SingleLine,
2016 g, mi->isEnabled(), NULL, mi->text(), 2025 g, mi->isEnabled(), mi-> pixmap ( ), mi->text(),
2017 -1, &g.text()); 2026 -1, &g.text());
@@ -2021,3 +2030,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
2021 AlignCenter|ShowPrefix|DontClip|SingleLine, 2030 AlignCenter|ShowPrefix|DontClip|SingleLine,
2022 g, mi->isEnabled(), NULL, mi->text(), 2031 g, mi->isEnabled(), dummy, mi->text(),
2023 -1, &shadow); 2032 -1, &shadow);
@@ -2025,5 +2034,6 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
2025 AlignCenter|ShowPrefix|DontClip|SingleLine, 2034 AlignCenter|ShowPrefix|DontClip|SingleLine,
2026 g, mi->isEnabled(), NULL, mi->text(), 2035 g, mi->isEnabled(), mi-> pixmap ( ), mi->text(),
2027 -1, &g.text()); 2036 -1, &g.text());
2028 } 2037 }
2038 delete dummy;
2029 } 2039 }
@@ -2034,3 +2044,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
2034 AlignCenter|ShowPrefix|DontClip|SingleLine, 2044 AlignCenter|ShowPrefix|DontClip|SingleLine,
2035 g, mi->isEnabled(), NULL, mi->text(), 2045 g, mi->isEnabled(), mi-> pixmap ( ), mi->text(),
2036 -1, &g.text()); 2046 -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:
5 5
6 --- -2002-11-18 04:47:41.000000000 +0100 6 --- -2002-11-21 20:45:47.000000000 +0100
7 +++ liquid.h2002-11-18 03:32:40.000000000 +0100 7 +++ liquid.h2002-11-18 03:32:40.000000000 +0100
@@ -143,4 +143,4 @@ Features:
143 QPixmap *pixmaps[BITMAP_ITEMS]; 143 QPixmap *pixmaps[BITMAP_ITEMS];
144 --- -2002-11-18 04:47:41.000000000 +0100 144 --- -2002-11-21 20:45:47.000000000 +0100
145 +++ liquid.cpp2002-11-18 04:46:13.000000000 +0100 145 +++ liquid.cpp2002-11-21 20:27:48.000000000 +0100
146@@ -2,6 +2,9 @@ 146@@ -2,6 +2,9 @@
@@ -343,5 +343,6 @@ Features:
343- w->repaint(); 343- w->repaint();
344- }
345- }
346 + wid-> setBackgroundMode( QWidget::PaletteBackground ); 344 + wid-> setBackgroundMode( QWidget::PaletteBackground );
345 }
346 + delete ol;
347 }
347 } 348 }
@@ -366,5 +367,4 @@ Features:
366- ((LiquidStyle*)parent())->applyCustomAttributes((QPushButton *)w); 367- ((LiquidStyle*)parent())->applyCustomAttributes((QPushButton *)w);
367 + delete ol; 368- }
368 } 369- }
369 }
370+ return(false); 370+ return(false);
@@ -496,6 +496,6 @@ Features:
496+ pixmaps[CBDown] = processEmbedded("checkboxdown", btnH, btnS, btnV /*, true*/); 496+ pixmaps[CBDown] = processEmbedded("checkboxdown", btnH, btnS, btnV /*, true*/);
497 break; 497+ break;
498+ case CBDownHover: 498+ case CBDownHover:
499+ pixmaps[CBDownHover] = processEmbedded("checkboxdown", btnHoverH, btnHoverS, btnHoverV /*, true*/); 499+ pixmaps[CBDownHover] = processEmbedded("checkboxdown", btnHoverH, btnHoverS, btnHoverV /*, true*/);
500+ break; 500 break;
501+ 501+
@@ -1574,3 +1574,3 @@ Features:
1574 p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider)->mask() : 1574 p->drawPixmap(x, y, orient == Qt::Horizontal ? *getPixmap(HSlider)->mask() :
1575@@ -2065,203 +1980,26 @@ 1575@@ -2065,243 +1980,76 @@
1576 p->drawLineSegments(a); 1576 p->drawLineSegments(a);
@@ -1635,5 +1635,5 @@ Features:
1635- } 1635- }
1636-
1637-}
1638 1636
1637-}
1638-
1639-void LiquidStyle::drawKToolBar(QPainter *p, int x, int y, int w, int h, 1639-void LiquidStyle::drawKToolBar(QPainter *p, int x, int y, int w, int h,
@@ -1790,3 +1790,49 @@ Features:
1790 else 1790 else
1791@@ -2300,8 +2038,8 @@ 1791 shadow = g.background().dark(130);
1792
1793 + QPixmap *dummy = 0;
1794 +
1795 + if ( mi-> pixmap ( ) && !mi-> pixmap ( )-> isNull ( )) {
1796 + dummy = new QPixmap ( mi-> pixmap ( )-> size ( ));
1797 + QBitmap dummy_mask ( dummy-> size ( ));
1798 + dummy_mask. fill ( color1 );
1799 + dummy-> setMask ( dummy_mask );
1800 + }
1801+
1802 if(active){
1803 drawClearBevel(p, x+1, y+1, w-1, h-1, g.button(), g.background());
1804 QApplication::style().drawItem(p, x+1, y+1, w, h,
1805 AlignCenter|ShowPrefix|DontClip|SingleLine,
1806- g, mi->isEnabled(), NULL, mi->text(),
1807+ g, mi->isEnabled(), dummy, mi->text(),
1808 -1, &shadow);
1809 QApplication::style().drawItem(p, x, y, w, h,
1810 AlignCenter|ShowPrefix|DontClip|SingleLine,
1811- g, mi->isEnabled(), NULL, mi->text(),
1812+ g, mi->isEnabled(), mi-> pixmap ( ), mi->text(),
1813 -1, &g.text());
1814 }
1815 else{
1816 QApplication::style().drawItem(p, x+1, y+1, w, h,
1817 AlignCenter|ShowPrefix|DontClip|SingleLine,
1818- g, mi->isEnabled(), NULL, mi->text(),
1819+ g, mi->isEnabled(), dummy, mi->text(),
1820 -1, &shadow);
1821 QApplication::style().drawItem(p, x, y, w, h,
1822 AlignCenter|ShowPrefix|DontClip|SingleLine,
1823- g, mi->isEnabled(), NULL, mi->text(),
1824+ g, mi->isEnabled(), mi-> pixmap ( ), mi->text(),
1825 -1, &g.text());
1826 }
1827+ delete dummy;
1828 }
1829 else{
1830 if(active)
1831 drawClearBevel(p, x+1, y+1, w-1, h-1, g.button(), g.background());
1832 QApplication::style().drawItem(p, x, y, w, h,
1833 AlignCenter|ShowPrefix|DontClip|SingleLine,
1834- g, mi->isEnabled(), NULL, mi->text(),
1835+ g, mi->isEnabled(), mi-> pixmap ( ), mi->text(),
1836 -1, &g.text());
1837 }
1792 } 1838 }
@@ -1801,3 +1847,3 @@ Features:
1801 switch(menuHandler->transType()){ 1847 switch(menuHandler->transType()){
1802@@ -2336,8 +2074,6 @@ 1848@@ -2336,8 +2084,6 @@
1803 1849
@@ -1810,3 +1856,3 @@ Features:
1810 QColorGroup itemg = dis ? pal.disabled() : pal.active(); 1856 QColorGroup itemg = dis ? pal.disabled() : pal.active();
1811@@ -2363,7 +2099,7 @@ 1857@@ -2363,7 +2109,7 @@
1812 p->fillRect(x, y, w, h, menuBrush); 1858 p->fillRect(x, y, w, h, menuBrush);
@@ -1819,3 +1865,3 @@ Features:
1819 } 1865 }
1820@@ -2508,25 +2244,6 @@ 1866@@ -2508,25 +2254,6 @@
1821 return h; 1867 return h;
@@ -1845,3 +1891,3 @@ Features:
1845 const QColorGroup &g, const QColor *c, 1891 const QColorGroup &g, const QColor *c,
1846@@ -2536,29 +2253,29 @@ 1892@@ -2536,29 +2263,29 @@
1847 if(p->device()->devType() == QInternal::Widget){ 1893 if(p->device()->devType() == QInternal::Widget){
@@ -1880,3 +1926,3 @@ Features:
1880 QPixmap tilePix; 1926 QPixmap tilePix;
1881@@ -2671,7 +2388,7 @@ 1927@@ -2671,7 +2398,7 @@
1882 vFrame = 8; // was 10 1928 vFrame = 8; // was 10
@@ -1889,3 +1935,3 @@ Features:
1889 1935
1890@@ -2699,7 +2416,7 @@ 1936@@ -2699,7 +2426,7 @@
1891 p->drawLine(x+1, y+1, x+1, y2-1); 1937 p->drawLine(x+1, y+1, x+1, y2-1);
@@ -1898,3 +1944,3 @@ Features:
1898 int x2 = x+w-1; 1944 int x2 = x+w-1;
1899@@ -2726,105 +2443,6 @@ 1945@@ -2726,105 +2453,6 @@
1900 } 1946 }
@@ -2004,3 +2050,3 @@ Features:
2004 { 2050 {
2005@@ -2988,110 +2606,5 @@ 2051@@ -2988,110 +2616,5 @@
2006 } 2052 }
@@ -2115,5 +2161,5 @@ Features:
2115 /* vim: set noet sw=8 ts=8: */ 2161 /* vim: set noet sw=8 ts=8: */
2116 --- -2002-11-18 04:47:41.000000000 +0100 2162 --- -2002-11-21 20:45:47.000000000 +0100
2117 +++ plugin.cpp2002-11-18 03:54:56.000000000 +0100 2163 +++ plugin.cpp2002-11-18 18:11:41.000000000 +0100
2118@@ -1,29 +1,79 @@ 2164@@ -1,29 +1,84 @@
2119+#include <qapplication.h> 2165+#include <qapplication.h>
@@ -2131,2 +2177,11 @@ Features:
2131+} 2177+}
2178+
2179+LiquidInterface::~LiquidInterface ( )
2180+{
2181+}
2182+
2183+QStyle *LiquidInterface::style ( )
2184+{
2185 +return new LiquidStyle ( );
2186+}
2132 2187
@@ -2137,4 +2192,5 @@ Features:
2137- const char *description(); 2192- const char *description();
2138+LiquidInterface::~LiquidInterface ( ) 2193+QString LiquidInterface::name ( ) const
2139+{ 2194+{
2195 +return qApp-> translate ( "Styles", "Liquid" );
2140 } 2196 }
@@ -2142,6 +2198,6 @@ Features:
2142-KStyle* allocate() 2198-KStyle* allocate()
2143+QStyle *LiquidInterface::style ( ) 2199+QString LiquidInterface::description ( ) const
2144 { 2200 {
2145- return(new LiquidStyle); 2201- return(new LiquidStyle);
2146 +return new LiquidStyle ( ); 2202 +return qApp-> translate ( "Styles", "High Performance Liquid style by Mosfet" );
2147 } 2203 }
@@ -2149,6 +2205,6 @@ Features:
2149-int minor_version() 2205-int minor_version()
2150+QString LiquidInterface::name ( ) const 2206+bool LiquidInterface::hasSettings ( ) const
2151 { 2207 {
2152- return(0); 2208- return(0);
2153 +return qApp-> translate ( "Styles", "Liquid" ); 2209 +return true;
2154 } 2210 }
@@ -2156,6 +2212,8 @@ Features:
2156-int major_version() 2212-int major_version()
2157+QString LiquidInterface::description ( ) const 2213+QWidget *LiquidInterface::create ( QWidget *parent, const char *name )
2158 { 2214 {
2159- return(1); 2215- return(1);
2160 +return qApp-> translate ( "Styles", "High Performance Liquid style by Mosfet" ); 2216 +m_widget = new LiquidSettings ( parent, name ? name : "LIQUID-SETTINGS" );
2217 +
2218 +return m_widget;
2161 } 2219 }
@@ -2163,17 +2221,5 @@ Features:
2163-const char *description() 2221-const char *description()
2164+bool LiquidInterface::hasSettings ( ) const 2222+bool LiquidInterface::accept ( )
2165 { 2223 {
2166- return(i18n("High performance liquid plugin").utf8()); 2224- return(i18n("High performance liquid plugin").utf8());
2167 +return true;
2168+}
2169+
2170+QWidget *LiquidInterface::create ( QWidget *parent, const char *name )
2171+{
2172 +m_widget = new LiquidSettings ( parent, name ? name : "LIQUID-SETTINGS" );
2173 +
2174 +return m_widget;
2175+}
2176+
2177+bool LiquidInterface::accept ( )
2178+{
2179 +if ( !m_widget ) 2225 +if ( !m_widget )
@@ -2211 +2257,6 @@ Features:
2211+ 2257+
2258+
2259+// For Sharp ROM
2260+
2261+extern "C" { QStyle *allocate ( ) { return new LiquidStyle ( ); } }
2262+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 ); } }