summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/appearance2/appearance.cpp25
-rw-r--r--noncore/settings/appearance2/sample.cpp4
-rw-r--r--noncore/settings/appearance2/sample.h2
3 files changed, 18 insertions, 13 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp
index 2f3ba74..e9e0ad9 100644
--- a/noncore/settings/appearance2/appearance.cpp
+++ b/noncore/settings/appearance2/appearance.cpp
@@ -422,8 +422,10 @@ Appearance::Appearance( QWidget* parent, const char* name, WFlags )
QWidget *styletab;
-
- tw-> addTab ( styletab = createStyleTab ( tw, config ), "appearance/style.png", tr( "Style" ));
- tw-> addTab ( createFontTab ( tw, config ), "appearance/font.png", tr( "Font" ));
- tw-> addTab ( createColorTab ( tw, config ), "appearance/color.png", tr( "Colors" ) );
- tw-> addTab ( createDecoTab ( tw, config ), "appearance/deco.png", tr( "Windows" ) );
- tw-> addTab ( m_advtab = createAdvancedTab ( tw, config ), "appearance/advanced.png", tr( "Advanced" ) );
+
+ m_color_list = 0;
+
+ tw-> addTab ( styletab = createStyleTab ( tw, config ), "appearance/style", tr( "Style" ));
+ tw-> addTab ( createFontTab ( tw, config ), "appearance/font", tr( "Font" ));
+ tw-> addTab ( createColorTab ( tw, config ), "appearance/color", tr( "Colors" ) );
+ tw-> addTab ( createDecoTab ( tw, config ), "appearance/deco", tr( "Windows" ) );
+ tw-> addTab ( m_advtab = createAdvancedTab ( tw, config ), "appearance/advanced", tr( "Advanced" ) );
@@ -530,6 +532,9 @@ void Appearance::styleClicked ( int index )
m_style_settings-> setEnabled ( sli ? sli-> hasSettings ( ) : false );
-
- if ( m_sample && sli && sli-> style ( ))
- m_sample-> setStyle2 ( sli-> style ( ));
-
+
+ if ( m_sample && sli && sli-> style ( )) {
+ int ci = m_color_list ? m_color_list-> currentItem ( ) : -1;
+
+ m_sample-> setStyle2 ( sli-> style ( ), ci < 0 ? palette ( ) : ((ColorListItem *) m_color_list-> item ( ci ))-> palette ( ));
+ }
+
m_style_changed |= ( index != m_original_style );
diff --git a/noncore/settings/appearance2/sample.cpp b/noncore/settings/appearance2/sample.cpp
index 6bbed4b..b3a9d48 100644
--- a/noncore/settings/appearance2/sample.cpp
+++ b/noncore/settings/appearance2/sample.cpp
@@ -111,3 +111,3 @@ static void setStyleRecursive ( QWidget *w, QStyle *s )
-void SampleWindow::setStyle2 ( QStyle *sty )
+void SampleWindow::setStyle2 ( QStyle *sty, const QPalette &pal )
{
@@ -118,3 +118,3 @@ void SampleWindow::setStyle2 ( QStyle *sty )
QPixmapCache::clear ( );
- QPalette p = palette ( );
+ QPalette p = pal; // ette ( );
sty-> polish ( p );
diff --git a/noncore/settings/appearance2/sample.h b/noncore/settings/appearance2/sample.h
index c861228..27e6db5 100644
--- a/noncore/settings/appearance2/sample.h
+++ b/noncore/settings/appearance2/sample.h
@@ -49,3 +49,3 @@ public:
- void setStyle2 ( QStyle *sty );
+ void setStyle2 ( QStyle *sty, const QPalette &p );
void setDecoration( WindowDecorationInterface *i );