summaryrefslogtreecommitdiffstats
path: root/kdm/kfrontend/themer/kdmrect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdm/kfrontend/themer/kdmrect.cpp')
-rw-r--r--kdm/kfrontend/themer/kdmrect.cpp32
1 files changed, 25 insertions, 7 deletions
diff --git a/kdm/kfrontend/themer/kdmrect.cpp b/kdm/kfrontend/themer/kdmrect.cpp
index 961809a37..1d854d213 100644
--- a/kdm/kfrontend/themer/kdmrect.cpp
+++ b/kdm/kfrontend/themer/kdmrect.cpp
@@ -33,6 +33,18 @@
KdmRect::KdmRect( KdmItem *parent, const TQDomNode &node, const char *name )
: KdmItem( parent, node, name )
{
+ init( node, name );
+}
+
+KdmRect::KdmRect( TQWidget *parent, const TQDomNode &node, const char *name )
+ : KdmItem( parent, node, name )
+{
+ init( node, name );
+}
+
+void
+KdmRect::init( const TQDomNode &node, const char * )
+{
itemType = "rect";
// Set default values for rect (note: strings are already Null)
@@ -137,13 +149,6 @@ KdmRect::recursiveSetAttribs( TQLayoutItem *li )
}
void
-KdmRect::setWidget( TQWidget *widget )
-{
- KdmItem::setWidget( widget );
- setAttribs( widget );
-}
-
-void
KdmRect::setLayoutItem( TQLayoutItem *item )
{
KdmItem::setLayoutItem( item );
@@ -151,4 +156,17 @@ KdmRect::setLayoutItem( TQLayoutItem *item )
}
*/
+void
+KdmRect::setWidget( TQWidget *widget )
+{
+ if ( rect.normal.color.isValid() && widget )
+ {
+ TQPalette p = widget->palette();
+ p.setColor( TQPalette::Normal, TQColorGroup::Text, rect.normal.color );
+ widget->setPalette(p);
+ }
+ KdmItem::setWidget( widget );
+ //setAttribs( widget );
+}
+
#include "kdmrect.moc"