summaryrefslogtreecommitdiff
path: root/noncore/settings/appearance2/appearance.cpp
authorsandman <sandman>2002-12-17 19:23:17 (UTC)
committer sandman <sandman>2002-12-17 19:23:17 (UTC)
commit7459ea6f560b01290086a0919fc5808291973b33 (patch) (side-by-side diff)
treefb74789d6229c61a0f629939a7402a31f734f7f7 /noncore/settings/appearance2/appearance.cpp
parentf36c70938c8c2907a1b61637af3bd589262b4b5e (diff)
downloadopie-7459ea6f560b01290086a0919fc5808291973b33.zip
opie-7459ea6f560b01290086a0919fc5808291973b33.tar.gz
opie-7459ea6f560b01290086a0919fc5808291973b33.tar.bz2
- small fix to reset the palette when changing styles
Diffstat (limited to 'noncore/settings/appearance2/appearance.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/appearance2/appearance.cpp25
1 files changed, 15 insertions, 10 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
@@ -420,12 +420,14 @@ Appearance::Appearance( QWidget* parent, const char* name, WFlags )
OTabWidget* tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom );
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" ) );
top-> addWidget ( tw, 10 );
top-> addWidget ( m_sample, 1 );
@@ -528,10 +530,13 @@ void Appearance::styleClicked ( int index )
{
StyleListItem *sli = (StyleListItem *) m_style_list-> item ( 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 );
}