Merge branch 'master' into node

This commit is contained in:
Martin Carlberg
2021-12-03 12:36:27 +01:00
9 changed files with 54 additions and 17 deletions
+6
View File
@@ -380,6 +380,8 @@ CPButtonImageOffset = 3.0;
_bezelState = CPThemeStateNormal;
[self setValue:anImage forThemeAttribute:@"image" inState:_bezelState];
// if we omit this, images will disappear as soon as the button becomes disabled
[self setValue:anImage forThemeAttribute:@"image" inState:_bezelState.and(CPThemeStateDisabled)];
}
- (CPImage)image
@@ -971,7 +973,11 @@ CPButtonImageOffset = 3.0;
_bezelStyle = aBezelStyle;
if (_bezelState && newState)
{
if (currentState)
_bezelState =_bezelState.without(currentState);
_bezelState = _bezelState.and(newState);
}
else
_bezelState = newState || CPThemeStateNormal;
+5 -4
View File
@@ -819,7 +819,7 @@ var CPAutosavedRecentsChangedNotification = @"CPAutosavedRecentsChangedNotificat
positioned:CPWindowAbove
relativeToEphemeralSubviewNamed:nil];
}
else if (!_contentView)
else
{
var bezelView = [self layoutEphemeralSubviewNamed:@"bezel-view"
positioned:CPWindowBelow
@@ -827,9 +827,10 @@ var CPAutosavedRecentsChangedNotification = @"CPAutosavedRecentsChangedNotificat
[bezelView setBackgroundColor:bezelColor];
_contentView = [self layoutEphemeralSubviewNamed:@"content-view"
positioned:CPWindowAbove
relativeToEphemeralSubviewNamed:@"bezel-view"];
if (!_contentView)
_contentView = [self layoutEphemeralSubviewNamed:@"content-view"
positioned:CPWindowAbove
relativeToEphemeralSubviewNamed:@"bezel-view"];
}
if (_contentView)
+2
View File
@@ -2022,6 +2022,8 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
}
[self setValue:placeholderColor forThemeAttribute:@"text-color" inState:CPTextFieldStatePlaceholder];
[self layoutSubviews];
}
- (void)viewDidHide
+25
View File
@@ -50,6 +50,31 @@
return self;
}
- (CPIndexPath)indexPath
{
if (_parentNode != nil)
{
var path;
var index;
index = [[_parentNode childNodes] indexOfObject:self];
path = [_parentNode indexPath];
if (path != nil)
{
return [path indexPathByAddingIndex:index];
}
else
{
return [CPIndexPath indexPathWithIndex:index];
}
}
else
{
return nil;
}
}
- (BOOL)isLeaf
{
return [_childNodes count] <= 0;
+1 -1
View File
@@ -1479,7 +1479,7 @@ var CPViewHighDPIDrawingEnabled = YES;
{
var mask = [self autoresizingMask];
if (mask === CPViewNotSizable)
if ((mask === CPViewNotSizable) || !_superview)
return;
var frame = _superview._frame,
+2
View File
@@ -233,6 +233,7 @@ var themedButtonValues = nil,
[@"content-inset", CGInsetMake(0.0, 5.0, 0.0, 5.0), [CPThemeStateControlSizeSmall, CPThemeStateBordered]],
[@"nib2cib-adjustment-frame", CGRectMake(-3.0, 6.0, 0.0, 0.0), [CPThemeStateControlSizeSmall, CPThemeStateBordered]],
[@"font", [CPFont boldSystemFontOfSize:11.0], [CPThemeStateControlSizeSmall, CPThemeStateBordered]],
// RoundRect CPThemeStateControlSizeMini
[@"bezel-color",
@@ -256,6 +257,7 @@ var themedButtonValues = nil,
[@"content-inset", CGInsetMake(0.0, 2.0, 2.0, 2.0), [CPThemeStateControlSizeMini, CPThemeStateBordered]],
[@"nib2cib-adjustment-frame", CGRectMake(0.0, 14.0, 0.0, 0.0), [CPThemeStateControlSizeMini, CPThemeStateBordered]],
[@"font", [CPFont boldSystemFontOfSize:10.0], [CPThemeStateControlSizeMini, CPThemeStateBordered]],
// Rounded
[@"bezel-color",
+3 -1
View File
@@ -105,7 +105,9 @@ simply run `npm install -g @objj/cappuccino` again.
Getting Started
---------------
To write you first application, [download the starter package](http://www.cappuccino-project.org/#download).
To write you first application, [download the starter package](http://cappuccino.dev/#download).
To try our new Node (alpha) version of the Cappuccino framework, [check the Node installation instructions](https://github.com/cappuccino/cappuccino/wiki/node)
To contribute to Cappuccino, please read here: [Getting and Building the Source](
https://github.com/cappuccino/cappuccino/wiki/Getting-and-building-the-source).
@@ -18,6 +18,8 @@
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
// This is called when the application is done loading.
// Uncomment the following line to hide the standard menu bar.
// [CPMenu setMenuBarVisible:NO];
}
- (void)awakeFromCib
+8 -11
View File
@@ -130,17 +130,14 @@ function check_install_environment () {
exit 1
fi
# make sure user is running the Sun JVM or OpenJDK >= 6b18
java_version=$(java -version 2>&1)
echo $java_version | grep OpenJDK > /dev/null
if [ "$?" = "0" ]; then # OpenJDK: make sure >= 6b18
openjdk_version=$(echo "$java_version" | grep "OpenJDK Runtime Environment")
openjdk_version_key=$(echo $openjdk_version | egrep -o '[0-9]\-?b[0-9]+')
if [ $(echo $openjdk_version_key | tr -d 'b' | tr -d '-') -lt 618 ]; then
echo "Error: Narwhal is not compatible with your version of OpenJDK: $openjdk_version."
echo "Please upgrade to OpenJDK >= 6b18 or switch to the Sun JVM. Then re-run bootstrap.sh."
exit 1
fi
# Support Java version 8 or greater
# This is the LTS and last free/unencumbered version from Oracle
# It is also provided by OpenJDK
java_version=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1)
if [ "$java_version" -lt "8" ]; then
echo "Error: Narwhal is not compatible with your the installed Java version: $java_version."
echo "Please upgrade to either Oracle or OpenJDK >= version 7. Then re-run bootstrap.sh."
exit 1
fi
}