author | sandman <sandman> | 2002-10-31 03:12:25 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-31 03:12:25 (UTC) |
commit | 702ab550d1f6b06e779935457e5e25748c8e6fc3 (patch) (unidiff) | |
tree | 852cc6e93f2f0e7c7293e1faab09ab19c17d9c0a | |
parent | d4c2baf3d4998001462ac1be04523b216da02500 (diff) | |
download | opie-702ab550d1f6b06e779935457e5e25748c8e6fc3.zip opie-702ab550d1f6b06e779935457e5e25748c8e6fc3.tar.gz opie-702ab550d1f6b06e779935457e5e25748c8e6fc3.tar.bz2 |
launcher side enhancements to support the "use global font" option from
launcher-settings
-rw-r--r-- | core/launcher/launcher.cpp | 5 | ||||
-rw-r--r-- | core/launcher/launcherview.cpp | 5 | ||||
-rw-r--r-- | core/launcher/launcherview.h | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 5a9ee1b..767efb2 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -1168,13 +1168,16 @@ void Launcher::launcherMessage( const QCString &msg, const QByteArray &data) | |||
1168 | stream >> size; | 1168 | stream >> size; |
1169 | int weight; | 1169 | int weight; |
1170 | stream >> weight; | 1170 | stream >> weight; |
1171 | int italic; | 1171 | int italic; |
1172 | stream >> italic; | 1172 | stream >> italic; |
1173 | if ( tabs->view(id) ) | 1173 | if ( tabs->view(id) ) |
1174 | tabs->view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); | 1174 | if ( !fam. isEmpty ( )) |
1175 | tabs->view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); | ||
1176 | else | ||
1177 | tabs->view(id)->unsetViewFont(); | ||
1175 | qDebug( "setFont: %s, %d, %d, %d", fam.latin1(), size, weight, italic ); | 1178 | qDebug( "setFont: %s, %d, %d, %d", fam.latin1(), size, weight, italic ); |
1176 | } | 1179 | } |
1177 | else if ( msg == "setBusyIndicatorType(QString)" ) { | 1180 | else if ( msg == "setBusyIndicatorType(QString)" ) { |
1178 | QString type; | 1181 | QString type; |
1179 | stream >> type; | 1182 | stream >> type; |
1180 | tabs->setBusyIndicatorType(type); | 1183 | tabs->setBusyIndicatorType(type); |
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 9fc4565..2a051a6 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -847,12 +847,17 @@ void LauncherView::setTextColor( const QColor &tc ) | |||
847 | 847 | ||
848 | void LauncherView::setViewFont( const QFont &f ) | 848 | void LauncherView::setViewFont( const QFont &f ) |
849 | { | 849 | { |
850 | icons->setFont( f ); | 850 | icons->setFont( f ); |
851 | } | 851 | } |
852 | 852 | ||
853 | void LauncherView::unsetViewFont( ) | ||
854 | { | ||
855 | icons->unsetFont( ); | ||
856 | } | ||
857 | |||
853 | void LauncherView::resizeEvent(QResizeEvent *e) | 858 | void LauncherView::resizeEvent(QResizeEvent *e) |
854 | { | 859 | { |
855 | QVBox::resizeEvent( e ); | 860 | QVBox::resizeEvent( e ); |
856 | if ( e->size().width() != e->oldSize().width() ) | 861 | if ( e->size().width() != e->oldSize().width() ) |
857 | sort(); | 862 | sort(); |
858 | } | 863 | } |
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h index 194e4a2..82a319b 100644 --- a/core/launcher/launcherview.h +++ b/core/launcher/launcherview.h | |||
@@ -61,12 +61,13 @@ public: | |||
61 | BackgroundType backgroundType() const { return bgType; } | 61 | BackgroundType backgroundType() const { return bgType; } |
62 | 62 | ||
63 | void setTextColor( const QColor & ); | 63 | void setTextColor( const QColor & ); |
64 | QColor textColor() const { return textCol; } | 64 | QColor textColor() const { return textCol; } |
65 | 65 | ||
66 | void setViewFont( const QFont & ); | 66 | void setViewFont( const QFont & ); |
67 | void unsetViewFont ( ); | ||
67 | 68 | ||
68 | void setBusyIndicatorType ( const QString &type ); | 69 | void setBusyIndicatorType ( const QString &type ); |
69 | 70 | ||
70 | public slots: | 71 | public slots: |
71 | void populate( AppLnkSet *folder, const QString& categoryfilter ); | 72 | void populate( AppLnkSet *folder, const QString& categoryfilter ); |
72 | 73 | ||