mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-07 17:38:02 +00:00
Merge remote-tracking branch 'origin' into AppearanceCrash
This commit is contained in:
commit
6f43a189c0
4 files changed
+45
-4
No files matched your search
@@ -2121,7 +2121,7 @@ TODO: implement
|
||||
return;
|
||||
|
||||
var point = [self convertPoint:[event locationInWindow] fromView:nil],
|
||||
view = [_slices objectAtIndex:FLOOR(point.y / _sliceHeight)];
|
||||
view = [_slices objectAtIndex:FLOOR(MAX(0, point.y) / _sliceHeight)];
|
||||
|
||||
if ([self _dragShouldBeginFromMouseDown:view])
|
||||
[self _performDragForSlice:view withEvent:event];
|
||||
|
||||
+40
-2
@@ -34,6 +34,8 @@ CPNoTabsBezelBorder = 4; //Displays no tabs and has a bezeled border.
|
||||
CPNoTabsLineBorder = 5; //Has no tabs and displays a line border.
|
||||
CPNoTabsNoBorder = 6; //Displays no tabs and no border.
|
||||
|
||||
@class _CPTabViewBox
|
||||
|
||||
var CPTabViewDidSelectTabViewItemSelector = 1 << 1,
|
||||
CPTabViewShouldSelectTabViewItemSelector = 1 << 2,
|
||||
CPTabViewWillSelectTabViewItemSelector = 1 << 3,
|
||||
@@ -64,7 +66,7 @@ var CPTabViewDidSelectTabViewItemSelector = 1 << 1,
|
||||
CPArray _items;
|
||||
|
||||
CPSegmentedControl _tabs;
|
||||
CPBox _box;
|
||||
_CPTabViewBox _box;
|
||||
|
||||
CPNumber _selectedIndex;
|
||||
|
||||
@@ -98,7 +100,8 @@ var CPTabViewDidSelectTabViewItemSelector = 1 << 1,
|
||||
var height = [_tabs valueForThemeAttribute:@"min-size"].height;
|
||||
[_tabs setFrameSize:CGSizeMake(0, height)];
|
||||
|
||||
_box = [[CPBox alloc] initWithFrame:[self bounds]];
|
||||
_box = [[_CPTabViewBox alloc] initWithFrame:[self bounds]];
|
||||
[_box setTabView:self];
|
||||
[self setBackgroundColor:[CPColor colorWithCalibratedWhite:0.95 alpha:1.0]];
|
||||
|
||||
[self addSubview:_box];
|
||||
@@ -496,6 +499,18 @@ var CPTabViewDidSelectTabViewItemSelector = 1 << 1,
|
||||
[self selectFirstTabViewItem:self];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Override
|
||||
|
||||
/*!
|
||||
Enabled controls accept first mouse by default.
|
||||
*/
|
||||
- (BOOL)acceptsFirstMouse:(CPEvent)anEvent
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var CPTabViewItemsKey = "CPTabViewItemsKey",
|
||||
@@ -571,3 +586,26 @@ var CPTabViewItemsKey = "CPTabViewItemsKey",
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation _CPTabViewBox : CPBox
|
||||
{
|
||||
CPTabView _tabView @accessors(property=tabView);
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Override
|
||||
|
||||
- (CPView)hitTest:(CGPoint)aPoint
|
||||
{
|
||||
// Here we check if we have clicked on the segmentedControl of the tabView or not
|
||||
// If YES, the CPBox should not handle the click
|
||||
var segmentIndex = [_tabView._tabs testSegment:[_tabView._tabs convertPoint:aPoint fromView:[self superview]]];
|
||||
|
||||
if (segmentIndex != CPNotFound)
|
||||
return nil;
|
||||
|
||||
return [super hitTest:aPoint];
|
||||
}
|
||||
|
||||
@end
|
||||
+1
-1
@@ -2570,7 +2570,7 @@ setBoundsOrigin:
|
||||
}
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
if (_needToSetTransformMatrix)
|
||||
if (_needToSetTransformMatrix && _highDPIRatio !== 1)
|
||||
[_graphicsContext graphicsPort].setTransform(_highDPIRatio, 0, 0 , _highDPIRatio, 0, 0);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -176,6 +176,8 @@ var _CPToolTipHeight = 24.0,
|
||||
_toolTipWindow = aWindow;
|
||||
_constrainsToUsableScreen = NO;
|
||||
|
||||
[self setPlatformWindow:[_toolTipWindow platformWindow]];
|
||||
|
||||
textFrameSize.height += 4;
|
||||
|
||||
_content = [CPTextField labelWithTitle:aString];
|
||||
@@ -193,6 +195,7 @@ var _CPToolTipHeight = 24.0,
|
||||
[self setAlphaValue:0.9];
|
||||
|
||||
[_windowView setNeedsDisplay:YES];
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
Reference in new issue
Block a user