summaryrefslogtreecommitdiff
path: root/noncore/settings/appearance2
Unidiff
Diffstat (limited to 'noncore/settings/appearance2') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/appearance2/appearance.cpp3
-rw-r--r--noncore/settings/appearance2/colorlistitem.h7
-rw-r--r--noncore/settings/appearance2/decolistitem.h1
3 files changed, 7 insertions, 4 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp
index c376ec7..00128d3 100644
--- a/noncore/settings/appearance2/appearance.cpp
+++ b/noncore/settings/appearance2/appearance.cpp
@@ -166,25 +166,25 @@ QWidget *Appearance::createStyleTab ( QWidget *parent, Config &cfg )
166 return tab; 166 return tab;
167} 167}
168 168
169QWidget *Appearance::createDecoTab ( QWidget *parent, Config &cfg ) 169QWidget *Appearance::createDecoTab ( QWidget *parent, Config &cfg )
170{ 170{
171 QWidget* tab = new QWidget( parent, "DecoTab" ); 171 QWidget* tab = new QWidget( parent, "DecoTab" );
172 QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 ); 172 QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 );
173 173
174 m_deco_list = new QListBox( tab, "m_deco_list" ); 174 m_deco_list = new QListBox( tab, "m_deco_list" );
175 vertLayout->addWidget( m_deco_list ); 175 vertLayout->addWidget( m_deco_list );
176 QWhatsThis::add( m_deco_list, tr( "Window decorations control the way the application title bar and its buttons appear.\n\nClick here to select an available decoration." ) ); 176 QWhatsThis::add( m_deco_list, tr( "Window decorations control the way the application title bar and its buttons appear.\n\nClick here to select an available decoration." ) );
177 177
178 QString s = cfg. readEntry ( "Decoration" ); 178 QString s = cfg. readEntry ( "Decoration", "libflat.so" );
179 179
180 m_deco_list-> insertItem ( new DecoListItem ( "QPE" )); 180 m_deco_list-> insertItem ( new DecoListItem ( "QPE" ));
181 181
182 { 182 {
183 QString path = QPEApplication::qpeDir(); 183 QString path = QPEApplication::qpeDir();
184 path.append( "/plugins/decorations/" ); 184 path.append( "/plugins/decorations/" );
185 QStringList sl = QDir ( path, "lib*.so" ). entryList ( ); 185 QStringList sl = QDir ( path, "lib*.so" ). entryList ( );
186 186
187 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) { 187 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) {
188 QString libstr = path; 188 QString libstr = path;
189 libstr.append( "/" ); 189 libstr.append( "/" );
190 libstr.append( *it ); 190 libstr.append( *it );
@@ -448,24 +448,25 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
448 448
449Appearance::Appearance( QWidget* parent, const char* name, WFlags ) 449Appearance::Appearance( QWidget* parent, const char* name, WFlags )
450 : QDialog ( parent, name, true, WStyle_ContextHelp ) 450 : QDialog ( parent, name, true, WStyle_ContextHelp )
451{ 451{
452 setCaption( tr( "Appearance Settings" ) ); 452 setCaption( tr( "Appearance Settings" ) );
453 453
454 Config config( "qpe" ); 454 Config config( "qpe" );
455 config.setGroup( "Appearance" ); 455 config.setGroup( "Appearance" );
456 456
457 QVBoxLayout *top = new QVBoxLayout ( this, 3, 3 ); 457 QVBoxLayout *top = new QVBoxLayout ( this, 3, 3 );
458 458
459 m_sample = new SampleWindow ( this ); 459 m_sample = new SampleWindow ( this );
460
460 m_sample-> setDecoration ( new DefaultWindowDecoration ( )); 461 m_sample-> setDecoration ( new DefaultWindowDecoration ( ));
461 QWhatsThis::add( m_sample, tr( "This is a preview window. Look here to see your new appearance as options are changed." ) ); 462 QWhatsThis::add( m_sample, tr( "This is a preview window. Look here to see your new appearance as options are changed." ) );
462 463
463 OTabWidget* tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); 464 OTabWidget* tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom );
464 QWidget *styletab; 465 QWidget *styletab;
465 466
466 m_color_list = 0; 467 m_color_list = 0;
467 468
468 tw-> addTab ( styletab = createStyleTab ( tw, config ), "appearance", tr( "Style" )); 469 tw-> addTab ( styletab = createStyleTab ( tw, config ), "appearance", tr( "Style" ));
469 tw-> addTab ( createFontTab ( tw, config ), "font", tr( "Font" )); 470 tw-> addTab ( createFontTab ( tw, config ), "font", tr( "Font" ));
470 tw-> addTab ( createColorTab ( tw, config ), "appearance/color", tr( "Colors" ) ); 471 tw-> addTab ( createColorTab ( tw, config ), "appearance/color", tr( "Colors" ) );
471 tw-> addTab ( createDecoTab ( tw, config ), "appearance/deco", tr( "Windows" ) ); 472 tw-> addTab ( createDecoTab ( tw, config ), "appearance/deco", tr( "Windows" ) );
diff --git a/noncore/settings/appearance2/colorlistitem.h b/noncore/settings/appearance2/colorlistitem.h
index 10e4468..f8d5c45 100644
--- a/noncore/settings/appearance2/colorlistitem.h
+++ b/noncore/settings/appearance2/colorlistitem.h
@@ -115,26 +115,27 @@ private:
115 static const int s_colorcount; 115 static const int s_colorcount;
116 116
117 static int r2i ( QColorGroup::ColorRole role ) 117 static int r2i ( QColorGroup::ColorRole role )
118 { 118 {
119 for ( int i = 0; i < s_colorcount; i++ ) { 119 for ( int i = 0; i < s_colorcount; i++ ) {
120 if ( s_colorlut [i]. m_role == role ) 120 if ( s_colorlut [i]. m_role == role )
121 return i; 121 return i;
122 } 122 }
123 return -1; 123 return -1;
124 } 124 }
125}; 125};
126 126
127// from etc/colors/Liquid.scheme
127const ColorListItem::colorlut ColorListItem::s_colorlut [] = { 128const ColorListItem::colorlut ColorListItem::s_colorlut [] = {
128 { QColorGroup::Base, "Base", "#FFFFFF", QT_TRANSLATE_NOOP( "Appearance", "Base" ) }, 129 { QColorGroup::Base, "Base", "#FFFFFF", QT_TRANSLATE_NOOP( "Appearance", "Base" ) },
129 { QColorGroup::Background, "Background", "#E5E1D5", QT_TRANSLATE_NOOP( "Appearance", "Background" ) }, 130 { QColorGroup::Background, "Background", "#E0E0E0", QT_TRANSLATE_NOOP( "Appearance", "Background" ) },
130 { QColorGroup::Button, "Button", "#D6CDBB", QT_TRANSLATE_NOOP( "Appearance", "Button" ) }, 131 { QColorGroup::Button, "Button", "#96c8fa", QT_TRANSLATE_NOOP( "Appearance", "Button" ) },
131 { QColorGroup::ButtonText, "ButtonText", "#000000", QT_TRANSLATE_NOOP( "Appearance", "Button Text" ) }, 132 { QColorGroup::ButtonText, "ButtonText", "#000000", QT_TRANSLATE_NOOP( "Appearance", "Button Text" ) },
132 { QColorGroup::Highlight, "Highlight", "#800000", QT_TRANSLATE_NOOP( "Appearance", "Highlight" ) }, 133 { QColorGroup::Highlight, "Highlight", "#73adef", QT_TRANSLATE_NOOP( "Appearance", "Highlight" ) },
133 { QColorGroup::HighlightedText, "HighlightedText", "#FFFFFF", QT_TRANSLATE_NOOP( "Appearance", "Highlighted Text" ) }, 134 { QColorGroup::HighlightedText, "HighlightedText", "#FFFFFF", QT_TRANSLATE_NOOP( "Appearance", "Highlighted Text" ) },
134 { QColorGroup::Text, "Text", "#000000", QT_TRANSLATE_NOOP( "Appearance", "Text" ) } 135 { QColorGroup::Text, "Text", "#000000", QT_TRANSLATE_NOOP( "Appearance", "Text" ) }
135}; 136};
136 137
137const int ColorListItem::s_colorcount = sizeof( s_colorlut ) / sizeof ( s_colorlut [0] ); 138const int ColorListItem::s_colorcount = sizeof( s_colorlut ) / sizeof ( s_colorlut [0] );
138 139
139 140
140#endif 141#endif
diff --git a/noncore/settings/appearance2/decolistitem.h b/noncore/settings/appearance2/decolistitem.h
index d190ceb..da7924c 100644
--- a/noncore/settings/appearance2/decolistitem.h
+++ b/noncore/settings/appearance2/decolistitem.h
@@ -95,12 +95,13 @@ public:
95 { 95 {
96 return m_window_if; 96 return m_window_if;
97 } 97 }
98 98
99private: 99private:
100 QLibrary *m_lib; 100 QLibrary *m_lib;
101 WindowDecorationInterface *m_window_if; 101 WindowDecorationInterface *m_window_if;
102 //WindowDecorationSettingsInterface *m_settings_if; 102 //WindowDecorationSettingsInterface *m_settings_if;
103 103
104}; 104};
105 105
106#endif \ No newline at end of file 106#endif \ No newline at end of file
107