mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
(menuBarHeight): Fix calculation. Set minimum height to 22.
(setFont:): Fix calculation default cell size. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24570 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f47b4c1754
commit
02beced9a5
1 changed files with 4 additions and 5 deletions
|
@ -134,10 +134,9 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
|||
{
|
||||
NSFont *font = [NSFont menuFontOfSize: 0.0];
|
||||
|
||||
/* Should make up 23 for the default font */
|
||||
height = ([font boundingRectForFont].size.height) + 8;
|
||||
if (height < 23)
|
||||
height = 23;
|
||||
height = [font boundingRectForFont].size.height;
|
||||
if (height < 22)
|
||||
height = 22;
|
||||
}
|
||||
|
||||
return height;
|
||||
|
@ -325,7 +324,7 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
|||
|
||||
r = [_font boundingRectForFont];
|
||||
/* Should make up 110, 20 for default font */
|
||||
_cellSize = NSMakeSize (r.size.width * 10., r.size.height + 6.);
|
||||
_cellSize = NSMakeSize (r.size.width * 10., r.size.height + 3.);
|
||||
|
||||
if (_cellSize.height < 20)
|
||||
_cellSize.height = 20;
|
||||
|
|
Loading…
Reference in a new issue