Drop compatibility code for TQPalette

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/80/head
Michele Calgaro 1 year ago
parent 3055550710
commit 5863ef46cf
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -185,18 +185,18 @@ void KAddressBookCardView::readConfig( TDEConfig *config )
// costum colors? // costum colors?
if ( config->readBoolEntry( "EnableCustomColors", false ) ) { if ( config->readBoolEntry( "EnableCustomColors", false ) ) {
TQPalette p( mCardView->palette() ); TQPalette p( mCardView->palette() );
TQColor c = p.color( TQPalette::Normal, TQColorGroup::Base ); TQColor c = p.color( TQPalette::Active, TQColorGroup::Base );
p.setColor( TQPalette::Normal, TQColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) ); p.setColor( TQPalette::Active, TQColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) );
c = p.color( TQPalette::Normal, TQColorGroup::Text ); c = p.color( TQPalette::Active, TQColorGroup::Text );
p.setColor( TQPalette::Normal, TQColorGroup::Text, config->readColorEntry( "TextColor", &c ) ); p.setColor( TQPalette::Active, TQColorGroup::Text, config->readColorEntry( "TextColor", &c ) );
c = p.color( TQPalette::Normal, TQColorGroup::Button ); c = p.color( TQPalette::Active, TQColorGroup::Button );
p.setColor( TQPalette::Normal, TQColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) ); p.setColor( TQPalette::Active, TQColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) );
c = p.color( TQPalette::Normal, TQColorGroup::ButtonText ); c = p.color( TQPalette::Active, TQColorGroup::ButtonText );
p.setColor( TQPalette::Normal, TQColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) ); p.setColor( TQPalette::Active, TQColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) );
c = p.color( TQPalette::Normal, TQColorGroup::Highlight ); c = p.color( TQPalette::Active, TQColorGroup::Highlight );
p.setColor( TQPalette::Normal, TQColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) ); p.setColor( TQPalette::Active, TQColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) );
c = p.color( TQPalette::Normal, TQColorGroup::HighlightedText ); c = p.color( TQPalette::Active, TQColorGroup::HighlightedText );
p.setColor( TQPalette::Normal, TQColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) ); p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) );
mCardView->viewport()->setPalette( p ); mCardView->viewport()->setPalette( p );
} else { } else {
// needed if turned off during a session. // needed if turned off during a session.

@ -259,7 +259,7 @@ void MonthViewItem::paint( TQPainter *p )
} }
if ( !bgColor.isValid() ) { if ( !bgColor.isValid() ) {
bgColor = palette().color( TQPalette::Normal, bgColor = palette().color( TQPalette::Active,
sel ? TQColorGroup::Highlight : sel ? TQColorGroup::Highlight :
TQColorGroup::Background ); TQColorGroup::Background );
} }
@ -286,7 +286,7 @@ void MonthViewItem::paint( TQPainter *p )
} }
if ( !frameColor.isValid() ) { if ( !frameColor.isValid() ) {
frameColor = palette().color( TQPalette::Normal, frameColor = palette().color( TQPalette::Active,
sel ? TQColorGroup::Highlight : sel ? TQColorGroup::Highlight :
TQColorGroup::Foreground ); TQColorGroup::Foreground );
} else { } else {

Loading…
Cancel
Save