author | sandman <sandman> | 2002-10-31 03:12:25 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-31 03:12:25 (UTC) |
commit | 702ab550d1f6b06e779935457e5e25748c8e6fc3 (patch) (side-by-side diff) | |
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 @@ -1162,25 +1162,28 @@ void Launcher::launcherMessage( const QCString &msg, const QByteArray &data) } else if ( msg == "setFont(QString,QString,int,int,int)" ) { QString id; stream >> id; QString fam; stream >> fam; int size; stream >> size; int weight; stream >> weight; int italic; stream >> italic; if ( tabs->view(id) ) - tabs->view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); + if ( !fam. isEmpty ( )) + tabs->view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); + else + tabs->view(id)->unsetViewFont(); qDebug( "setFont: %s, %d, %d, %d", fam.latin1(), size, weight, italic ); } else if ( msg == "setBusyIndicatorType(QString)" ) { QString type; stream >> type; tabs->setBusyIndicatorType(type); } } void Launcher::storageChanged() { if ( in_lnk_props ) { 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 @@ -841,24 +841,29 @@ void LauncherView::setTextColor( const QColor &tc ) textCol = tc; QColorGroup cg = icons->colorGroup(); cg.setColor( QColorGroup::Text, tc ); icons->setPalette( QPalette(cg,cg,cg) ); icons->viewport()->update(); } void LauncherView::setViewFont( const QFont &f ) { icons->setFont( f ); } +void LauncherView::unsetViewFont( ) +{ + icons->unsetFont( ); +} + void LauncherView::resizeEvent(QResizeEvent *e) { QVBox::resizeEvent( e ); if ( e->size().width() != e->oldSize().width() ) sort(); } void LauncherView::populate( AppLnkSet *folder, const QString& typefilter ) { icons->clear(); internalPopulate( folder, typefilter ); } 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 @@ -55,24 +55,25 @@ public: enum ViewMode { Icon, List }; void setViewMode( ViewMode m ); ViewMode viewMode() const { return vmode; } enum BackgroundType { Ruled, SolidColor, Image }; void setBackgroundType( BackgroundType t, const QString & ); BackgroundType backgroundType() const { return bgType; } void setTextColor( const QColor & ); QColor textColor() const { return textCol; } void setViewFont( const QFont & ); + void unsetViewFont ( ); void setBusyIndicatorType ( const QString &type ); public slots: void populate( AppLnkSet *folder, const QString& categoryfilter ); signals: void clicked( const AppLnk * ); void rightPressed( AppLnk * ); protected slots: void selectionChanged(); |