mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 21:27:40 +00:00
* 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:
parent
3bbfcbaab2
commit
ea8ded398f
4 changed files with 128 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue