Diffstat (limited to 'noncore/apps/oxygen/psewidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/psewidget.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp index d7126b9..d8e4086 100644 --- a/noncore/apps/oxygen/psewidget.cpp +++ b/noncore/apps/oxygen/psewidget.cpp | |||
@@ -29,4 +29,6 @@ PSEWidget::PSEWidget() : QWidget() | |||
29 | this->setCaption( tr( "Periodic System" ) ); | 29 | this->setCaption( tr( "Periodic System" ) ); |
30 | 30 | ||
31 | lastElement=1; | ||
32 | |||
31 | QVBoxLayout *vlay = new QVBoxLayout( this ); | 33 | QVBoxLayout *vlay = new QVBoxLayout( this ); |
32 | 34 | ||
@@ -71,12 +73,16 @@ void PSEWidget::inverseColor( QString number ) | |||
71 | configobj.setGroup( number ); | 73 | configobj.setGroup( number ); |
72 | QString block = configobj.readEntry( "Block" ); | 74 | QString block = configobj.readEntry( "Block" ); |
73 | QColor c; | 75 | QColor c, d; |
74 | if ( block == "s" ) c.setRgb( 213 , 233 , 231 ); | 76 | c = PSEColor( block ); |
75 | else if ( block == "d" ) c.setRgb( 200,230,160 ); | 77 | d = c.dark(); |
76 | else if ( block == "p" ) c.setRgb( 238,146,138 ); | 78 | |
77 | else if ( block == "f" ) c.setRgb( 190 , 190 , 190 ); | 79 | PSEframe.at( number.toUInt() )->setPalette( QPalette( d ) ); |
78 | c.dark(); | 80 | |
81 | configobj.setGroup( QString::number( lastElement+1 ) ); | ||
82 | block = configobj.readEntry( "Block" ); | ||
83 | c = PSEColor( block ); | ||
84 | PSEframe.at( lastElement )->setPalette( QPalette( c ) ); | ||
79 | 85 | ||
80 | PSEframe.at( number.toUInt() )->setPalette( QPalette( c ) ); | 86 | lastElement=number.toInt(); |
81 | } | 87 | } |
82 | 88 | ||