Commit 456ec97f authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fix resizing issue when updating lua extension dialogs (close #14457)

parent a574bf30
/*****************************************************************************
* ExtensionsDialogProvider.m: Mac OS X Extensions Dialogs
*****************************************************************************
* Copyright (C) 2010-2013 VLC authors and VideoLAN
* Copyright (C) 2010-2015 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan org>
......@@ -407,7 +407,7 @@ static int extensionDialogCallback(vlc_object_t *p_this, const char *psz_variabl
}
VLCDialogGridView *gridView = (VLCDialogGridView *)[dialogWindow contentView];
[gridView addSubview:control atRow:row column:col rowSpan:vsp colSpan:hsp];
[gridView updateSubview:control atRow:row column:col rowSpan:vsp colSpan:hsp];
widget->b_update = false;
}
......
/*****************************************************************************
* VLCUIWidgets.h: Widgets for VLC's extensions dialogs for Mac OS X
*****************************************************************************
* Copyright (C) 2009-2014 the VideoLAN team and authors
* Copyright (C) 2009-2015 the VideoLAN team and authors
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan dot>,
......@@ -54,6 +54,11 @@
- (void)addSubview:(NSView *)view atRow:(NSUInteger)row column:(NSUInteger)column rowSpan:(NSUInteger)rowSpan colSpan:(NSUInteger)colSpan;
- (NSSize)flexSize:(NSSize)size;
- (void)updateSubview:(NSView *)view
atRow:(NSUInteger)row
column:(NSUInteger)column
rowSpan:(NSUInteger)rowSpan
colSpan:(NSUInteger)colSpan;
- (void)removeSubview:(NSView *)view;
@property (readonly) NSUInteger numViews;
......
/*****************************************************************************
* VLCUIWidgets.m: Widgets for VLC's extensions dialogs for Mac OS X
*****************************************************************************
* Copyright (C) 2009-2014 the VideoLAN team and authors
* Copyright (C) 2009-2015 the VideoLAN team and authors
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan dot>,
......@@ -329,6 +329,24 @@
[self performSelector:@selector(recomputeWindowSize) withObject:nil afterDelay:0.1];
}
- (void)updateSubview:(NSView *)view
atRow:(NSUInteger)row
column:(NSUInteger)column
rowSpan:(NSUInteger)rowSpan
colSpan:(NSUInteger)colSpan
{
NSDictionary *oldDict = [self objectForView:view];
if (!oldDict) {
[self addSubview:view
atRow:row
column:column
rowSpan:rowSpan
colSpan:colSpan];
return;
}
[self relayout];
}
- (void)removeSubview:(NSView *)view
{
NSDictionary *dict = [self objectForView:view];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment