mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Fix for borderless bridge windows showing and allowing the user to use resize indicator.
Reviewed by me.
This commit is contained in:
@@ -257,6 +257,7 @@ var CPWindowSaveImage = nil,
|
||||
BOOL _hasShadow;
|
||||
BOOL _isMovableByWindowBackground;
|
||||
unsigned _shadowStyle;
|
||||
BOOL _showsResizeIndicator;
|
||||
|
||||
BOOL _isDocumentEdited;
|
||||
BOOL _isDocumentSaving;
|
||||
@@ -421,6 +422,8 @@ CPTexturedBackgroundWindowMask
|
||||
|
||||
_defaultButtonEnabled = YES;
|
||||
_keyViewLoopIsDirty = YES;
|
||||
|
||||
[self setShowsResizeIndicator:_styleMask & CPResizableWindowMask];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -501,6 +504,7 @@ CPTexturedBackgroundWindowMask
|
||||
[_windowView addSubview:_contentView];
|
||||
[_windowView setTitle:_title];
|
||||
[_windowView noteToolbarChanged];
|
||||
[_windowView setShowsResizeIndicator:[self showsResizeIndicator]];
|
||||
|
||||
[self setFrame:[self frameRectForContentRect:contentRect]];
|
||||
}
|
||||
@@ -794,7 +798,7 @@ CPTexturedBackgroundWindowMask
|
||||
*/
|
||||
- (BOOL)showsResizeIndicator
|
||||
{
|
||||
return [_windowView showsResizeIndicator];
|
||||
return _showsResizeIndicator;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -802,8 +806,14 @@ CPTexturedBackgroundWindowMask
|
||||
@param shouldShowResizeIndicator \c YES sets the window to show its resize indicator.
|
||||
*/
|
||||
- (void)setShowsResizeIndicator:(BOOL)shouldShowResizeIndicator
|
||||
{
|
||||
[_windowView setShowsResizeIndicator:shouldShowResizeIndicator];
|
||||
{
|
||||
shouldShowResizeIndicator = !!shouldShowResizeIndicator;
|
||||
|
||||
if (_showsResizeIndicator === shouldShowResizeIndicator)
|
||||
return;
|
||||
|
||||
_showsResizeIndicator = shouldShowResizeIndicator;
|
||||
[_windowView setShowsResizeIndicator:[self showsResizeIndicator]];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -38,6 +38,11 @@ var _CPToolbarViewBackgroundColor = nil;
|
||||
return _CPToolbarViewBackgroundColor;
|
||||
}
|
||||
|
||||
- (void)setShowsResizeIndicator:(BOOL)shouldShowResizeIndicator
|
||||
{
|
||||
// We don't ever want to show the resize indicator.
|
||||
}
|
||||
|
||||
- (void)tile
|
||||
{
|
||||
[super tile];
|
||||
|
||||
@@ -81,8 +81,6 @@ var _CPWindowViewResizeIndicatorImage = nil;
|
||||
_styleMask = aStyleMask;
|
||||
_resizeIndicatorOffset = CGSizeMake(0.0, 0.0);
|
||||
_toolbarOffset = CGSizeMake(0.0, 0.0);
|
||||
|
||||
[self setShowsResizeIndicator:!(_styleMask & CPBorderlessBridgeWindowMask) && (_styleMask & CPResizableWindowMask)];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -213,13 +211,13 @@ var _CPWindowViewResizeIndicatorImage = nil;
|
||||
|
||||
[_resizeIndicator setImage:_CPWindowViewResizeIndicatorImage];
|
||||
[_resizeIndicator setAutoresizingMask:CPViewMinXMargin | CPViewMinYMargin];
|
||||
|
||||
|
||||
[self addSubview:_resizeIndicator];
|
||||
}
|
||||
else
|
||||
{
|
||||
[_resizeIndicator removeFromSuperview];
|
||||
|
||||
|
||||
_resizeIndicator = nil;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user