Bug 186340 - toolbar text under icons cut off
Summary: toolbar text under icons cut off
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Camilla Boemann
URL:
Keywords:
: 153995 173452 187986 188324 190441 192553 194084 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-06 14:47 UTC by Will Stephenson
Modified: 2012-08-17 14:49 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Will Stephenson 2009-03-06 14:47:47 UTC
Version:            (using Devel)
Installed from:    Compiled sources

On a 106dpi display, the top pixel of 6, 8 and 9 point text under icons is cut off by the icons when using Oxygen style.

If your display has a different pixel density, try other point sizes to see the problem.
Comment 1 Huynh Huu Long 2009-03-14 17:23:47 UTC
This patch should help out a bit, I have no time to look for the real solution now ...

--- a/oxygen.cpp
+++ b/oxygen.cpp
@@ -3061,7 +3061,8 @@ QSize OxygenStyle::sizeFromContents(ContentsType type, const QStyleOption* optio
 
             if (const QStyleOptionToolButton* tbOpt = qstyleoption_cast<const QStyleOptionToolButton*>(option)) {
                 if ((!tbOpt->icon.isNull()) && (!tbOpt->text.isEmpty()) && tbOpt->toolButtonStyle == Qt::ToolButtonTextUnderIcon)
-                    size.setHeight(size.height()-9);
+                    // TODO: Make this font size dependent
+                    size.setHeight(size.height()-5);
             }
 
             // We want to avoid super-skiny buttons, for things like "up" when icons + text
Comment 2 Huynh Huu Long 2009-03-24 15:29:39 UTC
*** Bug 187986 has been marked as a duplicate of this bug. ***
Comment 3 Dario Andres 2009-03-28 23:14:22 UTC
*** Bug 188324 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Feck 2009-04-24 00:38:02 UTC
*** Bug 190441 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2009-04-27 04:10:33 UTC
*** Bug 173452 has been marked as a duplicate of this bug. ***
Comment 6 Dario Andres 2009-05-13 17:36:10 UTC
*** Bug 192553 has been marked as a duplicate of this bug. ***
Comment 7 Huynh Huu Long 2009-05-17 18:13:38 UTC
SVN commit 969192 by huynhhuu:

Fix cropped toolbar labels
BUG: 193018
BUG: 186340


 M  +2 -1      oxygen.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=969192
Comment 8 Dario Andres 2009-05-27 02:12:51 UTC
*** Bug 194084 has been marked as a duplicate of this bug. ***
Comment 9 Unknown 2009-06-25 12:28:28 UTC
From Qt 4.5.2 changelog:
- QToolButton
    * [252554] Fixed a problem where text labels would be partially clipped 
    when using Qt::ToolButtonTextUnderIcon.

http://www.qtsoftware.com/developer/changes/changes-4.5.2
Comment 10 Christoph Feck 2012-08-17 14:49:29 UTC
*** Bug 153995 has been marked as a duplicate of this bug. ***