mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Added back proper horizontal padding around autosized buttons that got lost with no explanations (probably a mistake) on 2007-01-23
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26366 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
51389eb52e
commit
680f0c94e4
2 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-03-20 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* Source/NSButtonCell.m ([-cellSize]): Restored horizontal space
|
||||
around text in autosized bezeled/bordered buttons not containing
|
||||
only an image so that the autosizing is correct again.
|
||||
|
||||
2008-03-19 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Version 0.13.2
|
||||
|
|
|
@ -1390,6 +1390,21 @@ typedef struct _GSButtonCellFlags
|
|||
else
|
||||
borderSize = NSZeroSize;
|
||||
|
||||
/* Add an additional 6 pixels horizontally so that the text is not
|
||||
* too near the boundaries of the button. Without them, autosized
|
||||
* buttons look too tiny and crammed. This might be made
|
||||
* configurable by the theme, but most likely only because themes
|
||||
* might want to have even more space here (to make buttons more
|
||||
* clear and readable) rather than less! Eg. Apple by default has
|
||||
* huge amounts of empty space between the text and the borders of
|
||||
* their push buttons.
|
||||
*/
|
||||
if ((_cell.is_bordered && (_cell.image_position != NSImageOnly))
|
||||
|| _cell.is_bezeled)
|
||||
{
|
||||
borderSize.width += 6;
|
||||
}
|
||||
|
||||
// Add border size
|
||||
s.width += 2 * borderSize.width;
|
||||
s.height += 2 * borderSize.height;
|
||||
|
|
Loading…
Reference in a new issue