mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
* Source/GSThemeMenu.m: Changes for compiling with older compilers.
* Source/GSWindowDecorationView.m: Move the view up a little. * Source/NSMenuItemCell.m: Experimental changes for drawing separator items. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31790 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dc285c6df1
commit
13a2fd6326
4 changed files with 45 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
|||
2010-12-27 16:51-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/GSThemeMenu.m: Changes for compiling with older compilers.
|
||||
* Source/GSWindowDecorationView.m: Move the view up a little.
|
||||
* Source/NSMenuItemCell.m: Experimental changes for drawing
|
||||
separator items.
|
||||
|
||||
2010-12-27 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSSearchField.m,
|
||||
|
@ -40,6 +47,7 @@
|
|||
* Source/NSWindow.m ([-encodeWithCoder:], [-initWithCoder:]): Same
|
||||
for NSBackingStoreType.
|
||||
|
||||
>>>>>>> .r31789
|
||||
2010-12-27 02:12-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/GSThemeMenu.m: Added implementation for
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
{
|
||||
NSData *data = [NSArchiver archivedDataWithRootObject: menu]; // copy the view...
|
||||
NSMenu *newMenu = [NSUnarchiver unarchiveObjectWithData: data];
|
||||
NSMenuView *menuView = nil;
|
||||
|
||||
/*
|
||||
* Set the new menu
|
||||
|
@ -73,7 +74,7 @@
|
|||
/*
|
||||
* And transfer the new menu representation to the window decoration view.
|
||||
*/
|
||||
NSMenuView *menuView = [newMenu menuRepresentation];
|
||||
menuView = [newMenu menuRepresentation];
|
||||
if (menuView != nil)
|
||||
{
|
||||
[menu close];
|
||||
|
@ -82,6 +83,23 @@
|
|||
[menuView sizeToFit];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NSMenu *m = [window menu];
|
||||
// NSMenuView *menuView = nil;
|
||||
|
||||
[m update];
|
||||
/*
|
||||
menuView = [m menuRepresentation];
|
||||
if (menuView != nil)
|
||||
{
|
||||
[menu close];
|
||||
[menuView setHorizontal: YES];
|
||||
[wv addMenuView: menuView];
|
||||
[menuView sizeToFit];
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
- (void) rightMouseDisplay: (NSMenu *)menu
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
float menuBarHeight = [theme menuHeightForWindow: _window];
|
||||
NSRect menuRect =
|
||||
NSMakeRect(contentViewFrame.origin.x,
|
||||
NSMaxY(contentViewFrame) - menuBarHeight,
|
||||
(NSMaxY(contentRect) + 1) - menuBarHeight,
|
||||
contentViewFrame.size.width,
|
||||
menuBarHeight);
|
||||
|
||||
|
@ -466,7 +466,7 @@
|
|||
menuHeightForWindow:
|
||||
_window];
|
||||
NSRect menuRect = NSMakeRect(contentRect.origin.x,
|
||||
NSMaxY(contentRect),
|
||||
(NSMaxY(contentRect) + 1) - menubarHeight,
|
||||
contentRect.size.width,
|
||||
menubarHeight);
|
||||
hasMenu = YES;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <Foundation/NSUserDefaults.h>
|
||||
|
||||
#include "AppKit/NSAttributedString.h"
|
||||
#include "AppKit/NSBox.h"
|
||||
#include "AppKit/NSColor.h"
|
||||
#include "AppKit/NSEvent.h"
|
||||
#include "AppKit/NSFont.h"
|
||||
|
@ -719,8 +720,21 @@
|
|||
- (void) drawSeparatorItemWithFrame:(NSRect)cellFrame
|
||||
inView:(NSView *)controlView
|
||||
{
|
||||
// FIXME: This only has sense in MacOS or Windows interface styles.
|
||||
// Maybe somebody wants to support this (Lazaro).
|
||||
NSInterfaceStyle style = NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil);
|
||||
if (style == NSMacintoshInterfaceStyle
|
||||
|| style == NSWindows95InterfaceStyle)
|
||||
{
|
||||
/*
|
||||
NSRect lineFrame = NSMakeRect(cellFrame.origin.x,
|
||||
cellFrame.origin.y
|
||||
+ cellFrame.size.height/2,
|
||||
cellFrame.size.width,
|
||||
1);
|
||||
NSBox *line = [[NSBox alloc] initWithFrame: lineFrame];
|
||||
[controlView addSubview:line];
|
||||
RELEASE(line);
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
- (void) drawStateImageWithFrame: (NSRect)cellFrame
|
||||
|
|
Loading…
Reference in a new issue