Diffstat (limited to 'noncore/styles/liquid/liquiddeco.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/styles/liquid/liquiddeco.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/noncore/styles/liquid/liquiddeco.cpp b/noncore/styles/liquid/liquiddeco.cpp index 8eee1b1..5488c67 100644 --- a/noncore/styles/liquid/liquiddeco.cpp +++ b/noncore/styles/liquid/liquiddeco.cpp | |||
@@ -89,51 +89,45 @@ void LiquidDecoration::paint( QPainter *painter, const QWidget *widget ) | |||
89 | 89 | ||
90 | QColorGroup cg = QApplication::palette().active(); | 90 | QColorGroup cg = QApplication::palette().active(); |
91 | if ( isActive ) | 91 | if ( isActive ) |
92 | cg. setBrush ( QColorGroup::Button, cg. brush ( QColorGroup::Highlight ) ); | 92 | cg. setBrush ( QColorGroup::Button, cg. brush ( QColorGroup::Highlight ) ); |
93 | 93 | ||
94 | qDrawWinPanel( painter, br.x(), br.y(), br.width(), | 94 | qDrawWinPanel( painter, br.x(), br.y(), br.width(), |
95 | br.height() - 4, cg, FALSE, | 95 | br.height() - 4, cg, FALSE, |
96 | &cg.brush( QColorGroup::Background ) ); | 96 | &cg.brush( QColorGroup::Background ) ); |
97 | 97 | ||
98 | painter->setClipRegion( oldClip ); | 98 | painter->setClipRegion( oldClip ); |
99 | 99 | ||
100 | if ( titleWidth > 0 ) { | 100 | if ( titleWidth > 0 ) { |
101 | QBrush titleBrush; | ||
102 | QPen titlePen; | ||
103 | QPen titleLines; | ||
104 | int titleLeft = titleHeight + 4; | ||
105 | |||
106 | titleLeft = rect.left() + 5; | ||
107 | painter->setPen( cg.midlight() ); | 101 | painter->setPen( cg.midlight() ); |
108 | painter->drawLine( rect.left() - BORDER_WIDTH + 2, | 102 | painter->drawLine( rect.left() - BORDER_WIDTH + 2, |
109 | rect.bottom() + 1, rect.right() + BORDER_WIDTH - 2, | 103 | rect.bottom() + 1, rect.right() + BORDER_WIDTH - 2, |
110 | rect.bottom() + 1 ); | 104 | rect.bottom() + 1 ); |
111 | 105 | ||
112 | QRect t ( rect.left() - 2, rect.top() - titleHeight - 2, rect.width() + 3, titleHeight + 2 ); | 106 | QRect t ( rect.left() - 2, rect.top() - titleHeight - 2, rect.width() + 3, titleHeight + 2 ); |
113 | 107 | ||
114 | 108 | ||
115 | 109 | ||
116 | QApplication::style().drawBevelButton( painter, t.x(), t.y(), t.width(), t.height(), cg, isActive ); | 110 | QApplication::style().drawBevelButton( painter, t.x(), t.y(), t.width(), t.height(), cg, isActive ); |
117 | 111 | ||
118 | t.setLeft( t.left() + 4 ); | 112 | t .setLeft ( t. left ( ) + 4 ); |
119 | t.setRight( t.right() - 2 ); | 113 | t .setRight ( t. right ( ) - 2 ); |
120 | 114 | ||
121 | QFont f( QApplication::font() ); | 115 | QFont f ( QApplication::font ( )); |
122 | f.setWeight( QFont::Bold ); | 116 | f. setWeight ( QFont::Bold ); |
123 | 117 | ||
124 | painter-> setFont( f ); | 118 | painter-> setFont ( f ); |
125 | 119 | ||
126 | QColor textcol = cg.color( isActive ? QColorGroup::HighlightedText : QColorGroup::Text ); | 120 | QColor textcol = cg.color( isActive ? QColorGroup::HighlightedText : QColorGroup::Text ); |
127 | QColor shadecol = ( qGray ( textcol. rgb ( ) ) > 128 ) ? textcol. dark ( 130 ) : textcol.light( 200 ); | 121 | QColor shadecol = ( qGray ( textcol. rgb ( ) ) > 128 ) ? textcol. dark ( 230 ) : textcol.light( 300 ); |
128 | 122 | ||
129 | if ( textcol == shadecol ) { | 123 | if ( textcol == shadecol ) { |
130 | if ( qGray ( shadecol. rgb ( ) ) < 128 ) | 124 | if ( qGray ( shadecol. rgb ( ) ) < 128 ) |
131 | shadecol = QColor ( 225, 225, 225 ); | 125 | shadecol = QColor ( 225, 225, 225 ); |
132 | else | 126 | else |
133 | shadecol = QColor ( 30, 30, 30 ); | 127 | shadecol = QColor ( 30, 30, 30 ); |
134 | } | 128 | } |
135 | 129 | ||
136 | painter-> setPen( shadecol ); | 130 | painter-> setPen( shadecol ); |
137 | painter-> drawText( t.x() + 1, t.y() + 1, t.width(), t.height(), Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, widget->caption() ); | 131 | painter-> drawText( t.x() + 1, t.y() + 1, t.width(), t.height(), Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, widget->caption() ); |
138 | painter-> setPen( textcol ); | 132 | painter-> setPen( textcol ); |
139 | painter-> drawText( t.x(), t.y(), t.width(), t.height(), Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, widget->caption() ); | 133 | painter-> drawText( t.x(), t.y(), t.width(), t.height(), Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, widget->caption() ); |