summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -45,6 +45,7 @@ struct TabConfig {
QString m_text_color;
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
@@ -297,5 +297,5 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig
m_bgimage = tc. m_bg_image;
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 ( ));
}
@@ -442,5 +442,5 @@ void TabDialog::bgTypeClicked ( int t )
s = m_solidcolor-> color ( ). name ( );
else if ( t == TabConfig::Image )
- s = m_bgimage;
+ s = Resource::findPixmap ( m_bgimage );
m_sample-> setBackgroundType ((TabConfig::BackgroundType) t, s );
@@ -476,5 +476,5 @@ void TabDialog::bgImageClicked ( )
void TabDialog::bgDefaultClicked ( )
{
- m_bgimage = Resource::findPixmap ( "launcher/opie-background.jpg" );
+ m_bgimage = "launcher/opie-background";
bgTypeClicked ( TabConfig::Image );
}
@@ -487,7 +487,11 @@ void TabDialog::accept ( )
m_tc. m_bg_image = m_bgimage;
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 ( );
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 ( )
tc. m_view = TabConfig::List;
- QString bgType = cfg. readEntry ( "BackgroundType", "Ruled" );
+ QString bgType = cfg. readEntry ( "BackgroundType", "Image" );
if ( bgType == "SolidColor" )
tc. m_bg_type = TabConfig::SolidColor;
@@ -121,5 +121,5 @@ void TabsSettings::readTabSettings ( )
tc. m_bg_type = TabConfig::Image;
- 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 ( ));
tc. m_text_color = cfg. readEntry ( "TextColor", colorGroup ( ). color ( QColorGroup::Text ). name ( ));
@@ -128,9 +128,11 @@ void TabsSettings::readTabSettings ( )
tc. m_font_family = f [0];
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 {
tc. m_font_family = font ( ). family ( );
tc. m_font_size = font ( ). pointSize ( );
- tc. m_font_style = "Regular";
+ tc. m_font_weight = 50;
+ tc. m_font_italic = false;
}
m_tabs [*it] = tc;
@@ -168,5 +170,5 @@ void TabsSettings::accept ( )
cfg. writeEntry ( "TextColor", tc. m_text_color );
- 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 );
QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" );
@@ -193,5 +195,5 @@ void TabsSettings::accept ( )
fe << *it << tc. m_font_family;
fe << tc. m_font_size;
- fe << 50 << 0;
+ fe << tc. m_font_weight << ( tc. m_font_italic ? 1 : 0 );
tc. m_changed = false;