summaryrefslogtreecommitdiff
path: root/core/settings/launcher/tabssettings.cpp
authorsandman <sandman>2002-09-27 00:56:30 (UTC)
committer sandman <sandman>2002-09-27 00:56:30 (UTC)
commit82012ba8a063b729dec92db60c939834530a9fa4 (patch) (unidiff)
tree105de4a377a4fb5c1a4c0c2e450e1ed3e93d66f7 /core/settings/launcher/tabssettings.cpp
parentdcd5eb6949787321c278b10772bd75a27ec6d508 (diff)
downloadopie-82012ba8a063b729dec92db60c939834530a9fa4.zip
opie-82012ba8a063b729dec92db60c939834530a9fa4.tar.gz
opie-82012ba8a063b729dec92db60c939834530a9fa4.tar.bz2
- fixed the font selection
- added a .control file - fixed the default bg type
Diffstat (limited to 'core/settings/launcher/tabssettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/tabssettings.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index 0faaea3..8f5f7fa 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -114,24 +114,26 @@ void TabsSettings::readTabSettings ( )
114 if ( view == "List" ) // No tr 114 if ( view == "List" ) // No tr
115 tc. m_view = TabConfig::List; 115 tc. m_view = TabConfig::List;
116 116
117 QString bgType = cfg. readEntry ( "BackgroundType", "Ruled" ); 117 QString bgType = cfg. readEntry ( "BackgroundType", "Image" );
118 if ( bgType == "SolidColor" ) 118 if ( bgType == "SolidColor" )
119 tc. m_bg_type = TabConfig::SolidColor; 119 tc. m_bg_type = TabConfig::SolidColor;
120 else if ( bgType == "Image" ) // No tr 120 else if ( bgType == "Image" ) // No tr
121 tc. m_bg_type = TabConfig::Image; 121 tc. m_bg_type = TabConfig::Image;
122 122
123 tc. m_bg_image = cfg. readEntry ( "BackgroundImage", "wallpaper/opie" ); 123 tc. m_bg_image = cfg. readEntry ( "BackgroundImage", "launcher/opie-background" );
124 tc. m_bg_color = cfg. readEntry ( "BackgroundColor", colorGroup ( ). color ( QColorGroup::Base ). name ( )); 124 tc. m_bg_color = cfg. readEntry ( "BackgroundColor", colorGroup ( ). color ( QColorGroup::Base ). name ( ));
125 tc. m_text_color = cfg. readEntry ( "TextColor", colorGroup ( ). color ( QColorGroup::Text ). name ( )); 125 tc. m_text_color = cfg. readEntry ( "TextColor", colorGroup ( ). color ( QColorGroup::Text ). name ( ));
126 QStringList f = cfg. readListEntry ( "Font", ',' ); 126 QStringList f = cfg. readListEntry ( "Font", ',' );
127 if ( f. count ( ) == 4 ) { 127 if ( f. count ( ) == 4 ) {
128 tc. m_font_family = f [0]; 128 tc. m_font_family = f [0];
129 tc. m_font_size = f [1]. toInt ( ); 129 tc. m_font_size = f [1]. toInt ( );
130 tc. m_font_style = f [2]; 130 tc. m_font_weight = f [2]. toInt ( );
131 tc. m_font_italic = ( f [3]. toInt ( ));
131 } else { 132 } else {
132 tc. m_font_family = font ( ). family ( ); 133 tc. m_font_family = font ( ). family ( );
133 tc. m_font_size = font ( ). pointSize ( ); 134 tc. m_font_size = font ( ). pointSize ( );
134 tc. m_font_style = "Regular"; 135 tc. m_font_weight = 50;
136 tc. m_font_italic = false;
135 } 137 }
136 m_tabs [*it] = tc; 138 m_tabs [*it] = tc;
137 } 139 }
@@ -167,7 +169,7 @@ void TabsSettings::accept ( )
167 cfg. writeEntry ( "BackgroundColor", tc. m_bg_color ); 169 cfg. writeEntry ( "BackgroundColor", tc. m_bg_color );
168 cfg. writeEntry ( "TextColor", tc. m_text_color ); 170 cfg. writeEntry ( "TextColor", tc. m_text_color );
169 171
170 QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + tc. m_font_style + ",0"; 172 QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" );
171 cfg. writeEntry ( "Font", f ); 173 cfg. writeEntry ( "Font", f );
172 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" ); 174 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" );
173 175
@@ -192,7 +194,7 @@ void TabsSettings::accept ( )
192 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); 194 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" );
193 fe << *it << tc. m_font_family; 195 fe << *it << tc. m_font_family;
194 fe << tc. m_font_size; 196 fe << tc. m_font_size;
195 fe << 50 << 0; 197 fe << tc. m_font_weight << ( tc. m_font_italic ? 1 : 0 );
196 198
197 tc. m_changed = false; 199 tc. m_changed = false;
198 } 200 }