Bug 153741

Summary: Button text is too high in Kcalc with oxygen style
Product: [Applications] kcalc Reporter: Oliver Becker <der.ole.becker>
Component: generalAssignee: Klaus Niederkrüger <kniederk>
Status: RESOLVED FIXED    
Severity: normal CC: mutlu_inek
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: KCalc button & font size issue
Same issue with "inv" mode selected.

Description Oliver Becker 2007-12-09 19:06:01 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

The text height of some buttons (e.g. "Mod" and "!/x") are too large so the text is cut off at the top.
Comment 1 FiNeX 2007-12-11 10:39:43 UTC
I confirm this behaviour, but it's a problem related to the oxygen style.
Comment 2 Camilla Boemann 2007-12-16 02:21:35 UTC
I doubt it. Most probably Kcalc just sets the height of the buttons to a fixed value. Can someone check this please
Comment 3 mutlu inek 2007-12-28 21:08:40 UTC
Created attachment 22738 [details]
KCalc button & font size issue
Comment 4 mutlu inek 2007-12-28 21:09:32 UTC
Created attachment 22739 [details]
Same issue with "inv" mode selected.
Comment 5 mutlu inek 2007-12-28 21:10:21 UTC
Other than what was mentioned above, changing the font size in the preferences does not change anything. This seems hardcoded, too. I created the two attachments seen above.
Comment 6 David Johnson 2008-01-09 23:17:52 UTC
SVN commit 759069 by brandybuck:

BUG: 153741
Improved text drawing in KCalcButton. Text is no longer being cut off. The text is still cramped with the Oxygen style, however, because KStyle defines PM_ButtonMargin to be zero.


 M  +12 -14    kcalc.cpp  
 M  +42 -36    kcalc_button.cpp  
 M  +7 -20     kcalc_button.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=759069
Comment 7 David Johnson 2008-01-10 00:02:19 UTC
Note: Kcalc buttons have smaller than normal margins, and sizeHint() uses fontmetrics and button margin to get a smaller but reasonable size. KStyle defines PM_ButtonMargin to be zero, however. With most styles this is fine, but with Oxygen it makes the buttons seem cramped. This issue may need to be revisited.