-rw-r--r-- | core/launcher/launcher.cpp | 7 | ||||
-rw-r--r-- | core/launcher/launcherview.cpp | 2 | ||||
-rw-r--r-- | core/settings/launcher/tabconfig.h | 1 | ||||
-rw-r--r-- | core/settings/launcher/tabdialog.cpp | 1 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.cpp | 6 |
5 files changed, 15 insertions, 2 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 4f81076..4255b44 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -406,24 +406,31 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray & | |||
406 | view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); | 406 | view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); |
407 | if ( id == "Documents" ) | 407 | if ( id == "Documents" ) |
408 | docLoadingWidget->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); | 408 | docLoadingWidget->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); |
409 | } else if ( msg == "setTextColor(QString,QString)" ) { | 409 | } else if ( msg == "setTextColor(QString,QString)" ) { |
410 | QString id; | 410 | QString id; |
411 | stream >> id; | 411 | stream >> id; |
412 | QString color; | 412 | QString color; |
413 | stream >> color; | 413 | stream >> color; |
414 | if ( view(id) ) | 414 | if ( view(id) ) |
415 | view(id)->setTextColor( QColor(color) ); | 415 | view(id)->setTextColor( QColor(color) ); |
416 | if ( id == "Documents" ) | 416 | if ( id == "Documents" ) |
417 | docLoadingWidget->setTextColor( QColor(color) ); | 417 | docLoadingWidget->setTextColor( QColor(color) ); |
418 | } else if ( msg == "setIconColumns(QString,int)" ) { | ||
419 | QString id; | ||
420 | stream >> id; | ||
421 | int number; | ||
422 | stream >> number; | ||
423 | if ( view(id ) ) | ||
424 | view(id)->setColNumber( number ); | ||
418 | } else if ( msg == "setFont(QString,QString,int,int,int)" ) { | 425 | } else if ( msg == "setFont(QString,QString,int,int,int)" ) { |
419 | QString id; | 426 | QString id; |
420 | stream >> id; | 427 | stream >> id; |
421 | QString fam; | 428 | QString fam; |
422 | stream >> fam; | 429 | stream >> fam; |
423 | int size; | 430 | int size; |
424 | stream >> size; | 431 | stream >> size; |
425 | int weight; | 432 | int weight; |
426 | stream >> weight; | 433 | stream >> weight; |
427 | int italic; | 434 | int italic; |
428 | stream >> italic; | 435 | stream >> italic; |
429 | if ( view(id) ) { | 436 | if ( view(id) ) { |
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 9d78c0d..2b34cc5 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -630,25 +630,25 @@ void LauncherIconView::calculateGrid( ItemTextPos pos ) | |||
630 | if ( viewerWidth <= 200 ) numColumns = 2; | 630 | if ( viewerWidth <= 200 ) numColumns = 2; |
631 | else if ( viewerWidth >= 400 ) numColumns = viewerWidth/96; | 631 | else if ( viewerWidth >= 400 ) numColumns = viewerWidth/96; |
632 | else numColumns = 3; | 632 | else numColumns = 3; |
633 | } | 633 | } |
634 | setSpacing( 4 ); | 634 | setSpacing( 4 ); |
635 | setGridX( (viewerWidth-(numColumns+1)*spacing())/numColumns ); | 635 | setGridX( (viewerWidth-(numColumns+1)*spacing())/numColumns ); |
636 | setGridY( fontMetrics().height()*2+24 ); | 636 | setGridY( fontMetrics().height()*2+24 ); |
637 | } else { | 637 | } else { |
638 | if( !numColumns ) { | 638 | if( !numColumns ) { |
639 | if ( viewerWidth < 150 ) numColumns = 1; | 639 | if ( viewerWidth < 150 ) numColumns = 1; |
640 | else if ( viewerWidth >= 400 ) numColumns = viewerWidth/150; | 640 | else if ( viewerWidth >= 400 ) numColumns = viewerWidth/150; |
641 | else numColumns = 2; | 641 | else numColumns = 2; |
642 | } | 642 | } |
643 | setSpacing( 2 ); | 643 | setSpacing( 2 ); |
644 | setGridX( (viewerWidth-(numColumns+1)*spacing())/numColumns ); | 644 | setGridX( (viewerWidth-(numColumns+1)*spacing())/numColumns ); |
645 | setGridY( fontMetrics().height()+2 ); | 645 | setGridY( fontMetrics().height()+2 ); |
646 | } | 646 | } |
647 | } | 647 | } |
648 | 648 | ||
649 | void LauncherIconView::styleChange( QStyle &old ) | 649 | void LauncherIconView::styleChange( QStyle &old ) |
650 | { | 650 | { |
651 | QIconView::styleChange( old ); | 651 | QIconView::styleChange( old ); |
652 | calculateGrid( itemTextPos() ); | 652 | calculateGrid( itemTextPos() ); |
653 | } | 653 | } |
654 | 654 | ||
diff --git a/core/settings/launcher/tabconfig.h b/core/settings/launcher/tabconfig.h index 7844673..9ea2418 100644 --- a/core/settings/launcher/tabconfig.h +++ b/core/settings/launcher/tabconfig.h | |||
@@ -49,24 +49,25 @@ struct TabConfig { | |||
49 | QString m_font_family; | 49 | QString m_font_family; |
50 | int m_font_size; | 50 | int m_font_size; |
51 | int m_font_weight; | 51 | int m_font_weight; |
52 | bool m_font_italic; | 52 | bool m_font_italic; |
53 | bool m_changed; | 53 | bool m_changed; |
54 | 54 | ||
55 | bool operator == ( const TabConfig &tc ) | 55 | bool operator == ( const TabConfig &tc ) |
56 | { | 56 | { |
57 | return ( m_view == tc. m_view ) && | 57 | return ( m_view == tc. m_view ) && |
58 | ( m_bg_type == tc. m_bg_type ) && | 58 | ( m_bg_type == tc. m_bg_type ) && |
59 | ( m_bg_image == tc. m_bg_image ) && | 59 | ( m_bg_image == tc. m_bg_image ) && |
60 | ( m_bg_color == tc. m_bg_color ) && | 60 | ( m_bg_color == tc. m_bg_color ) && |
61 | ( m_iconcolumns == tc. m_iconcolumns ) && | ||
61 | ( m_text_color == tc. m_text_color ) && | 62 | ( m_text_color == tc. m_text_color ) && |
62 | ( m_font_use == tc. m_font_use ) && | 63 | ( m_font_use == tc. m_font_use ) && |
63 | ( m_font_use ? ( | 64 | ( m_font_use ? ( |
64 | ( m_font_family == tc. m_font_family ) && | 65 | ( m_font_family == tc. m_font_family ) && |
65 | ( m_font_size == tc. m_font_size ) && | 66 | ( m_font_size == tc. m_font_size ) && |
66 | ( m_font_weight == tc. m_font_weight ) && | 67 | ( m_font_weight == tc. m_font_weight ) && |
67 | ( m_font_italic == tc. m_font_italic ) | 68 | ( m_font_italic == tc. m_font_italic ) |
68 | ) : true ); | 69 | ) : true ); |
69 | 70 | ||
70 | } | 71 | } |
71 | }; | 72 | }; |
72 | 73 | ||
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp index abe310f..bd51628 100644 --- a/core/settings/launcher/tabdialog.cpp +++ b/core/settings/launcher/tabdialog.cpp | |||
@@ -296,24 +296,25 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig | |||
296 | 296 | ||
297 | m_sample = new SampleView ( sample ); | 297 | m_sample = new SampleView ( sample ); |
298 | 298 | ||
299 | lay-> addWidget ( tw, 10 ); | 299 | lay-> addWidget ( tw, 10 ); |
300 | lay-> addWidget ( sample, 1 ); | 300 | lay-> addWidget ( sample, 1 ); |
301 | 301 | ||
302 | m_iconsize-> setButton ( tc. m_view ); | 302 | m_iconsize-> setButton ( tc. m_view ); |
303 | iconSizeClicked ( tc. m_view ); | 303 | iconSizeClicked ( tc. m_view ); |
304 | //m_iconcolor-> setColor ( QColor ( m_tc. m_text_color )); | 304 | //m_iconcolor-> setColor ( QColor ( m_tc. m_text_color )); |
305 | iconColorClicked ( m_iconcolor-> color ( )); | 305 | iconColorClicked ( m_iconcolor-> color ( )); |
306 | m_bgtype-> setButton ( tc. m_bg_type ); | 306 | m_bgtype-> setButton ( tc. m_bg_type ); |
307 | //m_solidcolor-> setColor ( QColor ( tc. m_bg_color )); | 307 | //m_solidcolor-> setColor ( QColor ( tc. m_bg_color )); |
308 | m_iconcolumns->setValue( tc. m_iconcolumns ); | ||
308 | m_bgimage = tc. m_bg_image; | 309 | m_bgimage = tc. m_bg_image; |
309 | bgTypeClicked ( tc. m_bg_type ); | 310 | bgTypeClicked ( tc. m_bg_type ); |
310 | m_fontuse-> setChecked ( tc. m_font_use ); | 311 | m_fontuse-> setChecked ( tc. m_font_use ); |
311 | m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic )); | 312 | m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic )); |
312 | m_fontselect-> setEnabled ( m_fontuse-> isChecked ( )); | 313 | m_fontselect-> setEnabled ( m_fontuse-> isChecked ( )); |
313 | fontClicked ( m_fontselect-> selectedFont ( )); | 314 | fontClicked ( m_fontselect-> selectedFont ( )); |
314 | 315 | ||
315 | QWhatsThis::add ( sample, tr( "This is a rough preview of what the currently selected Tab will look like." )); | 316 | QWhatsThis::add ( sample, tr( "This is a rough preview of what the currently selected Tab will look like." )); |
316 | } | 317 | } |
317 | 318 | ||
318 | 319 | ||
319 | TabDialog::~TabDialog ( ) | 320 | TabDialog::~TabDialog ( ) |
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp index ab64331..42f0568 100644 --- a/core/settings/launcher/tabssettings.cpp +++ b/core/settings/launcher/tabssettings.cpp | |||
@@ -161,24 +161,25 @@ void TabsSettings::readTabSettings ( Config &cfg ) | |||
161 | QString bgType = cfg. readEntry ( "BackgroundType" ); | 161 | QString bgType = cfg. readEntry ( "BackgroundType" ); |
162 | if ( bgType == "Image" ) | 162 | if ( bgType == "Image" ) |
163 | tc. m_bg_type = TabConfig::Image; | 163 | tc. m_bg_type = TabConfig::Image; |
164 | else if ( bgType == "SolidColor" ) | 164 | else if ( bgType == "SolidColor" ) |
165 | tc. m_bg_type = TabConfig::SolidColor; | 165 | tc. m_bg_type = TabConfig::SolidColor; |
166 | else if ( bgType == "Image" ) // No tr | 166 | else if ( bgType == "Image" ) // No tr |
167 | tc. m_bg_type = TabConfig::Image; | 167 | tc. m_bg_type = TabConfig::Image; |
168 | 168 | ||
169 | tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image ); | 169 | tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image ); |
170 | tc. m_last_directory = cfg2.readEntry( "DefaultDir", "" ); | 170 | tc. m_last_directory = cfg2.readEntry( "DefaultDir", "" ); |
171 | tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color ); | 171 | tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color ); |
172 | tc. m_iconcolumns = cfg. readNumEntry ( "Columns", tc. m_iconcolumns ); | 172 | tc. m_iconcolumns = cfg. readNumEntry ( "Columns", tc. m_iconcolumns ); |
173 | qDebug( "m_iconcolumns for %s = %d", (const char*) *it, tc.m_iconcolumns ); | ||
173 | tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color ); | 174 | tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color ); |
174 | QStringList f = cfg. readListEntry ( "Font", ',' ); | 175 | QStringList f = cfg. readListEntry ( "Font", ',' ); |
175 | if ( f. count ( ) == 4 ) { | 176 | if ( f. count ( ) == 4 ) { |
176 | tc. m_font_use = true; | 177 | tc. m_font_use = true; |
177 | tc. m_font_family = f [0]; | 178 | tc. m_font_family = f [0]; |
178 | tc. m_font_size = f [1]. toInt ( ); | 179 | tc. m_font_size = f [1]. toInt ( ); |
179 | tc. m_font_weight = f [2]. toInt ( ); | 180 | tc. m_font_weight = f [2]. toInt ( ); |
180 | tc. m_font_italic = ( f [3]. toInt ( )); | 181 | tc. m_font_italic = ( f [3]. toInt ( )); |
181 | } | 182 | } |
182 | m_tabs [*it] = tc; | 183 | m_tabs [*it] = tc; |
183 | } | 184 | } |
184 | 185 | ||
@@ -254,25 +255,28 @@ void TabsSettings::accept ( ) | |||
254 | cfg.writeEntry( "BackgroundType", "SolidColor" ); | 255 | cfg.writeEntry( "BackgroundType", "SolidColor" ); |
255 | be << *it << tc. m_bg_type << tc. m_bg_color; | 256 | be << *it << tc. m_bg_type << tc. m_bg_color; |
256 | break; | 257 | break; |
257 | case TabConfig::Image: | 258 | case TabConfig::Image: |
258 | cfg.writeEntry( "BackgroundType", "Image" ); | 259 | cfg.writeEntry( "BackgroundType", "Image" ); |
259 | be << *it << tc. m_bg_type << tc. m_bg_image; | 260 | be << *it << tc. m_bg_type << tc. m_bg_image; |
260 | break; | 261 | break; |
261 | } | 262 | } |
262 | 263 | ||
263 | QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); | 264 | QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); |
264 | te << *it << tc. m_text_color; | 265 | te << *it << tc. m_text_color; |
265 | 266 | ||
266 | QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); | 267 | QCopEnvelope ic( "QPE/Launcher", "setIconColumns(QString,int)" ); |
268 | ic << *it << tc. m_iconcolumns; | ||
269 | |||
270 | QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); | ||
267 | fe << *it; | 271 | fe << *it; |
268 | fe << ( tc. m_font_use ? tc. m_font_family : QString::null ); | 272 | fe << ( tc. m_font_use ? tc. m_font_family : QString::null ); |
269 | fe << tc. m_font_size; | 273 | fe << tc. m_font_size; |
270 | fe << tc. m_font_weight; | 274 | fe << tc. m_font_weight; |
271 | fe << ( tc. m_font_italic ? 1 : 0 ); | 275 | fe << ( tc. m_font_italic ? 1 : 0 ); |
272 | 276 | ||
273 | tc. m_changed = false; | 277 | tc. m_changed = false; |
274 | } | 278 | } |
275 | cfg. setGroup ( "GUI" ); | 279 | cfg. setGroup ( "GUI" ); |
276 | QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" ); | 280 | QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" ); |
277 | cfg. writeEntry ( "BusyType", busytype ); | 281 | cfg. writeEntry ( "BusyType", busytype ); |
278 | 282 | ||