From 702ab550d1f6b06e779935457e5e25748c8e6fc3 Mon Sep 17 00:00:00 2001 From: sandman Date: Thu, 31 Oct 2002 03:12:25 +0000 Subject: launcher side enhancements to support the "use global font" option from launcher-settings --- 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 @@ -1171,7 +1171,10 @@ void Launcher::launcherMessage( const QCString &msg, const QByteArray &data) 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)" ) { 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 @@ -850,6 +850,11 @@ void LauncherView::setViewFont( const QFont &f ) icons->setFont( f ); } +void LauncherView::unsetViewFont( ) +{ + icons->unsetFont( ); +} + void LauncherView::resizeEvent(QResizeEvent *e) { QVBox::resizeEvent( e ); 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 @@ -64,6 +64,7 @@ public: QColor textColor() const { return textCol; } void setViewFont( const QFont & ); + void unsetViewFont ( ); void setBusyIndicatorType ( const QString &type ); -- cgit v0.9.0.2