mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:10:47 +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
a140b18bbe
commit
65f76b0d62
1 changed files with 4 additions and 5 deletions
|
@ -134,10 +134,9 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
||||||
{
|
{
|
||||||
NSFont *font = [NSFont menuFontOfSize: 0.0];
|
NSFont *font = [NSFont menuFontOfSize: 0.0];
|
||||||
|
|
||||||
/* Should make up 23 for the default font */
|
height = [font boundingRectForFont].size.height;
|
||||||
height = ([font boundingRectForFont].size.height) + 8;
|
if (height < 22)
|
||||||
if (height < 23)
|
height = 22;
|
||||||
height = 23;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return height;
|
return height;
|
||||||
|
@ -325,7 +324,7 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
||||||
|
|
||||||
r = [_font boundingRectForFont];
|
r = [_font boundingRectForFont];
|
||||||
/* Should make up 110, 20 for default font */
|
/* 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)
|
if (_cellSize.height < 20)
|
||||||
_cellSize.height = 20;
|
_cellSize.height = 20;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue