summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-07-19 16:16:06 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-07-19 16:16:06 +0900
commitf6627610258aca3aa0208c16c4bd8b30105393cb (patch)
treed26912f6e1eeb4f5918dc3aaa23bf432140f7cb7
parent36c049e135b0cec7cf97b41888860186813df5f0 (diff)
downloadtdelibs-f6627610258aca3aa0208c16c4bd8b30105393cb.tar.gz
tdelibs-f6627610258aca3aa0208c16c4bd8b30105393cb.zip
Drop compatibility code for TQPalette
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--tdeio/tdefile/kurlbar.cpp12
-rw-r--r--tdestyles/keramik/keramik.cpp6
-rw-r--r--tdestyles/klegacy/klegacystyle.cpp12
-rw-r--r--tdestyles/kthemestyle/kthemestyle.cpp6
-rw-r--r--tdeui/kactivelabel.cpp4
-rw-r--r--tdeui/klineedit.cpp4
-rw-r--r--tdeui/ktextedit.cpp2
-rw-r--r--tdeui/kurllabel.cpp2
8 files changed, 24 insertions, 24 deletions
diff --git a/tdeio/tdefile/kurlbar.cpp b/tdeio/tdefile/kurlbar.cpp
index 3912aced3..3dcb5620a 100644
--- a/tdeio/tdefile/kurlbar.cpp
+++ b/tdeio/tdefile/kurlbar.cpp
@@ -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 );
diff --git a/tdestyles/keramik/keramik.cpp b/tdestyles/keramik/keramik.cpp
index 53d6f4316..c33644c66 100644
--- a/tdestyles/keramik/keramik.cpp
+++ b/tdestyles/keramik/keramik.cpp
@@ -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;
diff --git a/tdestyles/klegacy/klegacystyle.cpp b/tdestyles/klegacy/klegacystyle.cpp
index b9fe5f688..ecd03b3c5 100644
--- a/tdestyles/klegacy/klegacystyle.cpp
+++ b/tdestyles/klegacy/klegacystyle.cpp
@@ -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);
diff --git a/tdestyles/kthemestyle/kthemestyle.cpp b/tdestyles/kthemestyle/kthemestyle.cpp
index 899d4681d..b92c0e841 100644
--- a/tdestyles/kthemestyle/kthemestyle.cpp
+++ b/tdestyles/kthemestyle/kthemestyle.cpp
@@ -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);
diff --git a/tdeui/kactivelabel.cpp b/tdeui/kactivelabel.cpp
index 0e5abc5ad..7dad563b2 100644
--- a/tdeui/kactivelabel.cpp
+++ b/tdeui/kactivelabel.cpp
@@ -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);
}
diff --git a/tdeui/klineedit.cpp b/tdeui/klineedit.cpp
index 92afc91fd..07fbc58b9 100644
--- a/tdeui/klineedit.cpp
+++ b/tdeui/klineedit.cpp
@@ -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;
}
diff --git a/tdeui/ktextedit.cpp b/tdeui/ktextedit.cpp
index 3ebb1375f..e0208be82 100644
--- a/tdeui/ktextedit.cpp
+++ b/tdeui/ktextedit.cpp
@@ -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 );
diff --git a/tdeui/kurllabel.cpp b/tdeui/kurllabel.cpp
index 539984466..8034423b4 100644
--- a/tdeui/kurllabel.cpp
+++ b/tdeui/kurllabel.cpp
@@ -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();