summaryrefslogtreecommitdiff
path: root/core
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 /core
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 (limited to 'core') (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
@@ -44,8 +44,9 @@ struct TabConfig {
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;
};
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
@@ -296,7 +296,7 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig
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 ( ));
}
@@ -441,7 +441,7 @@ void TabDialog::bgTypeClicked ( int t )
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 );
}
@@ -475,7 +475,7 @@ void TabDialog::bgImageClicked ( )
void TabDialog::bgDefaultClicked ( )
{
- m_bgimage = Resource::findPixmap ( "launcher/opie-background.jpg" );
+ m_bgimage = "launcher/opie-background";
bgTypeClicked ( TabConfig::Image );
}
@@ -486,9 +486,13 @@ void TabDialog::accept ( )
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
@@ -114,24 +114,26 @@ void TabsSettings::readTabSettings ( )
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;
}
@@ -167,7 +169,7 @@ void TabsSettings::accept ( )
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)" );
@@ -192,7 +194,7 @@ void TabsSettings::accept ( )
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;
}