summaryrefslogtreecommitdiff
authorsandman <sandman>2002-09-27 00:56:30 (UTC)
committer sandman <sandman>2002-09-27 00:56:30 (UTC)
commit82012ba8a063b729dec92db60c939834530a9fa4 (patch) (side-by-side diff)
tree105de4a377a4fb5c1a4c0c2e450e1ed3e93d66f7
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 (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/opie-launcher-settings.control9
-rw-r--r--core/settings/launcher/tabconfig.h3
-rw-r--r--core/settings/launcher/tabdialog.cpp16
-rw-r--r--core/settings/launcher/tabssettings.cpp14
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 @@
+Files: bin/launchersettings apps/Settings/Launcher.desktop pics/launchersettings
+Priority: optional
+Section: opie/settings
+Maintainer: Robert Griebl <sandman@handhelds.org>
+Architecture: arm
+Version: $QPE_VERSION-$SUB_VERSION
+Depends: opie-base ($QPE_VERSION)
+Description: Launcher settings dialog
+ 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
@@ -46,4 +46,5 @@ struct TabConfig {
QString m_font_family;
- QString m_font_style;
int m_font_size;
+ int m_font_weight;
+ bool m_font_italic;
bool m_changed;
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
@@ -298,3 +298,3 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig
bgTypeClicked ( tc. m_bg_type );
- m_fontselect-> setSelectedFont ( tc. m_font_family, tc. m_font_style, tc. m_font_size );
+ m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic ));
fontClicked ( m_fontselect-> selectedFont ( ));
@@ -443,3 +443,3 @@ void TabDialog::bgTypeClicked ( int t )
else if ( t == TabConfig::Image )
- s = m_bgimage;
+ s = Resource::findPixmap ( m_bgimage );
@@ -477,3 +477,3 @@ void TabDialog::bgDefaultClicked ( )
{
- m_bgimage = Resource::findPixmap ( "launcher/opie-background.jpg" );
+ m_bgimage = "launcher/opie-background";
bgTypeClicked ( TabConfig::Image );
@@ -488,5 +488,9 @@ void TabDialog::accept ( )
m_tc. m_text_color = m_iconcolor-> color ( ). name ( );
- m_tc. m_font_family = m_fontselect-> fontFamily ( );
- m_tc. m_font_size = m_fontselect-> fontSize ( );
- m_tc. m_font_style = m_fontselect-> fontStyle ( );
+
+ QFont f = m_fontselect-> selectedFont ( );
+
+ m_tc. m_font_family = f. family ( );
+ m_tc. m_font_size = f. pointSize ( );
+ m_tc. m_font_weight = f. weight ( );
+ m_tc. m_font_italic = f. italic ( );
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
@@ -116,3 +116,3 @@ void TabsSettings::readTabSettings ( )
- QString bgType = cfg. readEntry ( "BackgroundType", "Ruled" );
+ QString bgType = cfg. readEntry ( "BackgroundType", "Image" );
if ( bgType == "SolidColor" )
@@ -122,3 +122,3 @@ void TabsSettings::readTabSettings ( )
- tc. m_bg_image = cfg. readEntry ( "BackgroundImage", "wallpaper/opie" );
+ tc. m_bg_image = cfg. readEntry ( "BackgroundImage", "launcher/opie-background" );
tc. m_bg_color = cfg. readEntry ( "BackgroundColor", colorGroup ( ). color ( QColorGroup::Base ). name ( ));
@@ -129,3 +129,4 @@ void TabsSettings::readTabSettings ( )
tc. m_font_size = f [1]. toInt ( );
- tc. m_font_style = f [2];
+ tc. m_font_weight = f [2]. toInt ( );
+ tc. m_font_italic = ( f [3]. toInt ( ));
} else {
@@ -133,3 +134,4 @@ void TabsSettings::readTabSettings ( )
tc. m_font_size = font ( ). pointSize ( );
- tc. m_font_style = "Regular";
+ tc. m_font_weight = 50;
+ tc. m_font_italic = false;
}
@@ -169,3 +171,3 @@ void TabsSettings::accept ( )
- QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + tc. m_font_style + ",0";
+ QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" );
cfg. writeEntry ( "Font", f );
@@ -194,3 +196,3 @@ void TabsSettings::accept ( )
fe << tc. m_font_size;
- fe << 50 << 0;
+ fe << tc. m_font_weight << ( tc. m_font_italic ? 1 : 0 );