mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 14:10:44 +00:00
* GormCore/GormPalettesManager.m (resizeWithOldSuperviewSize:): new method.
Fixes correct placement of palette view on panel resize. (init): disable auroresizing of dragView.
This commit is contained in:
parent
f227f3008b
commit
98befb031c
1 changed files with 11 additions and 1 deletions
|
@ -99,6 +99,16 @@ static NSImage *dragImage = nil;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) resizeWithOldSuperviewSize: (NSSize)oldSize
|
||||
{
|
||||
NSSize newSize = [[self superview] frame].size;
|
||||
NSRect frame = [self frame];
|
||||
|
||||
frame.origin.x -= floorf((oldSize.width - newSize.width) / 2);
|
||||
frame.origin.y -= floorf((oldSize.height - newSize.height) / 2);
|
||||
[self setFrameOrigin: frame.origin];
|
||||
}
|
||||
|
||||
/*
|
||||
* Dragging source protocol implementation
|
||||
*/
|
||||
|
@ -341,7 +351,7 @@ static NSImage *dragImage = nil;
|
|||
RELEASE(scrollView);
|
||||
|
||||
dragView = [[GormPaletteView alloc] initWithFrame: dragRect];
|
||||
[dragView setAutoresizingMask: NSViewMinYMargin];
|
||||
[dragView setAutoresizingMask: 0];
|
||||
[[panel contentView] addSubview: dragView];
|
||||
RELEASE(dragView);
|
||||
|
||||
|
|
Loading…
Reference in a new issue