@breakside/jskit 2025.40.0 → 2025.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSFont.js +0 -3
- package/Frameworks/Foundation.jsframework/JS/JSFontDescriptor.js +10 -1
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Info.json +2 -2
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Root/Frameworks/APIKit/Info.yaml +1 -1
- package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/AuthKit/Info.yaml +1 -1
- package/Root/Frameworks/CSSOM/Info.yaml +1 -1
- package/Root/Frameworks/ChartKit/Info.yaml +1 -1
- package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
- package/Root/Frameworks/DBKit/Info.yaml +1 -1
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSFont.js +0 -3
- package/Root/Frameworks/Foundation/JSFontDescriptor.js +10 -1
- package/Root/Frameworks/ImageKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
- package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
- package/Root/Frameworks/PDFKit/Info.yaml +1 -1
- package/Root/Frameworks/QRKit/Info.yaml +1 -1
- package/Root/Frameworks/SearchKit/Info.yaml +1 -1
- package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/UILayer.js +4 -0
- package/Root/Frameworks/UIKit/UIMenu.js +6 -0
- package/Root/Frameworks/UIKit/UIMenuItem.js +2 -0
- package/Root/Frameworks/UIKit/UIMenuView.js +41 -1
- package/Root/Frameworks/UIKit/UISplitView.js +4 -16
- package/Root/Frameworks/UIKit/UIView.js +21 -6
- package/Root/Frameworks/UIKit/UIWindow.js +7 -0
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
4
|
-
"JSBundleVersion": "2025.
|
|
4
|
+
"JSBundleVersion": "2025.43.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "DOM+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "e64e21085ca1964a8f0f8d790a6ad044231ecacc"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
6
|
-
"JSBundleVersion": "2025.
|
|
6
|
+
"JSBundleVersion": "2025.43.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
11
11
|
"node": "DOM+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "e64e21085ca1964a8f0f8d790a6ad044231ecacc"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
4
|
-
"JSBundleVersion": "2025.
|
|
4
|
+
"JSBundleVersion": "2025.43.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
8
8
|
"html": "FontKit+HTML.js"
|
|
9
9
|
},
|
|
10
10
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "e64e21085ca1964a8f0f8d790a6ad044231ecacc"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.JSKit.FontKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
6
|
-
"JSBundleVersion": "2025.
|
|
6
|
+
"JSBundleVersion": "2025.43.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
10
10
|
"html": "FontKit+HTML.js"
|
|
11
11
|
},
|
|
12
12
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "e64e21085ca1964a8f0f8d790a6ad044231ecacc"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [],
|
|
16
16
|
"ResourceLookup": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
4
|
-
"JSBundleVersion": "2025.
|
|
4
|
+
"JSBundleVersion": "2025.43.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "Foundation+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "e64e21085ca1964a8f0f8d790a6ad044231ecacc"
|
|
13
13
|
}
|
|
@@ -136,9 +136,6 @@ JSClass("JSFont", JSObject, {
|
|
|
136
136
|
|
|
137
137
|
bolderFont: function(){
|
|
138
138
|
var descriptor = this.descriptor.bolderDescriptor();
|
|
139
|
-
if (descriptor === null){
|
|
140
|
-
descriptor = this.descriptor.fontWithWeight(JSFont.Weight.bold);
|
|
141
|
-
}
|
|
142
139
|
return JSFont.initWithDescriptor(descriptor, this.pointSize);
|
|
143
140
|
},
|
|
144
141
|
|
|
@@ -45,7 +45,16 @@ JSClass("JSFontDescriptor", JSObject, {
|
|
|
45
45
|
|
|
46
46
|
bolderDescriptor: function(){
|
|
47
47
|
var weight = this._weight + 300;
|
|
48
|
-
|
|
48
|
+
var descriptor = JSFontDescriptor.descriptorWithFamily(this.family, weight, this.style);
|
|
49
|
+
if (descriptor === null){
|
|
50
|
+
weight = this._weight + 200;
|
|
51
|
+
descriptor = JSFontDescriptor.descriptorWithFamily(this.family, weight, this.style);
|
|
52
|
+
if (descriptor === null){
|
|
53
|
+
weight = this._weight + 100;
|
|
54
|
+
descriptor = JSFontDescriptor.descriptorWithFamily(this.family, weight, this.style);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return descriptor || this;
|
|
49
58
|
},
|
|
50
59
|
|
|
51
60
|
descriptorWithStyle: function(style){
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
6
|
-
"JSBundleVersion": "2025.
|
|
6
|
+
"JSBundleVersion": "2025.43.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
11
11
|
"node": "Foundation+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "e64e21085ca1964a8f0f8d790a6ad044231ecacc"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [
|
|
17
17
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
4
|
-
"JSBundleVersion": "2025.
|
|
4
|
+
"JSBundleVersion": "2025.43.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "SecurityKit+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "e64e21085ca1964a8f0f8d790a6ad044231ecacc"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
6
|
-
"JSBundleVersion": "2025.
|
|
6
|
+
"JSBundleVersion": "2025.43.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
11
11
|
"node": "SecurityKit+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "e64e21085ca1964a8f0f8d790a6ad044231ecacc"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
package/Info.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "node",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
4
|
-
"JSBundleVersion": "2025.
|
|
4
|
+
"JSBundleVersion": "2025.43.0",
|
|
5
5
|
"JSExecutableName": "jskit",
|
|
6
6
|
"NPMOrganization": "breakside",
|
|
7
7
|
"JSResources": [
|
|
8
8
|
"Tests/HTMLTestRunner.js",
|
|
9
9
|
"Tests/NodeTestRunner.js"
|
|
10
10
|
],
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "e64e21085ca1964a8f0f8d790a6ad044231ecacc"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.jskit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "node",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
6
|
-
"JSBundleVersion": "2025.
|
|
6
|
+
"JSBundleVersion": "2025.43.0",
|
|
7
7
|
"JSExecutableName": "jskit",
|
|
8
8
|
"NPMOrganization": "breakside",
|
|
9
9
|
"JSResources": [
|
|
10
10
|
"Tests/HTMLTestRunner.js",
|
|
11
11
|
"Tests/NodeTestRunner.js"
|
|
12
12
|
],
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "e64e21085ca1964a8f0f8d790a6ad044231ecacc"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -136,9 +136,6 @@ JSClass("JSFont", JSObject, {
|
|
|
136
136
|
|
|
137
137
|
bolderFont: function(){
|
|
138
138
|
var descriptor = this.descriptor.bolderDescriptor();
|
|
139
|
-
if (descriptor === null){
|
|
140
|
-
descriptor = this.descriptor.fontWithWeight(JSFont.Weight.bold);
|
|
141
|
-
}
|
|
142
139
|
return JSFont.initWithDescriptor(descriptor, this.pointSize);
|
|
143
140
|
},
|
|
144
141
|
|
|
@@ -45,7 +45,16 @@ JSClass("JSFontDescriptor", JSObject, {
|
|
|
45
45
|
|
|
46
46
|
bolderDescriptor: function(){
|
|
47
47
|
var weight = this._weight + 300;
|
|
48
|
-
|
|
48
|
+
var descriptor = JSFontDescriptor.descriptorWithFamily(this.family, weight, this.style);
|
|
49
|
+
if (descriptor === null){
|
|
50
|
+
weight = this._weight + 200;
|
|
51
|
+
descriptor = JSFontDescriptor.descriptorWithFamily(this.family, weight, this.style);
|
|
52
|
+
if (descriptor === null){
|
|
53
|
+
weight = this._weight + 100;
|
|
54
|
+
descriptor = JSFontDescriptor.descriptorWithFamily(this.family, weight, this.style);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return descriptor || this;
|
|
49
58
|
},
|
|
50
59
|
|
|
51
60
|
descriptorWithStyle: function(style){
|
|
@@ -53,6 +53,10 @@ UILayerAnimatedProperty.prototype.define = function(C, key, extensions){
|
|
|
53
53
|
value: setter
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
+
getter._JSCustomProperty = this;
|
|
57
|
+
getter._JSCustomPropertyKey = key;
|
|
58
|
+
setter._JSCustomProperty = this;
|
|
59
|
+
setter._JSCustomPropertyKey = key;
|
|
56
60
|
Object.defineProperty(C.prototype, key, {
|
|
57
61
|
configurable: false,
|
|
58
62
|
enumerable: false,
|
|
@@ -446,6 +446,7 @@ JSClass("UIMenuStyler", JSObject, {
|
|
|
446
446
|
});
|
|
447
447
|
|
|
448
448
|
var defaultTextColor = JSColor.text;
|
|
449
|
+
var defaultSecondaryTextColor = JSColor.secondaryText;
|
|
449
450
|
var defaultHighlightTextColor = JSColor.highlightedText;
|
|
450
451
|
var defaultDisabledTextColor = JSColor.text.colorWithAlpha(0.2);
|
|
451
452
|
var defaultHighlightColor = JSColor.highlight;
|
|
@@ -457,6 +458,7 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
457
458
|
cornerRadius: JSDynamicProperty('_cornerRadius', 6),
|
|
458
459
|
capSize: JSDynamicProperty('_capSize', 5),
|
|
459
460
|
textColor: JSDynamicProperty('_textColor', defaultTextColor),
|
|
461
|
+
secondaryTextColor: JSDynamicProperty('_secondaryTextColor', defaultSecondaryTextColor),
|
|
460
462
|
disabledTextColor: JSDynamicProperty('_disabledTextColor', defaultDisabledTextColor),
|
|
461
463
|
highlightedTextColor: JSDynamicProperty('_highlightedTextColor', defaultHighlightTextColor),
|
|
462
464
|
highlightColor: JSDynamicProperty('_highlightColor', defaultHighlightColor),
|
|
@@ -493,6 +495,9 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
493
495
|
if (spec.containsKey('textColor')){
|
|
494
496
|
this._textColor = spec.valueForKey("textColor", JSColor);
|
|
495
497
|
}
|
|
498
|
+
if (spec.containsKey('secondaryTextColor')){
|
|
499
|
+
this._secondaryTextColor = spec.valueForKey("secondaryTextColor", JSColor);
|
|
500
|
+
}
|
|
496
501
|
if (spec.containsKey('disabledTextColor')){
|
|
497
502
|
this._disabledTextColor = spec.valueForKey("disabledTextColor", JSColor);
|
|
498
503
|
}
|
|
@@ -876,6 +881,7 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
876
881
|
window.indentationSize = this.indentationSize;
|
|
877
882
|
window.highlightColor = this.highlightColor;
|
|
878
883
|
window.textColor = this.textColor;
|
|
884
|
+
window.secondaryTextColor = this.secondaryTextColor;
|
|
879
885
|
window.highlightedTextColor = this.highlightedTextColor;
|
|
880
886
|
window.disabledTextColor = this.disabledTextColor;
|
|
881
887
|
window.update();
|
|
@@ -54,6 +54,7 @@ JSClass("UIMenuWindow", UIWindow, {
|
|
|
54
54
|
indentationSize: 10,
|
|
55
55
|
highlightColor: null,
|
|
56
56
|
textColor: null,
|
|
57
|
+
secondaryTextColor: null,
|
|
57
58
|
highlightedTextColor: null,
|
|
58
59
|
disabledTextColor: null,
|
|
59
60
|
_lastMoveLocation: null,
|
|
@@ -130,12 +131,13 @@ JSClass("UIMenuWindow", UIWindow, {
|
|
|
130
131
|
var item;
|
|
131
132
|
var itemView;
|
|
132
133
|
var menuSize = JSSize.Zero;
|
|
134
|
+
var i, l;
|
|
133
135
|
// TODO: optimize by only drawing those views that fill the screen
|
|
134
136
|
// We don't need to know the true height because we aren't showing a
|
|
135
137
|
// scroll bar, only indicators that there is more.
|
|
136
138
|
// Although, a UI that uses very long menus is poorly designed, so this
|
|
137
139
|
// is a low priority
|
|
138
|
-
for (
|
|
140
|
+
for (i = 0, l = this._menu.items.length; i < l; ++i){
|
|
139
141
|
item = this._menu.items[i];
|
|
140
142
|
if (!item.hidden){
|
|
141
143
|
this._itemViewIndexesByItemId[item.objectID] = this.menuView.itemViews.length;
|
|
@@ -765,6 +767,7 @@ JSClass("UIMenuView", UIView, {
|
|
|
765
767
|
view.contentInsets = this.menuWindow.itemContentInsets;
|
|
766
768
|
view.indentationSize = this.menuWindow.indentationSize;
|
|
767
769
|
view.textColor = this.menuWindow.textColor;
|
|
770
|
+
view.secondaryTextColor = this.menuWindow.secondaryTextColor;
|
|
768
771
|
view.highlightedTextColor = this.menuWindow.highlightedTextColor;
|
|
769
772
|
view.disabledTextColor = this.menuWindow.disabledTextColor;
|
|
770
773
|
view.highlightColor = this.menuWindow.highlightColor;
|
|
@@ -865,7 +868,9 @@ JSClass("UIMenuItemSeparatorView", UIView, {
|
|
|
865
868
|
JSClass("UIMenuItemView", UIView, {
|
|
866
869
|
|
|
867
870
|
titleLabel: null,
|
|
871
|
+
detailLabel: null,
|
|
868
872
|
textColor: null,
|
|
873
|
+
secondaryTextColor: null,
|
|
869
874
|
highlightedTextColor: null,
|
|
870
875
|
disabledTextColor: null,
|
|
871
876
|
highlightColor: null,
|
|
@@ -927,6 +932,19 @@ JSClass("UIMenuItemView", UIView, {
|
|
|
927
932
|
setItem: function(item){
|
|
928
933
|
this._item = item;
|
|
929
934
|
this.titleLabel.text = item.title;
|
|
935
|
+
if (item.detailText !== null){
|
|
936
|
+
if (this.detailLabel === null){
|
|
937
|
+
this.detailLabel = UILabel.init();
|
|
938
|
+
this.detailLabel.font = JSFont.detail;
|
|
939
|
+
this.detailLabel.text = item.detailText;
|
|
940
|
+
this.insertSubviewBelowSibling(this.detailLabel, this.titleLabel);
|
|
941
|
+
}
|
|
942
|
+
}else{
|
|
943
|
+
if (this.detailLabel !== null){
|
|
944
|
+
this.detailLabel.removeFromSuperview();
|
|
945
|
+
this.detailLabel = null;
|
|
946
|
+
}
|
|
947
|
+
}
|
|
930
948
|
if (item.image !== null){
|
|
931
949
|
this.imageView.image = item.image;
|
|
932
950
|
}else if (this._imageView !== null){
|
|
@@ -969,6 +987,10 @@ JSClass("UIMenuItemView", UIView, {
|
|
|
969
987
|
var textColor = this.getTextColorForItem(item);
|
|
970
988
|
this.titleLabel.font = item.menu.font;
|
|
971
989
|
this.titleLabel.textColor = textColor;
|
|
990
|
+
if (this.detailLabel !== null){
|
|
991
|
+
this.detailLabel.textColor = this.getDetailTextColorForItem(item);
|
|
992
|
+
this.detailLabel.maximumNumberOfLines = item.numberOfDetailTextLines;
|
|
993
|
+
}
|
|
972
994
|
if (this._imageView !== null){
|
|
973
995
|
this._imageView.templateColor = textColor;
|
|
974
996
|
if (!item.enabled && this._imageView.image !== null && this._imageView.image.renderMode === JSImage.RenderMode.original){
|
|
@@ -1019,6 +1041,16 @@ JSClass("UIMenuItemView", UIView, {
|
|
|
1019
1041
|
return this.disabledTextColor;
|
|
1020
1042
|
},
|
|
1021
1043
|
|
|
1044
|
+
getDetailTextColorForItem: function(item){
|
|
1045
|
+
if (item.enabled){
|
|
1046
|
+
if (item.highlighted){
|
|
1047
|
+
return this.highlightedTextColor;
|
|
1048
|
+
}
|
|
1049
|
+
return this.secondaryTextColor;
|
|
1050
|
+
}
|
|
1051
|
+
return this.disabledTextColor;
|
|
1052
|
+
},
|
|
1053
|
+
|
|
1022
1054
|
updateItemView: function(view, item){
|
|
1023
1055
|
},
|
|
1024
1056
|
|
|
@@ -1086,6 +1118,11 @@ JSClass("UIMenuItemView", UIView, {
|
|
|
1086
1118
|
left = right;
|
|
1087
1119
|
}
|
|
1088
1120
|
this.titleLabel.frame = JSRect(left, this.contentInsets.top, right - left, lineHeight);
|
|
1121
|
+
if (this.detailLabel !== null){
|
|
1122
|
+
right = this.bounds.size.width - this.contentInsets.right;
|
|
1123
|
+
var y = this.contentInsets.top + lineHeight;
|
|
1124
|
+
this.detailLabel.frame = JSRect(left, y, right - left, this.bounds.size.height - this.contentInsets.bottom - y);
|
|
1125
|
+
}
|
|
1089
1126
|
},
|
|
1090
1127
|
|
|
1091
1128
|
sizeToFit: function(){
|
|
@@ -1127,6 +1164,9 @@ JSClass("UIMenuItemView", UIView, {
|
|
|
1127
1164
|
size.height = lineHeight + this.contentInsets.top + this.contentInsets.bottom;
|
|
1128
1165
|
size.width = Math.ceil(size.width);
|
|
1129
1166
|
size.height = Math.ceil(size.height);
|
|
1167
|
+
if (this.detailLabel !== null && item.numberOfDetailTextLines > 0){
|
|
1168
|
+
size.height += this.detailLabel.font.displayLineHeight * item.numberOfDetailTextLines;
|
|
1169
|
+
}
|
|
1130
1170
|
this.bounds = JSRect(JSPoint.Zero, size);
|
|
1131
1171
|
},
|
|
1132
1172
|
|
|
@@ -496,19 +496,13 @@ JSClass("UISplitView", UIView, {
|
|
|
496
496
|
var leadingSize = z - dividerZ + divider.layoutAdjustment;
|
|
497
497
|
if (this._leadingCollapses && leadingSize < this._minimumLeadingSize / 2){
|
|
498
498
|
if (this._leadingViewOpen){
|
|
499
|
-
this.leadingViewOpen = false;
|
|
500
499
|
this.leadingSize = this._previousLeadingSize;
|
|
501
|
-
|
|
502
|
-
this.delegate.splitViewDidToggleView(this, this._leadingView);
|
|
503
|
-
}
|
|
500
|
+
this.leadingViewOpen = false;
|
|
504
501
|
}
|
|
505
502
|
}else{
|
|
506
503
|
if (!this._leadingViewOpen){
|
|
507
|
-
this.leadingViewOpen = true;
|
|
508
504
|
this.leadingSize = this._minimumLeadingSize;
|
|
509
|
-
|
|
510
|
-
this.delegate.splitViewDidToggleView(this, this._leadingView);
|
|
511
|
-
}
|
|
505
|
+
this.leadingViewOpen = true;
|
|
512
506
|
}
|
|
513
507
|
if (leadingSize >= this._minimumLeadingSize && leadingSize <= maximumLeadingSize){
|
|
514
508
|
this._leadingSize = leadingSize;
|
|
@@ -526,19 +520,13 @@ JSClass("UISplitView", UIView, {
|
|
|
526
520
|
var trailingSize = boundsSize - z + dividerZ - divider.layoutAdjustment;
|
|
527
521
|
if (this._trailingCollapses && trailingSize < this._minimumTrailingSize / 2){
|
|
528
522
|
if (this._trailingViewOpen){
|
|
529
|
-
this.trailingViewOpen = false;
|
|
530
523
|
this.trailingSize = this._previousTrailingSize;
|
|
531
|
-
|
|
532
|
-
this.delegate.splitViewDidToggleView(this, this._trailingView);
|
|
533
|
-
}
|
|
524
|
+
this.trailingViewOpen = false;
|
|
534
525
|
}
|
|
535
526
|
}else{
|
|
536
527
|
if (!this._trailingViewOpen){
|
|
537
|
-
this.trailingViewOpen = true;
|
|
538
528
|
this.trailingSize = this._minimumTrailingSize;
|
|
539
|
-
|
|
540
|
-
this.delegate.splitViewDidToggleView(this, this._trailingView);
|
|
541
|
-
}
|
|
529
|
+
this.trailingViewOpen = true;
|
|
542
530
|
}
|
|
543
531
|
if (trailingSize >= this._minimumTrailingSize && trailingSize <= maximumTrailingSize){
|
|
544
532
|
this._trailingSize = trailingSize;
|
|
@@ -35,15 +35,30 @@ JSGlobalObject.UIViewLayerProperty = function(){
|
|
|
35
35
|
UIViewLayerProperty.prototype = Object.create(JSCustomProperty.prototype);
|
|
36
36
|
|
|
37
37
|
UIViewLayerProperty.prototype.define = function(C, key, extensions){
|
|
38
|
+
var setterName = C.nameOfSetMethodForKey(key);
|
|
39
|
+
var setter = extensions[setterName];
|
|
40
|
+
if (!setter){
|
|
41
|
+
setter = function UIView_setLayerProperty(value){
|
|
42
|
+
this.layer[key] = value;
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(C.prototype, setterName, {
|
|
45
|
+
configurable: true,
|
|
46
|
+
enumerable: false,
|
|
47
|
+
value: setter
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
var getter = function UIView_getLayerProperty(){
|
|
51
|
+
return this.layer[key];
|
|
52
|
+
};
|
|
53
|
+
getter._JSCustomProperty = this;
|
|
54
|
+
getter._JSCustomPropertyKey = key;
|
|
55
|
+
setter._JSCustomProperty = this;
|
|
56
|
+
setter._JSCustomPropertyKey = key;
|
|
38
57
|
Object.defineProperty(C.prototype, key, {
|
|
39
58
|
configurable: false,
|
|
40
59
|
enumerable: false,
|
|
41
|
-
set:
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
get: function UIView_getLayerProperty(){
|
|
45
|
-
return this.layer[key];
|
|
46
|
-
}
|
|
60
|
+
set: setter,
|
|
61
|
+
get: getter
|
|
47
62
|
});
|
|
48
63
|
};
|
|
49
64
|
|
|
@@ -514,6 +514,13 @@ JSClass('UIWindow', UIView, {
|
|
|
514
514
|
}
|
|
515
515
|
},
|
|
516
516
|
|
|
517
|
+
setHidden: function(hidden){
|
|
518
|
+
UIWindow.$super.setHidden.call(this, hidden);
|
|
519
|
+
if (this._modal !== null){
|
|
520
|
+
this._modal.hidden = hidden;
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
|
|
517
524
|
// -------------------------------------------------------------------------
|
|
518
525
|
// MARK: - Window Server
|
|
519
526
|
|