Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > media > main-testing-src > by-pkgid > 6a6037a72fe4fe07e6ae3cf1acaf9d61 > files > 14

kdelibs4-4.4.5-0.1mdv2010.1.src.rpm

#
# Description:  Fix text display in Plasma::Pushbutton
# Forwarded: Yes
# Bug: https://bugs.kde.org/show_bug.cgi?id=192988
# Author: nlecureuil@mandriva.com
#

Index: plasma/widgets/pushbutton.cpp
===================================================================
--- plasma/widgets/pushbutton.cpp       (révision 1130118)
+++ plasma/widgets/pushbutton.cpp       (copie de travail)
@@ -422,8 +422,13 @@
         widgetFont = Plasma::Theme::defaultTheme()->font(Plasma::Theme::DefaultFont);
     }
 
-    //if there is not enough room for the text make it to fade out
     QFontMetricsF fm(widgetFont);
+    // If the height is too small increase the Height of the button to shall the whole text #192988
+    if (rect.height() < fm.height()) {
+        rect.setHeight(fm.height()+1);
+    }
+
+    // If there is not enough room for the text make it to fade out
     if (rect.width() < fm.width(nativeWidget()->text())) {
         if (bufferPixmap.isNull()) {
             bufferPixmap = QPixmap(rect.size().toSize());