mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Changes to prevent menus placed off screen on screens with low resolution
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@29089 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
35776bf608
commit
183b008816
2 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-12-01 German Arias <german@xelalug.org>
|
||||
|
||||
* GormCore/GormDocument.m: Changes to prevent menus placed off screen
|
||||
on screens with low resolutions
|
||||
|
||||
2009-11-11 09:27-WIT Hans Baier <hansfbaier@googlemail.com>
|
||||
|
||||
* English.lproj/Gorm.gorm: remove duplicate keyboard shortcut #p
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <AppKit/NSSound.h>
|
||||
#include <AppKit/NSNibConnector.h>
|
||||
#include <AppKit/NSNibLoading.h>
|
||||
#include <AppKit/NSScreen.h>
|
||||
#include <GNUstepGUI/GSGormLoading.h>
|
||||
#include "NSView+GormExtensions.h"
|
||||
#include "GormSound.h"
|
||||
|
@ -440,10 +441,10 @@ static NSImage *fileImage = nil;
|
|||
{
|
||||
NSRect frame = [window frame];
|
||||
NSPoint origin = frame.origin;
|
||||
NSRect menuFrame = [[mainMenu window] frame];
|
||||
NSRect screen = [[NSScreen mainScreen] frame];
|
||||
|
||||
// account for the height of the menu we're loading.
|
||||
origin.y += (frame.size.height + menuFrame.size.height + 150);
|
||||
origin.y = (screen.size.height - 100);
|
||||
|
||||
// place the main menu appropriately...
|
||||
[[mainMenu window] setFrameTopLeftPoint: origin];
|
||||
|
@ -723,8 +724,9 @@ static NSImage *fileImage = nil;
|
|||
{
|
||||
NSRect frame = [[self window] frame];
|
||||
NSPoint origin = frame.origin;
|
||||
NSRect screen = [[NSScreen mainScreen] frame];
|
||||
|
||||
origin.y += (frame.size.height + 150);
|
||||
origin.y = (screen.size.height - 100);
|
||||
|
||||
// Place the main menu appropriately...
|
||||
[[menu window] setFrameTopLeftPoint: origin];
|
||||
|
|
Loading…
Reference in a new issue