| 154 | |
| 155 | |
| 156 | void LmmsStyle::drawComplexControl( ComplexControl control, |
| 157 | const QStyleOptionComplex * option, |
| 158 | QPainter *painter, |
| 159 | const QWidget *widget ) const |
| 160 | { |
| 161 | // fix broken titlebar styling on win32 |
| 162 | if( control == CC_TitleBar ) |
| 163 | { |
| 164 | const QStyleOptionTitleBar * titleBar = |
| 165 | qstyleoption_cast<const QStyleOptionTitleBar *>(option ); |
| 166 | if( titleBar ) |
| 167 | { |
| 168 | QStyleOptionTitleBar so( *titleBar ); |
| 169 | so.palette = standardPalette(); |
| 170 | so.palette.setColor( QPalette::HighlightedText, |
| 171 | ( titleBar->titleBarState & State_Active ) ? |
| 172 | QColor( 255, 255, 255 ) : |
| 173 | QColor( 192, 192, 192 ) ); |
| 174 | so.palette.setColor( QPalette::Text, |
| 175 | QColor( 64, 64, 64 ) ); |
| 176 | QProxyStyle::drawComplexControl( control, &so, |
| 177 | painter, widget ); |
| 178 | return; |
| 179 | } |
| 180 | } |
| 181 | else if (control == CC_MdiControls) |
| 182 | { |
| 183 | QStyleOptionComplex so(*option); |
| 184 | so.palette.setColor(QPalette::Button, QColor(223, 228, 236)); |
| 185 | QProxyStyle::drawComplexControl(control, &so, painter, widget); |
| 186 | return; |
| 187 | } |
| 188 | /* else if( control == CC_ScrollBar ) |
| 189 | { |
| 190 | painter->fillRect( option->rect, QApplication::palette().color( QPalette::Active, |
| 191 | QPalette::Background ) ); |
| 192 | |
| 193 | }*/ |
| 194 | QProxyStyle::drawComplexControl( control, option, painter, widget ); |
| 195 | } |
| 196 | |
| 197 | |
| 198 | |