* Source/NSMenuView.m: Read the menu item/menu bar/separator

height from GSTheme.
* Headers/Additions/GNUstepGUI/GSTheme.h:
* Source/GSThemeDrawing.m: Add -menuBarHeight, -menuItemHeight,
-menuSeparatorHeight. Corresponding defaults are GSMenuBarHeight,
GSMenuItemHeight, GSMenuSeparatorHeight


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37182 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2013-10-02 22:06:24 +00:00
parent 3bbfcbaab2
commit ea8ded398f
4 changed files with 128 additions and 15 deletions

View file

@ -1119,6 +1119,39 @@
}
}
- (CGFloat) menuBarHeight
{
CGFloat height = [[NSUserDefaults standardUserDefaults]
floatForKey: @"GSMenuBarHeight"];
if (height <= 0)
{
return 22;
}
return height;
}
- (CGFloat) menuItemHeight
{
CGFloat height = [[NSUserDefaults standardUserDefaults]
floatForKey: @"GSMenuItemHeight"];
if (height <= 0)
{
return 20;
}
return height;
}
- (CGFloat) menuSeparatorHeight
{
CGFloat height = [[NSUserDefaults standardUserDefaults]
floatForKey: @"GSMenuSeparatorHeight"];
if (height <= 0)
{
return 20;
}
return height;
}
// NSColorWell drawing method
- (NSRect) drawColorWellBorder: (NSColorWell*)well
withBounds: (NSRect)bounds