Drop compatibility code for TQPalette

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/215/head
Michele Calgaro 1 year ago
parent 36c049e135
commit f662761025
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -455,12 +455,12 @@ void KURLBar::resizeEvent( TQResizeEvent *e )
void KURLBar::paletteChange( const TQPalette & )
{
TQPalette pal = palette();
TQColor gray = pal.color( TQPalette::Normal, TQColorGroup::Background );
TQColor selectedTextColor = pal.color( TQPalette::Normal, TQColorGroup::BrightText );
TQColor foreground = pal.color( TQPalette::Normal, TQColorGroup::Foreground );
pal.setColor( TQPalette::Normal, TQColorGroup::Base, gray );
pal.setColor( TQPalette::Normal, TQColorGroup::HighlightedText, selectedTextColor );
pal.setColor( TQPalette::Normal, TQColorGroup::Text, foreground );
TQColor gray = pal.color( TQPalette::Active, TQColorGroup::Background );
TQColor selectedTextColor = pal.color( TQPalette::Active, TQColorGroup::BrightText );
TQColor foreground = pal.color( TQPalette::Active, TQColorGroup::Foreground );
pal.setColor( TQPalette::Active, TQColorGroup::Base, gray );
pal.setColor( TQPalette::Active, TQColorGroup::HighlightedText, selectedTextColor );
pal.setColor( TQPalette::Active, TQColorGroup::Text, foreground );
pal.setColor( TQPalette::Inactive, TQColorGroup::Base, gray );
pal.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, selectedTextColor );
pal.setColor( TQPalette::Inactive, TQColorGroup::Text, foreground );

@ -2812,7 +2812,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
TQWidget* widget = TQT_TQWIDGET( object );
TQPainter p( widget );
Keramik::RectTilePainter( keramik_frame_shadow, false, false, 2, 2 ).draw( &p, ceData.rect,
widget->palette().color( TQPalette::Normal, TQColorGroup::Button ),
widget->palette().color( TQPalette::Active, TQColorGroup::Button ),
Qt::black, false, Keramik::TilePainter::PaintFullBlend);
recursion = false;
return true;
@ -2859,8 +2859,8 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
{
TQPainter p( listbox );
Keramik::RectTilePainter( keramik_combobox_list, false, false ).draw( &p, 0, 0, listbox->width(), listbox->height(),
listbox->palette().color( TQPalette::Normal, TQColorGroup::Button ),
listbox->palette().color( TQPalette::Normal, TQColorGroup::Background ) );
listbox->palette().color( TQPalette::Active, TQColorGroup::Button ),
listbox->palette().color( TQPalette::Active, TQColorGroup::Background ) );
TQPaintEvent newpaint( paint->region().intersect( listbox->contentsRect() ), paint->erased() );
recursion = true;

@ -1819,9 +1819,9 @@ void KLegacyStyle::polish(TQApplication *app) {
brush.setColor(gobj->backColor(KLegacy::Active));
pal.setBrush(TQPalette::Active, TQColorGroup::Button, brush);
brush = pal.brush(TQPalette::Normal, TQColorGroup::Button);
brush = pal.brush(TQPalette::Active, TQColorGroup::Button);
brush.setColor(gobj->backColor(KLegacy::Normal));
pal.setBrush(TQPalette::Normal, TQColorGroup::Button, brush);
pal.setBrush(TQPalette::Active, TQColorGroup::Button, brush);
brush = pal.brush(TQPalette::Disabled, TQColorGroup::Button);
brush.setColor(gobj->backColor(KLegacy::Insensitive));
@ -3275,11 +3275,11 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
if (pix && (! pix->isNull())) {
TQPalette pal = w->palette();
TQBrush brush = pal.brush(TQPalette::Normal,
TQBrush brush = pal.brush(TQPalette::Active,
TQColorGroup::Background);
brush.setPixmap(*pix);
pal.setBrush(TQPalette::Normal,
pal.setBrush(TQPalette::Active,
TQColorGroup::Background, brush);
w->setPalette(pal);
@ -3303,11 +3303,11 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
if (pix && (! pix->isNull())) {
TQPalette pal = w->palette();
TQBrush brush = pal.brush(TQPalette::Normal,
TQBrush brush = pal.brush(TQPalette::Active,
TQColorGroup::Background);
brush.setPixmap(*pix);
pal.setBrush(TQPalette::Normal,
pal.setBrush(TQPalette::Active,
TQColorGroup::Background, brush);
w->setPalette(pal);

@ -450,7 +450,7 @@ void KThemeStyle::polish( TQPalette &p )
if ( isPixmap( Background ) )
{
TQBrush bgBrush( p.color( TQPalette::Normal,
TQBrush bgBrush( p.color( TQPalette::Active,
TQColorGroup::Background ),
*uncached( Background ) );
brushHandle = uncached( Background )->handle();
@ -499,7 +499,7 @@ bool KThemeStyle::objectEventHandler( const TQStyleControlElementData &ceData, C
pos.x(), pos.y());
p.end();
TQPalette pal(w->palette());
TQBrush brush( pal.color( TQPalette::Normal,
TQBrush brush( pal.color( TQPalette::Active,
TQColorGroup::Background),
pix );
pal.setBrush(TQColorGroup::Base, brush);
@ -524,7 +524,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
TQWidget *w = reinterpret_cast<TQWidget*>(ptr);
if (::tqqt_cast<TQStatusBar*>(w))
w->setPaletteBackgroundColor(TQApplication::palette().color(TQPalette::Normal, TQColorGroup::Background));
w->setPaletteBackgroundColor(TQApplication::palette().color(TQPalette::Active, TQColorGroup::Background));
if (::tqqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget"))
installObjectEventHandler(ceData, elementFlags, ptr, this);

@ -59,8 +59,8 @@ void KActiveLabel::init()
void KActiveLabel::paletteChanged()
{
TQPalette p = kapp ? kapp->palette() : palette();
p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background));
p.setColor(TQColorGroup::Text, p.color(TQPalette::Normal, TQColorGroup::Foreground));
p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Active, TQColorGroup::Background));
p.setColor(TQColorGroup::Text, p.color(TQPalette::Active, TQColorGroup::Foreground));
setPalette(p);
}

@ -140,9 +140,9 @@ void KLineEdit::init()
TQPalette p = palette();
if ( !d->previousHighlightedTextColor.isValid() )
d->previousHighlightedTextColor=p.color(TQPalette::Normal,TQColorGroup::HighlightedText);
d->previousHighlightedTextColor=p.color(TQPalette::Active,TQColorGroup::HighlightedText);
if ( !d->previousHighlightColor.isValid() )
d->previousHighlightColor=p.color(TQPalette::Normal,TQColorGroup::Highlight);
d->previousHighlightColor=p.color(TQPalette::Active,TQColorGroup::Highlight);
d->drawClickMsg = false;
}

@ -332,7 +332,7 @@ void KTextEdit::setReadOnly(bool readOnly)
if ( d->customPalette )
{
TQPalette p = palette();
TQColor color = p.color(TQPalette::Normal, TQColorGroup::Base);
TQColor color = p.color(TQPalette::Active, TQColorGroup::Base);
p.setColor(TQColorGroup::Base, color);
p.setColor(TQColorGroup::Background, color);
setPalette( p );

@ -355,7 +355,7 @@ bool KURLLabel::event (TQEvent *e)
{
// use parentWidget() unless you are a toplevel widget, then try qAapp
TQPalette p = parentWidget() ? parentWidget()->palette() : tqApp->palette();
p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background));
p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Active, TQColorGroup::Background));
p.setColor(TQColorGroup::Foreground, palette().active().foreground());
setPalette(p);
d->LinkColor = TDEGlobalSettings::linkColor();

Loading…
Cancel
Save