From kde-commits Sat Apr 16 14:42:47 2005 From: Maks Orlovich Date: Sat, 16 Apr 2005 14:42:47 +0000 To: kde-commits Subject: kdelibs/kdeui Message-Id: <20050416144247.B7C603CA () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=111366258428962 CVS commit by orlovich: Relayout properly when font size changes BUG:38909 M +14 -0 ktoolbarbutton.cpp 1.90 M +2 -1 ktoolbarbutton.h 1.40 --- kdelibs/kdeui/ktoolbarbutton.cpp #1.89:1.90 @@ -639,4 +639,18 @@ void KToolBarButton::paletteChange(const } +bool KToolBarButton::event(QEvent *e) +{ + if (e->type() == QEvent::ParentFontChange || e->type() == QEvent::ApplicationFontChange) + { + //If we use toolbar text, apply the settings again, to relayout... + if (d->m_iconText != KToolBar::IconOnly) + modeChange(); + return true; + } + + return QToolButton::event(e); +} + + void KToolBarButton::showMenu() { --- kdelibs/kdeui/ktoolbarbutton.h #1.39:1.40 @@ -281,4 +281,5 @@ public slots: protected: + bool event(QEvent *e); void paletteChange(const QPalette &); void leaveEvent(QEvent *e);