mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-21 03:31:39 +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
|
@ -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…
Add table
Add a link
Reference in a new issue