-rw-r--r-- | noncore/styles/liquid/liquid.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp index e6d8310..4a65952 100644 --- a/noncore/styles/liquid/liquid.cpp +++ b/noncore/styles/liquid/liquid.cpp | |||
@@ -26,30 +26,32 @@ | |||
26 | #include <qtimer.h> | 26 | #include <qtimer.h> |
27 | #include <qpixmapcache.h> | 27 | #include <qpixmapcache.h> |
28 | #include <qradiobutton.h> | 28 | #include <qradiobutton.h> |
29 | #include <qcombobox.h> | 29 | #include <qcombobox.h> |
30 | #include <qdrawutil.h> | 30 | #include <qdrawutil.h> |
31 | #include <qwidgetlist.h> | 31 | #include <qwidgetlist.h> |
32 | #include <qtoolbutton.h> | 32 | #include <qtoolbutton.h> |
33 | #include <qheader.h> | 33 | #include <qheader.h> |
34 | #include <unistd.h> | 34 | #include <unistd.h> |
35 | #include <qmenubar.h> | 35 | #include <qmenubar.h> |
36 | #include <qprogressbar.h> | 36 | #include <qprogressbar.h> |
37 | #include <qlineedit.h> | 37 | #include <qlineedit.h> |
38 | #include <qlistbox.h> | ||
38 | 39 | ||
39 | #include <stdio.h> | 40 | #include <stdio.h> |
40 | 41 | ||
41 | #include "htmlmasks.h" | 42 | #include "htmlmasks.h" |
42 | #include "embeddata.h" | 43 | #include "embeddata.h" |
43 | 44 | ||
45 | |||
44 | typedef void (QStyle::*QDrawMenuBarItemImpl) (QPainter *, int, int, int, int, QMenuItem *, | 46 | typedef void (QStyle::*QDrawMenuBarItemImpl) (QPainter *, int, int, int, int, QMenuItem *, |
45 | QColorGroup &, bool, bool); | 47 | QColorGroup &, bool, bool); |
46 | 48 | ||
47 | QDrawMenuBarItemImpl qt_set_draw_menu_bar_impl(QDrawMenuBarItemImpl impl); | 49 | QDrawMenuBarItemImpl qt_set_draw_menu_bar_impl(QDrawMenuBarItemImpl impl); |
48 | 50 | ||
49 | void TransMenuHandler::stripePixmap(QPixmap &pix, const QColor &color) | 51 | void TransMenuHandler::stripePixmap(QPixmap &pix, const QColor &color) |
50 | { | 52 | { |
51 | QImage img(pix.convertToImage()); | 53 | QImage img(pix.convertToImage()); |
52 | QImageEffect::fade(img, 0.9, color); | 54 | QImageEffect::fade(img, 0.9, color); |
53 | int x, y; | 55 | int x, y; |
54 | int r, g, b; | 56 | int r, g, b; |
55 | for(y=0; y < img.height(); y+=3){ | 57 | for(y=0; y < img.height(); y+=3){ |
@@ -1399,25 +1401,26 @@ QRect LiquidStyle::buttonRect(int x, int y, int w, int h) | |||
1399 | 1401 | ||
1400 | void LiquidStyle::drawComboButton(QPainter *painter, int x, int y, int w, int h, | 1402 | void LiquidStyle::drawComboButton(QPainter *painter, int x, int y, int w, int h, |
1401 | const QColorGroup &g, bool sunken, | 1403 | const QColorGroup &g, bool sunken, |
1402 | bool edit, bool, const QBrush *) | 1404 | bool edit, bool, const QBrush *) |
1403 | { | 1405 | { |
1404 | bool isActive = false; | 1406 | bool isActive = false; |
1405 | if (( painter->device()->devType() == QInternal::Widget ) && | 1407 | if (( painter->device()->devType() == QInternal::Widget ) && |
1406 | ( | 1408 | ( |
1407 | ( qApp-> focusWidget ( ) == painter-> device ( )) || | 1409 | ( qApp-> focusWidget ( ) == painter-> device ( )) || |
1408 | ( | 1410 | ( |
1409 | edit && | 1411 | edit && |
1410 | ((QWidget *) painter-> device ( ))-> inherits ( "QComboBox" ) && | 1412 | ((QWidget *) painter-> device ( ))-> inherits ( "QComboBox" ) && |
1411 | ( qApp-> focusWidget ( ) == ((QComboBox *) painter->device())->lineEdit ( )) | 1413 | ( qApp-> focusWidget ( ) == ((QComboBox *) painter->device())->lineEdit ( ) || |
1414 | qApp-> focusWidget ( ) == ((QComboBox *) painter->device())->listBox ( )) | ||
1412 | ) | 1415 | ) |
1413 | ) | 1416 | ) |
1414 | ) { | 1417 | ) { |
1415 | isActive = true; | 1418 | isActive = true; |
1416 | } | 1419 | } |
1417 | 1420 | ||
1418 | bool isMasked = false; | 1421 | bool isMasked = false; |
1419 | if(painter->device()->devType() == QInternal::Widget) | 1422 | if(painter->device()->devType() == QInternal::Widget) |
1420 | isMasked = ((QWidget*)painter->device())->autoMask(); | 1423 | isMasked = ((QWidget*)painter->device())->autoMask(); |
1421 | // TODO: Do custom code, don't just call drawRoundButton into a pixmap | 1424 | // TODO: Do custom code, don't just call drawRoundButton into a pixmap |
1422 | QPixmap tmpPix(w, h); | 1425 | QPixmap tmpPix(w, h); |
1423 | QPainter p(&tmpPix); | 1426 | QPainter p(&tmpPix); |