summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -41,12 +41,13 @@ struct TabConfig {
ViewMode m_view;
BackgroundType m_bg_type;
QString m_bg_image;
QString m_bg_color;
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;
};
#endif
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
@@ -293,13 +293,13 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig
m_iconcolor-> setColor ( QColor ( m_tc. m_text_color ));
iconColorClicked ( m_iconcolor-> color ( ));
m_bgtype-> setButton ( tc. m_bg_type );
m_solidcolor-> setColor ( QColor ( tc. m_bg_color ));
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 ( ));
}
TabDialog::~TabDialog ( )
{
@@ -438,13 +438,13 @@ void TabDialog::bgTypeClicked ( int t )
m_solidcolor-> setEnabled ( t == TabConfig::SolidColor );
m_imagebrowse-> setEnabled ( t == TabConfig::Image );
if ( t == TabConfig::SolidColor )
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 );
}
void TabDialog::bgColorClicked ( const QColor & )
{
@@ -472,23 +472,27 @@ void TabDialog::bgImageClicked ( )
bgTypeClicked ( TabConfig::Image );
}
}
void TabDialog::bgDefaultClicked ( )
{
- m_bgimage = Resource::findPixmap ( "launcher/opie-background.jpg" );
+ m_bgimage = "launcher/opie-background";
bgTypeClicked ( TabConfig::Image );
}
void TabDialog::accept ( )
{
m_tc. m_view = (TabConfig::ViewMode) m_iconsize-> id ( m_iconsize-> selected ( ));
m_tc. m_bg_type = (TabConfig::BackgroundType) m_bgtype-> id ( m_bgtype-> selected ( ));
m_tc. m_bg_color = m_solidcolor-> color ( ). name ( );
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
@@ -111,30 +111,32 @@ void TabsSettings::readTabSettings ( )
cfg. setGroup ( grp. arg ( *it ));
QString view = cfg. readEntry ( "View", "Icon" );
if ( view == "List" ) // No tr
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;
else if ( bgType == "Image" ) // No tr
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 ( ));
QStringList f = cfg. readListEntry ( "Font", ',' );
if ( f. count ( ) == 4 ) {
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;
}
}
@@ -164,13 +166,13 @@ void TabsSettings::accept ( )
e << *it << tc. m_view;
cfg. writeEntry ( "BackgroundImage", tc. m_bg_image );
cfg. writeEntry ( "BackgroundColor", tc. m_bg_color );
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)" );
switch ( tc. m_bg_type ) {
case TabConfig::Ruled:
cfg.writeEntry( "BackgroundType", "Ruled" );
@@ -189,13 +191,13 @@ void TabsSettings::accept ( )
QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" );
te << *it << tc. m_text_color;
QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" );
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;
}
}
void TabsSettings::newClicked ( )