mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-15 15:13:55 +00:00
* Source/NSMenu.m: Beginning of support for windows style menus on the
top of the window. * Source/NSWindow.m: Added code in the method -setFrameFromString: to make certain the window doesn't go out of bounds if the screen size changes. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26751 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
001bdbc4e9
commit
e39b7a04b4
3 changed files with 24 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-07-08 16:15-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* Source/NSMenu.m: Beginning of support for windows style menus on the
|
||||||
|
top of the window.
|
||||||
|
* Source/NSWindow.m: Added code in the method -setFrameFromString: to
|
||||||
|
make certain the window doesn't go out of bounds if the screen size
|
||||||
|
changes.
|
||||||
|
|
||||||
2008-07-02 Fred Kiefer <FredKiefer@gmx.de>
|
2008-07-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/AppKit/NSPopUpButton.h,
|
* Headers/AppKit/NSPopUpButton.h,
|
||||||
|
|
|
@ -145,8 +145,9 @@ static BOOL menuBarVisible = YES;
|
||||||
|
|
||||||
- (NSString*) _locationKey
|
- (NSString*) _locationKey
|
||||||
{
|
{
|
||||||
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil)
|
NSInterfaceStyle style = NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil);
|
||||||
== NSMacintoshInterfaceStyle)
|
if (style == NSMacintoshInterfaceStyle ||
|
||||||
|
style == NSWindows95InterfaceStyle)
|
||||||
{
|
{
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
@ -1486,8 +1487,9 @@ static BOOL menuBarVisible = YES;
|
||||||
|
|
||||||
- (void) _showTornOffMenuIfAny: (NSNotification*)notification
|
- (void) _showTornOffMenuIfAny: (NSNotification*)notification
|
||||||
{
|
{
|
||||||
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil)
|
NSInterfaceStyle style = NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil);
|
||||||
== NSMacintoshInterfaceStyle)
|
if (style == NSMacintoshInterfaceStyle ||
|
||||||
|
style == NSWindows95InterfaceStyle)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1727,7 +1729,8 @@ static BOOL menuBarVisible = YES;
|
||||||
NSMenuView *newRep;
|
NSMenuView *newRep;
|
||||||
|
|
||||||
newRep = [[NSMenuView alloc] initWithFrame: NSZeroRect];
|
newRep = [[NSMenuView alloc] initWithFrame: NSZeroRect];
|
||||||
if (newStyle == NSMacintoshInterfaceStyle)
|
if (newStyle == NSMacintoshInterfaceStyle ||
|
||||||
|
newStyle == NSWindows95InterfaceStyle)
|
||||||
{
|
{
|
||||||
[newRep setHorizontal: YES];
|
[newRep setHorizontal: YES];
|
||||||
}
|
}
|
||||||
|
|
|
@ -4483,6 +4483,14 @@ current key view.<br />
|
||||||
{
|
{
|
||||||
fRect.origin.y = nRect.origin.y + (fRect.origin.y - nRect.origin.y)
|
fRect.origin.y = nRect.origin.y + (fRect.origin.y - nRect.origin.y)
|
||||||
* (nRect.size.height / sRect.size.height);
|
* (nRect.size.height / sRect.size.height);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If height of the window goes above the screen height, then adjust the window down.
|
||||||
|
*/
|
||||||
|
if ((fRect.size.height + fRect.origin.y) > nRect.size.height)
|
||||||
|
{
|
||||||
|
fRect.origin.y = fRect.origin.y - ((fRect.size.height + fRect.origin.y) - nRect.size.height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we aren't resizable (ie. if we don't have a resize bar), make sure
|
/* If we aren't resizable (ie. if we don't have a resize bar), make sure
|
||||||
|
|
Loading…
Reference in a new issue