-rw-r--r-- | noncore/styles/metal/metal.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/styles/metal/metal.cpp b/noncore/styles/metal/metal.cpp index 5cb2d22..e13a249 100644 --- a/noncore/styles/metal/metal.cpp +++ b/noncore/styles/metal/metal.cpp | |||
@@ -1,66 +1,65 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | ||
3 | ** | 2 | ** |
4 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 3 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
5 | ** | 4 | ** |
6 | ** This file is part of an example program for Qt. This example | 5 | ** This file is part of an example program for Qt. This example |
7 | ** program may be used, distributed and modified without limitation. | 6 | ** program may be used, distributed and modified without limitation. |
8 | ** | 7 | ** |
9 | *****************************************************************************/ | 8 | *****************************************************************************/ |
10 | 9 | ||
11 | #include "metal.h" | 10 | #include "metal.h" |
12 | #include <qapplication.h> | 11 | #include <qapplication.h> |
13 | #include <qpushbutton.h> | 12 | #include <qpushbutton.h> |
14 | #include <qscrollbar.h> | 13 | #include <qscrollbar.h> |
15 | #include <limits.h> | 14 | #include <limits.h> |
16 | 15 | ||
17 | 16 | ||
18 | ///////////////////////////////////////////////////////// | 17 | ///////////////////////////////////////////////////////// |
19 | #include "stonedark.xpm" | 18 | #include "stonedark.xpm" |
20 | #include "stone1.xpm" | 19 | #include "stone1.xpm" |
21 | #include "marble.xpm" | 20 | #include "marble.xpm" |
22 | /////////////////////////////////////////////////////// | 21 | /////////////////////////////////////////////////////// |
23 | 22 | ||
24 | 23 | ||
25 | 24 | ||
26 | MetalStyle::MetalStyle() : QWindowsStyle() { } | 25 | MetalStyle::MetalStyle() : QWindowsStyle() { } |
27 | 26 | ||
28 | /*! | 27 | /*! |
29 | Reimplementation from QStyle | 28 | Reimplementation from QStyle |
30 | */ | 29 | */ |
31 | void MetalStyle::polish( QApplication *app) | 30 | void MetalStyle::polish( QApplication *app) |
32 | { | 31 | { |
33 | oldPalette = app->palette(); | 32 | oldPalette = app->palette(); |
34 | 33 | ||
35 | // we simply create a nice QColorGroup with a couple of fancy | 34 | // we simply create a nice QColorGroup with a couple of fancy |
36 | // pixmaps here and apply to it all widgets | 35 | // pixmaps here and apply to it all widgets |
37 | 36 | ||
38 | QFont f("times", app->font().pointSize() ); | 37 | QFont f("times", app->font().pointSize() ); |
39 | f.setBold( TRUE ); | 38 | f.setBold( TRUE ); |
40 | f.setItalic( TRUE ); | 39 | f.setItalic( TRUE ); |
41 | app->setFont( f, TRUE, "QMenuBar"); | 40 | app->setFont( f, TRUE, "QMenuBar"); |
42 | app->setFont( f, TRUE, "QPopupMenu"); | 41 | app->setFont( f, TRUE, "QPopupMenu"); |
43 | 42 | ||
44 | 43 | ||
45 | //QPixmap button( stone1_xpm ); | 44 | //QPixmap button( stone1_xpm ); |
46 | QPixmap button( stonedark_xpm ); | 45 | QPixmap button( stonedark_xpm ); |
47 | QPixmap background(marble_xpm); | 46 | QPixmap background(marble_xpm); |
48 | #if 0 | 47 | #if 0 |
49 | 48 | ||
50 | int i; | 49 | int i; |
51 | for (i=0; i<img.numColors(); i++) { | 50 | for (i=0; i<img.numColors(); i++) { |
52 | QRgb rgb = img.color(i); | 51 | QRgb rgb = img.color(i); |
53 | QColor c(rgb); | 52 | QColor c(rgb); |
54 | rgb = c.dark().rgb(); | 53 | rgb = c.dark().rgb(); |
55 | img.setColor(i,rgb); | 54 | img.setColor(i,rgb); |
56 | } | 55 | } |
57 | QPixmap mid; | 56 | QPixmap mid; |
58 | mid.convertFromImage(img); | 57 | mid.convertFromImage(img); |
59 | 58 | ||
60 | img = orig; | 59 | img = orig; |
61 | for (i=0; i<img.numColors(); i++) { | 60 | for (i=0; i<img.numColors(); i++) { |
62 | QRgb rgb = img.color(i); | 61 | QRgb rgb = img.color(i); |
63 | QColor c(rgb); | 62 | QColor c(rgb); |
64 | rgb = c.light().rgb(); | 63 | rgb = c.light().rgb(); |
65 | img.setColor(i,rgb); | 64 | img.setColor(i,rgb); |
66 | } | 65 | } |