author | sandman <sandman> | 2002-09-27 00:56:30 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-27 00:56:30 (UTC) |
commit | 82012ba8a063b729dec92db60c939834530a9fa4 (patch) (unidiff) | |
tree | 105de4a377a4fb5c1a4c0c2e450e1ed3e93d66f7 /core/settings/launcher | |
parent | dcd5eb6949787321c278b10772bd75a27ec6d508 (diff) | |
download | opie-82012ba8a063b729dec92db60c939834530a9fa4.zip opie-82012ba8a063b729dec92db60c939834530a9fa4.tar.gz opie-82012ba8a063b729dec92db60c939834530a9fa4.tar.bz2 |
- fixed the font selection
- added a .control file
- fixed the default bg type
-rw-r--r-- | core/settings/launcher/opie-launcher-settings.control | 9 | ||||
-rw-r--r-- | core/settings/launcher/tabconfig.h | 3 | ||||
-rw-r--r-- | core/settings/launcher/tabdialog.cpp | 16 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.cpp | 14 |
4 files changed, 29 insertions, 13 deletions
diff --git a/core/settings/launcher/opie-launcher-settings.control b/core/settings/launcher/opie-launcher-settings.control new file mode 100644 index 0000000..e0c5005 --- a/dev/null +++ b/core/settings/launcher/opie-launcher-settings.control | |||
@@ -0,0 +1,9 @@ | |||
1 | Files: bin/launchersettings apps/Settings/Launcher.desktop pics/launchersettings | ||
2 | Priority: optional | ||
3 | Section: opie/settings | ||
4 | Maintainer: Robert Griebl <sandman@handhelds.org> | ||
5 | Architecture: arm | ||
6 | Version: $QPE_VERSION-$SUB_VERSION | ||
7 | Depends: opie-base ($QPE_VERSION) | ||
8 | Description: Launcher settings dialog | ||
9 | For the Opie environment. | ||
diff --git a/core/settings/launcher/tabconfig.h b/core/settings/launcher/tabconfig.h index 1c2e94d..8b6b103 100644 --- a/core/settings/launcher/tabconfig.h +++ b/core/settings/launcher/tabconfig.h | |||
@@ -45,6 +45,7 @@ struct TabConfig { | |||
45 | QString m_text_color; | 45 | QString m_text_color; |
46 | QString m_font_family; | 46 | QString m_font_family; |
47 | QString m_font_style; | ||
48 | int m_font_size; | 47 | int m_font_size; |
48 | int m_font_weight; | ||
49 | bool m_font_italic; | ||
49 | bool m_changed; | 50 | bool m_changed; |
50 | }; | 51 | }; |
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp index 86202f0..75a3de5 100644 --- a/core/settings/launcher/tabdialog.cpp +++ b/core/settings/launcher/tabdialog.cpp | |||
@@ -297,5 +297,5 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig | |||
297 | m_bgimage = tc. m_bg_image; | 297 | m_bgimage = tc. m_bg_image; |
298 | bgTypeClicked ( tc. m_bg_type ); | 298 | bgTypeClicked ( tc. m_bg_type ); |
299 | m_fontselect-> setSelectedFont ( tc. m_font_family, tc. m_font_style, tc. m_font_size ); | 299 | m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic )); |
300 | fontClicked ( m_fontselect-> selectedFont ( )); | 300 | fontClicked ( m_fontselect-> selectedFont ( )); |
301 | } | 301 | } |
@@ -442,5 +442,5 @@ void TabDialog::bgTypeClicked ( int t ) | |||
442 | s = m_solidcolor-> color ( ). name ( ); | 442 | s = m_solidcolor-> color ( ). name ( ); |
443 | else if ( t == TabConfig::Image ) | 443 | else if ( t == TabConfig::Image ) |
444 | s = m_bgimage; | 444 | s = Resource::findPixmap ( m_bgimage ); |
445 | 445 | ||
446 | m_sample-> setBackgroundType ((TabConfig::BackgroundType) t, s ); | 446 | m_sample-> setBackgroundType ((TabConfig::BackgroundType) t, s ); |
@@ -476,5 +476,5 @@ void TabDialog::bgImageClicked ( ) | |||
476 | void TabDialog::bgDefaultClicked ( ) | 476 | void TabDialog::bgDefaultClicked ( ) |
477 | { | 477 | { |
478 | m_bgimage = Resource::findPixmap ( "launcher/opie-background.jpg" ); | 478 | m_bgimage = "launcher/opie-background"; |
479 | bgTypeClicked ( TabConfig::Image ); | 479 | bgTypeClicked ( TabConfig::Image ); |
480 | } | 480 | } |
@@ -487,7 +487,11 @@ void TabDialog::accept ( ) | |||
487 | m_tc. m_bg_image = m_bgimage; | 487 | m_tc. m_bg_image = m_bgimage; |
488 | m_tc. m_text_color = m_iconcolor-> color ( ). name ( ); | 488 | m_tc. m_text_color = m_iconcolor-> color ( ). name ( ); |
489 | m_tc. m_font_family = m_fontselect-> fontFamily ( ); | 489 | |
490 | m_tc. m_font_size = m_fontselect-> fontSize ( ); | 490 | QFont f = m_fontselect-> selectedFont ( ); |
491 | m_tc. m_font_style = m_fontselect-> fontStyle ( ); | 491 | |
492 | m_tc. m_font_family = f. family ( ); | ||
493 | m_tc. m_font_size = f. pointSize ( ); | ||
494 | m_tc. m_font_weight = f. weight ( ); | ||
495 | m_tc. m_font_italic = f. italic ( ); | ||
492 | 496 | ||
493 | QDialog::accept ( ); | 497 | QDialog::accept ( ); |
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 | |||
@@ -115,5 +115,5 @@ void TabsSettings::readTabSettings ( ) | |||
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; |
@@ -121,5 +121,5 @@ void TabsSettings::readTabSettings ( ) | |||
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 ( )); |
@@ -128,9 +128,11 @@ void TabsSettings::readTabSettings ( ) | |||
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; |
@@ -168,5 +170,5 @@ void TabsSettings::accept ( ) | |||
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)" ); |
@@ -193,5 +195,5 @@ void TabsSettings::accept ( ) | |||
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; |