@breakside/jskit 2021.37.0 → 2021.39.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/JSColor+HTML.js +11 -2
- package/Frameworks/Foundation.jsframework/JS/JSColor.js +62 -26
- package/Frameworks/Foundation.jsframework/JS/JSColorSpace.js +209 -1
- package/Frameworks/Foundation.jsframework/JS/JSSpec.js +1 -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 +4 -4
- package/Resources/doc-default.css +86 -0
- 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/JSColor+HTML.js +11 -2
- package/Root/Frameworks/Foundation/JSColor.js +62 -26
- package/Root/Frameworks/Foundation/JSColorSpace.js +209 -1
- package/Root/Frameworks/Foundation/JSSpec.js +1 -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/JSColor+UIKit.js +75 -0
- package/Root/Frameworks/UIKit/UIAccessibility.js +15 -0
- package/Root/Frameworks/UIKit/UIActivityIndicatorView.js +2 -1
- package/Root/Frameworks/UIKit/UIAlertController.js +4 -3
- package/Root/Frameworks/UIKit/UIAnimation.js +7 -13
- package/Root/Frameworks/UIKit/UIApplication.js +3 -0
- package/Root/Frameworks/UIKit/UIBasicAnimation.js +6 -0
- package/Root/Frameworks/UIKit/UIButton.js +17 -25
- package/Root/Frameworks/UIKit/UICheckbox.js +11 -22
- package/Root/Frameworks/UIKit/UIColorPanel.js +27 -15
- package/Root/Frameworks/UIKit/UIColorSpace.js +132 -0
- package/Root/Frameworks/UIKit/UIColorWell.js +18 -2
- package/Root/Frameworks/UIKit/UIHTMLDisplayServer.js +1 -5
- package/Root/Frameworks/UIKit/UIHTMLTextField.js +3 -15
- package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +72 -1
- package/Root/Frameworks/UIKit/UIImageView.js +4 -0
- package/Root/Frameworks/UIKit/UIKit.js +2 -0
- package/Root/Frameworks/UIKit/UILabel.js +14 -2
- package/Root/Frameworks/UIKit/UILayer.js +29 -1
- package/Root/Frameworks/UIKit/UIListView.js +10 -9
- package/Root/Frameworks/UIKit/UIMenu.js +10 -9
- package/Root/Frameworks/UIKit/UIMenuBar.js +5 -4
- package/Root/Frameworks/UIKit/UIMenuView.js +8 -4
- package/Root/Frameworks/UIKit/UINavigationBar.js +8 -5
- package/Root/Frameworks/UIKit/UINavigationController.js +3 -2
- package/Root/Frameworks/UIKit/UIOutlineViewCell.js +2 -1
- package/Root/Frameworks/UIKit/UIPopupButton.js +13 -24
- package/Root/Frameworks/UIKit/UIPopupWindow.js +3 -2
- package/Root/Frameworks/UIKit/UIProgressIndicatorView.js +1 -1
- package/Root/Frameworks/UIKit/UIRadioGroup.js +11 -22
- package/Root/Frameworks/UIKit/UIScroller.js +4 -3
- package/Root/Frameworks/UIKit/UISegmentedControl.js +16 -15
- package/Root/Frameworks/UIKit/UISlider.js +20 -36
- package/Root/Frameworks/UIKit/UITabView.js +34 -31
- package/Root/Frameworks/UIKit/UITextEditor.js +2 -1
- package/Root/Frameworks/UIKit/UITextField.js +13 -14
- package/Root/Frameworks/UIKit/UITextLayer.js +5 -0
- package/Root/Frameworks/UIKit/UITokenField.js +3 -3
- package/Root/Frameworks/UIKit/UIToolbar.js +84 -38
- package/Root/Frameworks/UIKit/UIToolbarOverflow.svg +8 -0
- package/Root/Frameworks/UIKit/UITooltipWindow.js +5 -5
- package/Root/Frameworks/UIKit/UITraitCollection.js +21 -0
- package/Root/Frameworks/UIKit/UIUserInterface.js +6 -0
- package/Root/Frameworks/UIKit/UIWebView.js +3 -2
- package/Root/Frameworks/UIKit/UIWindow.js +18 -24
- package/Root/Frameworks/UIKit/UIWindowButtonCloseInactive.svg +1 -1
- package/Root/Frameworks/UIKit/UIWindowButtonCloseNormal.svg +1 -1
- package/Root/Frameworks/UIKit/UIWindowServer.js +53 -8
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/Root/Templates/html/${PROJECT_NAME}/www/index.html +24 -4
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
// #import "UIPlatform.js"
|
|
19
19
|
// #import "UIImageView.js"
|
|
20
20
|
// #import "UIViewPropertyAnimator.js"
|
|
21
|
+
// #import "JSColor+UIKit.js"
|
|
21
22
|
/* global UIListViewCell, UIListViewHeaderFooterView */
|
|
22
23
|
'use strict';
|
|
23
24
|
|
|
@@ -3029,22 +3030,22 @@ JSClass("UIListViewDefaultStyler", UIListViewStyler, {
|
|
|
3029
3030
|
this.headerFont = JSFont.systemFontOfSize(JSFont.Size.normal).fontWithWeight(JSFont.Weight.bold);
|
|
3030
3031
|
}
|
|
3031
3032
|
if (this.cellTextColor === null){
|
|
3032
|
-
this.cellTextColor = JSColor.
|
|
3033
|
+
this.cellTextColor = JSColor.text;
|
|
3033
3034
|
}
|
|
3034
3035
|
if (this.cellDetailTextColor === null){
|
|
3035
|
-
this.cellDetailTextColor =
|
|
3036
|
+
this.cellDetailTextColor = JSColor.secondaryText;
|
|
3036
3037
|
}
|
|
3037
3038
|
if (this.cellDetailFont === null && this.cellFont !== null){
|
|
3038
|
-
this.cellDetailFont = this.cellFont.fontWithPointSize(
|
|
3039
|
+
this.cellDetailFont = this.cellFont.fontWithPointSize(JSFont.Size.detail);
|
|
3039
3040
|
}
|
|
3040
3041
|
if (this.selectedCellBackgroundColor === null){
|
|
3041
|
-
this.selectedCellBackgroundColor = JSColor.
|
|
3042
|
+
this.selectedCellBackgroundColor = JSColor.highlight;
|
|
3042
3043
|
}
|
|
3043
3044
|
if (this.contextSelectedCellBorderColor === null){
|
|
3044
3045
|
this.contextSelectedCellBorderColor = this.selectedCellBackgroundColor.colorDarkenedByPercentage(0.5);
|
|
3045
3046
|
}
|
|
3046
3047
|
if (this.headerTextColor === null){
|
|
3047
|
-
this.headerTextColor = JSColor.
|
|
3048
|
+
this.headerTextColor = JSColor.text;
|
|
3048
3049
|
}
|
|
3049
3050
|
if (this.cellSeparatorColor === null){
|
|
3050
3051
|
this.cellSeparatorColor = this.cellTextColor.colorWithAlpha(0.2);
|
|
@@ -3053,13 +3054,13 @@ JSClass("UIListViewDefaultStyler", UIListViewStyler, {
|
|
|
3053
3054
|
this.accessoryColor = this.cellTextColor;
|
|
3054
3055
|
}
|
|
3055
3056
|
if (this.selectedCellTextColor === null){
|
|
3056
|
-
this.selectedCellTextColor = JSColor.
|
|
3057
|
+
this.selectedCellTextColor = JSColor.highlightedText;
|
|
3057
3058
|
}
|
|
3058
3059
|
if (this.selectedCellDetailTextColor === null){
|
|
3059
3060
|
this.selectedCellDetailTextColor = this.selectedCellTextColor;
|
|
3060
3061
|
}
|
|
3061
3062
|
if (this.selectedCellSeparatorColor === null){
|
|
3062
|
-
this.selectedCellSeparatorColor =
|
|
3063
|
+
this.selectedCellSeparatorColor = JSColor.clear;
|
|
3063
3064
|
}
|
|
3064
3065
|
if (this.activeCellBackgroundColor === null){
|
|
3065
3066
|
this.activeCellBackgroundColor = this.cellBackgroundColor;
|
|
@@ -3080,10 +3081,10 @@ JSClass("UIListViewDefaultStyler", UIListViewStyler, {
|
|
|
3080
3081
|
this.mutedSelectedCellDetailTextColor = this.cellDetailTextColor;
|
|
3081
3082
|
}
|
|
3082
3083
|
if (this.mutedSelectedCellBackgroundColor === null){
|
|
3083
|
-
this.mutedSelectedCellBackgroundColor =
|
|
3084
|
+
this.mutedSelectedCellBackgroundColor = JSColor.mutedHighlight;
|
|
3084
3085
|
}
|
|
3085
3086
|
if (this.mutedSelectedCellSeparatorColor === null){
|
|
3086
|
-
this.mutedSelectedCellSeparatorColor =
|
|
3087
|
+
this.mutedSelectedCellSeparatorColor = JSColor.clear;
|
|
3087
3088
|
}
|
|
3088
3089
|
if (this.cellContentInsets === null){
|
|
3089
3090
|
this.cellContentInsets = JSInsets.Zero;
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
// #import "UIEvent.js"
|
|
21
21
|
// #import "UIWindow.js"
|
|
22
22
|
// #import "UIAccessibility.js"
|
|
23
|
+
// #import "JSColor+UIKit.js"
|
|
23
24
|
/* global UIMenuWindow */
|
|
24
25
|
'use strict';
|
|
25
26
|
|
|
@@ -444,12 +445,12 @@ JSClass("UIMenuStyler", JSObject, {
|
|
|
444
445
|
|
|
445
446
|
});
|
|
446
447
|
|
|
447
|
-
var defaultTextColor = JSColor.
|
|
448
|
-
var defaultHighlightTextColor = JSColor.
|
|
449
|
-
var defaultDisabledTextColor = JSColor.
|
|
450
|
-
var defaultHighlightColor = JSColor.
|
|
451
|
-
var defaultBackgroundColor = JSColor.
|
|
452
|
-
var defaultBorderColor = JSColor.
|
|
448
|
+
var defaultTextColor = JSColor.text;
|
|
449
|
+
var defaultHighlightTextColor = JSColor.highlightedText;
|
|
450
|
+
var defaultDisabledTextColor = JSColor.text.colorWithAlpha(0.2);
|
|
451
|
+
var defaultHighlightColor = JSColor.highlight;
|
|
452
|
+
var defaultBackgroundColor = JSColor.menu;
|
|
453
|
+
var defaultBorderColor = JSColor.initWithUIStyles(JSColor.black.colorWithAlpha(0.2), JSColor.white.colorWithAlpha(0.2));
|
|
453
454
|
|
|
454
455
|
JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
455
456
|
|
|
@@ -465,7 +466,7 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
465
466
|
itemContentInsets: JSDynamicProperty('_itemContentInsets', JSInsets(2, 3, 2, 7)),
|
|
466
467
|
indentationSize: JSDynamicProperty('_indentationSize', 10),
|
|
467
468
|
separatorSize: 10,
|
|
468
|
-
separatorLineWidth:
|
|
469
|
+
separatorLineWidth: 1,
|
|
469
470
|
separatorColor: null,
|
|
470
471
|
shadowColor: null,
|
|
471
472
|
shadowRadius: 14,
|
|
@@ -474,14 +475,14 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
474
475
|
|
|
475
476
|
init: function(){
|
|
476
477
|
UIMenuWindowStyler.$super.init.call(this);
|
|
477
|
-
this.shadowColor = JSColor.
|
|
478
|
+
this.shadowColor = JSColor.menuShadow;
|
|
478
479
|
this.shadowOffset = JSPoint.Zero;
|
|
479
480
|
this.separatorColor = this.disabledTextColor;
|
|
480
481
|
},
|
|
481
482
|
|
|
482
483
|
initWithSpec: function(spec){
|
|
483
484
|
UIMenuWindowStyler.$super.initWithSpec.call(this, spec);
|
|
484
|
-
this.shadowColor = JSColor.
|
|
485
|
+
this.shadowColor = JSColor.menuShadow;
|
|
485
486
|
this.shadowOffset = JSPoint.Zero;
|
|
486
487
|
if (spec.containsKey('capSize')){
|
|
487
488
|
this._capSize = spec.valueForKey("capSize");
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
// #import "UIWindow.js"
|
|
17
17
|
// #import "UIMenu.js"
|
|
18
18
|
// #import "UIMenuView.js"
|
|
19
|
+
// #import "JSColor+UIKit.js"
|
|
19
20
|
'use strict';
|
|
20
21
|
|
|
21
22
|
JSClass("UIMenuBar", UIWindow, {
|
|
@@ -86,11 +87,11 @@ JSClass("UIMenuBar", UIWindow, {
|
|
|
86
87
|
this.contentView = UIView.init();
|
|
87
88
|
this._clipView = UIView.init();
|
|
88
89
|
this.contentView.addSubview(this._clipView);
|
|
89
|
-
|
|
90
|
+
this.backgroundColor = JSColor.menuBar;
|
|
90
91
|
this._font = JSFont.systemFontOfSize(JSFont.Size.normal).fontWithWeight(JSFont.Weight.regular);
|
|
91
|
-
this._textColor =
|
|
92
|
-
this._highlightColor =
|
|
93
|
-
this._highlightedTextColor =
|
|
92
|
+
this._textColor = JSColor.menuBarText;
|
|
93
|
+
this._highlightColor = JSColor.highlight;
|
|
94
|
+
this._highlightedTextColor = JSColor.highlightedText;
|
|
94
95
|
},
|
|
95
96
|
|
|
96
97
|
// --------------------------------------------------------------------
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
// #import "UIImageView.js"
|
|
21
21
|
// #import "UIEvent.js"
|
|
22
22
|
// #import "UIPlatform.js"
|
|
23
|
+
// #import "JSColor+UIKit.js"
|
|
23
24
|
'use strict';
|
|
24
25
|
|
|
25
26
|
(function(){
|
|
@@ -635,7 +636,7 @@ JSClass("UIMenuView", UIView, {
|
|
|
635
636
|
|
|
636
637
|
initWithFrame: function(frame){
|
|
637
638
|
UIMenuView.$super.initWithFrame.call(this, frame);
|
|
638
|
-
this.backgroundColor = JSColor.
|
|
639
|
+
this.backgroundColor = JSColor.background;
|
|
639
640
|
this.itemViews = [];
|
|
640
641
|
},
|
|
641
642
|
|
|
@@ -643,7 +644,7 @@ JSClass("UIMenuView", UIView, {
|
|
|
643
644
|
var view = item.view;
|
|
644
645
|
if (view === null){
|
|
645
646
|
if (item.separator){
|
|
646
|
-
view = UIMenuItemSeparatorView.initWithColor(this.menuWindow.separatorColor, this.menuWindow.separatorLineWidth);
|
|
647
|
+
view = UIMenuItemSeparatorView.initWithColor(this.menuWindow.separatorColor, this.menuWindow.separatorLineWidth, this.menuWindow.itemContentInsets.insetsWithInsets(0, item.menu.showStatusColumn ? (item.menu.font.displayLineHeight + this.menuWindow.itemContentInsets.left) : 0, 0, 0));
|
|
647
648
|
view.frame = JSRect(0, 0, 1, this.menuWindow.separatorSize);
|
|
648
649
|
}else{
|
|
649
650
|
view = UIMenuItemView.init();
|
|
@@ -714,10 +715,12 @@ JSClass("UIMenuItemSeparatorView", UIView, {
|
|
|
714
715
|
|
|
715
716
|
lineLayer: null,
|
|
716
717
|
size: 0,
|
|
718
|
+
insets: null,
|
|
717
719
|
|
|
718
|
-
initWithColor: function(color, size){
|
|
720
|
+
initWithColor: function(color, size, insets){
|
|
719
721
|
UIMenuItemSeparatorView.$super.init.call(this);
|
|
720
722
|
this.size = size;
|
|
723
|
+
this.insets = JSInsets(insets);
|
|
721
724
|
this.lineLayer = UILayer.init();
|
|
722
725
|
this.lineLayer.backgroundColor = color;
|
|
723
726
|
this.layer.addSublayer(this.lineLayer);
|
|
@@ -725,7 +728,8 @@ JSClass("UIMenuItemSeparatorView", UIView, {
|
|
|
725
728
|
|
|
726
729
|
layoutSubviews: function(){
|
|
727
730
|
UIMenuItemSeparatorView.$super.layoutSubviews.call(this);
|
|
728
|
-
|
|
731
|
+
|
|
732
|
+
this.lineLayer.frame = JSRect(this.insets.left, (this.bounds.size.height - this.size) / 2, this.bounds.size.width - this.insets.width, this.size);
|
|
729
733
|
},
|
|
730
734
|
|
|
731
735
|
isAccessibilityElement: true,
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// #import "UILabel.js"
|
|
18
18
|
// #import "UINavigationBarItem.js"
|
|
19
19
|
// #import "UIViewPropertyAnimator.js"
|
|
20
|
+
// #import "JSColor+UIKit.js"
|
|
20
21
|
'use strict';
|
|
21
22
|
|
|
22
23
|
(function(){
|
|
@@ -317,10 +318,11 @@ JSClass("UINavigationBarDefaultStyler", UINavigationBarStyler, {
|
|
|
317
318
|
init: function(){
|
|
318
319
|
UINavigationBarDefaultStyler.$super.init.call(this);
|
|
319
320
|
this.coversContent = true;
|
|
320
|
-
this.backgroundColor = JSColor.
|
|
321
|
+
this.backgroundColor = JSColor.background;
|
|
321
322
|
this.contentSeparatorSize = 1;
|
|
322
|
-
this.contentSeparatorColor = JSColor.
|
|
323
|
-
this.titleColor = JSColor.
|
|
323
|
+
this.contentSeparatorColor = JSColor.initWithUIStyles(JSColor.black.colorWithAlpha(0.1), JSColor.white.colorWithAlpha(0.1));
|
|
324
|
+
this.titleColor = JSColor.text;
|
|
325
|
+
this.itemColor = JSColor.highlight;
|
|
324
326
|
this.itemInsets = JSInsets.Zero;
|
|
325
327
|
this._fillInDefaultStyles();
|
|
326
328
|
},
|
|
@@ -336,8 +338,8 @@ JSClass("UINavigationBarDefaultStyler", UINavigationBarStyler, {
|
|
|
336
338
|
if (spec.containsKey("contentSeparatorColor")){
|
|
337
339
|
this.contentSeparatorColor = spec.valueForKey("contentSeparatorColor", JSColor);
|
|
338
340
|
}
|
|
339
|
-
if (spec.containsKey("
|
|
340
|
-
this.
|
|
341
|
+
if (spec.containsKey("contentSeparatorSize")){
|
|
342
|
+
this.contentSeparatorSize = spec.valueForKey("contentSeparatorSize");
|
|
341
343
|
}
|
|
342
344
|
if (spec.containsKey("titleColor")){
|
|
343
345
|
this.titleColor = spec.valueForKey("titleColor", JSColor);
|
|
@@ -772,6 +774,7 @@ JSClass("UINavigationBarDefaultStyler", UINavigationBarStyler, {
|
|
|
772
774
|
button.accessibilityLabel = barItem.accessibilityTitle;
|
|
773
775
|
if (barItem.image){
|
|
774
776
|
button.setImageForState(barItem.image, UIControl.State.normal);
|
|
777
|
+
button._imageView.automaticRenderMode = JSImage.RenderMode.template;
|
|
775
778
|
}
|
|
776
779
|
button.addAction(barItem.action, barItem.target);
|
|
777
780
|
return button;
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// #import "UINavigationBar.js"
|
|
18
18
|
// #import "UIScrollView.js"
|
|
19
19
|
// #import "UIViewPropertyAnimator.js"
|
|
20
|
+
// #import "JSColor+UIKit.js"
|
|
20
21
|
/* global UISplitViewController */
|
|
21
22
|
'use strict';
|
|
22
23
|
|
|
@@ -195,7 +196,7 @@ JSClass("UINavigationController", UIViewController, {
|
|
|
195
196
|
var navController = this;
|
|
196
197
|
this.layoutChildView(viewController.view);
|
|
197
198
|
viewController.view.transform = JSAffineTransform.Translated(viewController.view.bounds.size.width, 0);
|
|
198
|
-
viewController.view.shadowColor = JSColor.
|
|
199
|
+
viewController.view.shadowColor = JSColor.windowShadow;
|
|
199
200
|
viewController.view.shadowRadius = 20;
|
|
200
201
|
this.pushAnimator.addAnimations(function(){
|
|
201
202
|
viewController.view.transform = JSAffineTransform.Identity;
|
|
@@ -272,7 +273,7 @@ JSClass("UINavigationController", UIViewController, {
|
|
|
272
273
|
var navController = this;
|
|
273
274
|
this.layoutChildView(viewController.view);
|
|
274
275
|
viewController.view.transform = JSAffineTransform.Translated(-viewController.view.bounds.size.width / 2, 0);
|
|
275
|
-
fromViewController.view.shadowColor = JSColor.
|
|
276
|
+
fromViewController.view.shadowColor = JSColor.windowShadow;
|
|
276
277
|
fromViewController.view.shadowRadius = 20;
|
|
277
278
|
this.popAnimator.addAnimations(function(){
|
|
278
279
|
viewController.view.transform = JSAffineTransform.Identity;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
// #import "UIListViewCell.js"
|
|
17
17
|
// #import "UIButton.js"
|
|
18
18
|
// #import "UIEvent.js"
|
|
19
|
+
// #import "JSColor+UIKit.js"
|
|
19
20
|
'use strict';
|
|
20
21
|
|
|
21
22
|
JSClass("UIOutlineViewCell", UIListViewCell, {
|
|
@@ -28,7 +29,7 @@ JSClass("UIOutlineViewCell", UIListViewCell, {
|
|
|
28
29
|
|
|
29
30
|
_commonCellInit: function(){
|
|
30
31
|
UIOutlineViewCell.$super._commonCellInit.call(this);
|
|
31
|
-
var buttonStyler = UIButtonImageStyler.initWithColor(JSColor.
|
|
32
|
+
var buttonStyler = UIButtonImageStyler.initWithColor(JSColor.text);
|
|
32
33
|
this._disclosureButton = UIButton.initWithStyler(buttonStyler);
|
|
33
34
|
this._disclosureButton.addAction("_toggleExpanded", this);
|
|
34
35
|
this._disclosureButton.accessibilityRole = UIAccessibility.Role.disclosureTriangle;
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// #import "UILabel.js"
|
|
18
18
|
// #import "UIImageView.js"
|
|
19
19
|
// #import "UIMenu.js"
|
|
20
|
+
// #import "JSColor+UIKit.js"
|
|
20
21
|
'use strict';
|
|
21
22
|
|
|
22
23
|
(function(){
|
|
@@ -480,7 +481,7 @@ JSClass("UIPopupButtonCustomStyler", UIPopupButtonStyler, {
|
|
|
480
481
|
indicatorSpacing: 0,
|
|
481
482
|
|
|
482
483
|
init: function(){
|
|
483
|
-
this.initWithColor(JSColor.
|
|
484
|
+
this.initWithColor(JSColor.text);
|
|
484
485
|
},
|
|
485
486
|
|
|
486
487
|
initWithColor: function(color){
|
|
@@ -588,7 +589,7 @@ JSClass("UIPopupButtonCustomStyler", UIPopupButtonStyler, {
|
|
|
588
589
|
}
|
|
589
590
|
}
|
|
590
591
|
if (this.normalTitleColor === null){
|
|
591
|
-
this.normalTitleColor = JSColor.
|
|
592
|
+
this.normalTitleColor = JSColor.text;
|
|
592
593
|
}
|
|
593
594
|
if (this.activeTitleColor === null){
|
|
594
595
|
this.activeTitleColor = this.normalTitleColor.colorDarkenedByPercentage(0.2);
|
|
@@ -703,31 +704,31 @@ JSClass("UIPopupButtonDefaultStyler", UIPopupButtonCustomStyler, {
|
|
|
703
704
|
|
|
704
705
|
_fillInMissingColors: function(){
|
|
705
706
|
if (this.normalBackgroundColor === null){
|
|
706
|
-
this.normalBackgroundColor =
|
|
707
|
+
this.normalBackgroundColor = JSColor.controlBackground;
|
|
707
708
|
if (this.activeBackgroundColor === null){
|
|
708
|
-
this.activeBackgroundColor =
|
|
709
|
+
this.activeBackgroundColor = JSColor.activeControlBackground;
|
|
709
710
|
}
|
|
710
711
|
if (this.disabledBackgroundColor === null){
|
|
711
|
-
this.disabledBackgroundColor =
|
|
712
|
+
this.disabledBackgroundColor = JSColor.disabledControlBackground;
|
|
712
713
|
}
|
|
713
714
|
}
|
|
714
715
|
if (this.normalBorderColor === null){
|
|
715
|
-
this.normalBorderColor =
|
|
716
|
+
this.normalBorderColor = JSColor.controlBorder;
|
|
716
717
|
if (this.activeBorderColor === null){
|
|
717
|
-
this.activeBorderColor =
|
|
718
|
+
this.activeBorderColor = JSColor.activeControlBorder;
|
|
718
719
|
}
|
|
719
720
|
if (this.disabledBorderColor === null){
|
|
720
|
-
this.disabledBorderColor =
|
|
721
|
+
this.disabledBorderColor = JSColor.disabledControlBorder;
|
|
721
722
|
}
|
|
722
723
|
}
|
|
723
724
|
if (this.normalTitleColor === null){
|
|
724
|
-
this.normalTitleColor =
|
|
725
|
+
this.normalTitleColor = JSColor.controlTitle;
|
|
725
726
|
}
|
|
726
727
|
if (this.activeTitleColor === null){
|
|
727
|
-
this.activeTitleColor =
|
|
728
|
+
this.activeTitleColor = JSColor.activeControlTitle;
|
|
728
729
|
}
|
|
729
730
|
if (this.disabledTitleColor === null){
|
|
730
|
-
this.disabledTitleColor =
|
|
731
|
+
this.disabledTitleColor = JSColor.disabledControlTitle;
|
|
731
732
|
}
|
|
732
733
|
}
|
|
733
734
|
|
|
@@ -744,7 +745,7 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
|
|
|
744
745
|
cornerRadius: 0,
|
|
745
746
|
|
|
746
747
|
init: function(){
|
|
747
|
-
this.initWithColor(JSColor.
|
|
748
|
+
this.initWithColor(JSColor.text);
|
|
748
749
|
},
|
|
749
750
|
|
|
750
751
|
initWithColor: function(color){
|
|
@@ -832,18 +833,6 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
|
|
|
832
833
|
|
|
833
834
|
});
|
|
834
835
|
|
|
835
|
-
UIPopupButtonDefaultStyler.NormalBackgroundColor = JSColor.initWithRGBA(250/255,250/255,250/255);
|
|
836
|
-
UIPopupButtonDefaultStyler.ActiveBackgroundColor = JSColor.initWithRGBA(224/255,224/255,224/255);
|
|
837
|
-
UIPopupButtonDefaultStyler.DisabledBackgroundColor = JSColor.initWithRGBA(240/255,240/255,240/255);
|
|
838
|
-
|
|
839
|
-
UIPopupButtonDefaultStyler.NormalBorderColor = JSColor.initWithRGBA(204/255,204/255,204/255);
|
|
840
|
-
UIPopupButtonDefaultStyler.ActiveBorderColor = JSColor.initWithRGBA(192/255,192/255,192/255);
|
|
841
|
-
UIPopupButtonDefaultStyler.DisabledBorderColor = JSColor.initWithRGBA(224/255,224/255,224/255);
|
|
842
|
-
|
|
843
|
-
UIPopupButtonDefaultStyler.NormalTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
|
|
844
|
-
UIPopupButtonDefaultStyler.ActiveTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
|
|
845
|
-
UIPopupButtonDefaultStyler.DisabledTitleColor = JSColor.initWithRGBA(152/255,152/255,152/255);
|
|
846
|
-
|
|
847
836
|
var images = Object.create({}, {
|
|
848
837
|
|
|
849
838
|
bundle: {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
// #import "UIWindow.js"
|
|
17
17
|
// #import "UIViewPropertyAnimator.js"
|
|
18
|
+
// #import "JSColor+UIKit.js"
|
|
18
19
|
'use strict';
|
|
19
20
|
|
|
20
21
|
JSClass("UIPopupWindow", UIWindow, {
|
|
@@ -321,8 +322,8 @@ JSClass("UIPopupWindowStyler", UIWindowStyler, {
|
|
|
321
322
|
|
|
322
323
|
init: function(){
|
|
323
324
|
UIPopupWindowStyler.$super.init.call(this);
|
|
324
|
-
this.backgroundColor = JSColor.
|
|
325
|
-
this.shadowColor = JSColor.
|
|
325
|
+
this.backgroundColor = JSColor.window;
|
|
326
|
+
this.shadowColor = JSColor.windowShadow;
|
|
326
327
|
this.shadowOffset = JSPoint.Zero;
|
|
327
328
|
this.shadowRadius = UIWindow.Styler.default.shadowRadius;
|
|
328
329
|
this.cornerRadius = UIWindow.Styler.default.cornerRadius;
|
|
@@ -51,7 +51,7 @@ JSClass("UIProgressIndicatorView", UIView, {
|
|
|
51
51
|
|
|
52
52
|
_commonProgressInit: function(){
|
|
53
53
|
if (this._progressBarColor === null){
|
|
54
|
-
this._progressBarColor = JSColor.
|
|
54
|
+
this._progressBarColor = JSColor.initWithUIStyles(JSColor.black.colorLightenedByPercentage(0.6), JSColor.white.colorDarkenedByPercentage(0.6));
|
|
55
55
|
}
|
|
56
56
|
if (this._progressBorderColor === null){
|
|
57
57
|
this._progressBorderColor = this._progressBarColor;
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// #import "UILabel.js"
|
|
18
18
|
// #import "UIImageView.js"
|
|
19
19
|
// #import "UIEvent.js"
|
|
20
|
+
// #import "JSColor+UIKit.js"
|
|
20
21
|
'use strict';
|
|
21
22
|
|
|
22
23
|
(function(){
|
|
@@ -360,16 +361,16 @@ JSClass("UIRadioButtonDefaultStyler", UIRadioButtonStyler, {
|
|
|
360
361
|
borderWidth: 1,
|
|
361
362
|
|
|
362
363
|
init: function(){
|
|
363
|
-
this.normalBackgroundColor =
|
|
364
|
-
this.disabledBackgroundColor =
|
|
365
|
-
this.activeBackgroundColor =
|
|
366
|
-
this.normalBorderColor =
|
|
367
|
-
this.disabledBorderColor =
|
|
368
|
-
this.activeBorderColor =
|
|
369
|
-
this.normalTitleColor =
|
|
370
|
-
this.disabledTitleColor =
|
|
371
|
-
this.activeTitleColor =
|
|
372
|
-
this.shadowColor = JSColor.
|
|
364
|
+
this.normalBackgroundColor = JSColor.controlBackground;
|
|
365
|
+
this.disabledBackgroundColor = JSColor.disabledControlBackground;
|
|
366
|
+
this.activeBackgroundColor = JSColor.activeControlBackground;
|
|
367
|
+
this.normalBorderColor = JSColor.controlBorder;
|
|
368
|
+
this.disabledBorderColor = JSColor.disabledControlBorder;
|
|
369
|
+
this.activeBorderColor = JSColor.activeControlBorder;
|
|
370
|
+
this.normalTitleColor = JSColor.controlTitle;
|
|
371
|
+
this.disabledTitleColor = JSColor.disabledControlTitle;
|
|
372
|
+
this.activeTitleColor = JSColor.activeControlTitle;
|
|
373
|
+
this.shadowColor = JSColor.controlShadow;
|
|
373
374
|
this.shadowOffset = JSPoint(0, 1);
|
|
374
375
|
},
|
|
375
376
|
|
|
@@ -426,18 +427,6 @@ JSClass("UIRadioButtonDefaultStyler", UIRadioButtonStyler, {
|
|
|
426
427
|
|
|
427
428
|
});
|
|
428
429
|
|
|
429
|
-
UIRadioButtonDefaultStyler.NormalBackgroundColor = JSColor.initWithRGBA(250/255,250/255,250/255);
|
|
430
|
-
UIRadioButtonDefaultStyler.ActiveBackgroundColor = JSColor.initWithRGBA(224/255,224/255,224/255);
|
|
431
|
-
UIRadioButtonDefaultStyler.DisabledBackgroundColor = JSColor.initWithRGBA(240/255,240/255,240/255);
|
|
432
|
-
|
|
433
|
-
UIRadioButtonDefaultStyler.NormalBorderColor = JSColor.initWithRGBA(204/255,204/255,204/255);
|
|
434
|
-
UIRadioButtonDefaultStyler.ActiveBorderColor = JSColor.initWithRGBA(192/255,192/255,192/255);
|
|
435
|
-
UIRadioButtonDefaultStyler.DisabledBorderColor = JSColor.initWithRGBA(224/255,224/255,224/255);
|
|
436
|
-
|
|
437
|
-
UIRadioButtonDefaultStyler.NormalTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
|
|
438
|
-
UIRadioButtonDefaultStyler.ActiveTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
|
|
439
|
-
UIRadioButtonDefaultStyler.DisabledTitleColor = JSColor.initWithRGBA(152/255,152/255,152/255);
|
|
440
|
-
|
|
441
430
|
var images = Object.create({}, {
|
|
442
431
|
|
|
443
432
|
bundle: {
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
// #import "UIControl.js"
|
|
17
17
|
// #import "UIViewPropertyAnimator.js"
|
|
18
18
|
// #import "UIDevice.js"
|
|
19
|
+
// #import "JSColor+UIKit.js"
|
|
19
20
|
'use strict';
|
|
20
21
|
|
|
21
22
|
JSClass("UIScroller", UIControl, {
|
|
@@ -287,9 +288,9 @@ JSClass("UIScrollerDefaultStyler", UIScrollerStyler, {
|
|
|
287
288
|
this.knobInsets = JSInsets(2, 3, 2, 2);
|
|
288
289
|
var maxKnobWidth = this.expandedSize - this.knobInsets.left - this.knobInsets.right;
|
|
289
290
|
this.minimumKnobLength = maxKnobWidth * 2;
|
|
290
|
-
this.trackColor = JSColor.initWithWhite(0, 0.1);
|
|
291
|
-
this.trackBorderColor = JSColor.initWithWhite(0, 0.15);
|
|
292
|
-
this.knobColor = JSColor.initWithWhite(0, 0.6);
|
|
291
|
+
this.trackColor = JSColor.initWithUIStyles(JSColor.initWithWhite(0, 0.1), JSColor.initWithWhite(1, 0.1));
|
|
292
|
+
this.trackBorderColor = JSColor.initWithUIStyles(JSColor.initWithWhite(0, 0.15), JSColor.initWithWhite(1, 0.05));
|
|
293
|
+
this.knobColor = JSColor.initWithUIStyles(JSColor.initWithWhite(0, 0.6), JSColor.initWithWhite(1, 0.6));
|
|
293
294
|
if (UIDevice.shared && UIDevice.shared.primaryPointerType === UIUserInterface.PointerType.touch){
|
|
294
295
|
this.collapsedSize = 8;
|
|
295
296
|
}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// #import "UILabel.js"
|
|
18
18
|
// #import "UIImageView.js"
|
|
19
19
|
// #import "UIEvent.js"
|
|
20
|
+
// #import "JSColor+UIKit.js"
|
|
20
21
|
'use strict';
|
|
21
22
|
|
|
22
23
|
JSClass("UISegmentedControl", UIControl, {
|
|
@@ -662,21 +663,21 @@ JSClass("UISegmentedControlDefaultStyler", UISegmentedControlStyler, {
|
|
|
662
663
|
cornerRadius: 3,
|
|
663
664
|
|
|
664
665
|
init: function(){
|
|
665
|
-
this.normalBackgroundColor = JSColor.
|
|
666
|
-
this.activeBackgroundColor = JSColor.
|
|
667
|
-
this.disabledBackgroundColor = JSColor.
|
|
668
|
-
this.selectedBackgroundColor = JSColor.
|
|
669
|
-
this.selectedActiveBackgroundColor = JSColor.
|
|
670
|
-
this.normalBorderColor = JSColor.
|
|
671
|
-
this.activeBorderColor = JSColor.
|
|
672
|
-
this.disabledBorderColor = JSColor.
|
|
673
|
-
this.selectedBorderColor =
|
|
674
|
-
this.selectedActiveBorderColor =
|
|
675
|
-
this.normalTitleColor = JSColor.
|
|
676
|
-
this.activeTitleColor = JSColor.
|
|
677
|
-
this.disabledTitleColor = JSColor.
|
|
678
|
-
this.selectedTitleColor = JSColor.
|
|
679
|
-
this.selectedActiveTitleColor =
|
|
666
|
+
this.normalBackgroundColor = JSColor.controlBackground;
|
|
667
|
+
this.activeBackgroundColor = JSColor.activeControlBackground;
|
|
668
|
+
this.disabledBackgroundColor = JSColor.disabledControlBackground;
|
|
669
|
+
this.selectedBackgroundColor = JSColor.selectedControlBackground;
|
|
670
|
+
this.selectedActiveBackgroundColor = JSColor.activeSelectedControlBackground;
|
|
671
|
+
this.normalBorderColor = JSColor.controlBorder;
|
|
672
|
+
this.activeBorderColor = JSColor.activeControlBorder;
|
|
673
|
+
this.disabledBorderColor = JSColor.disabledControlBorder;
|
|
674
|
+
this.selectedBorderColor = JSColor.selectedControlBorder;
|
|
675
|
+
this.selectedActiveBorderColor = JSColor.activeSelectedControlBorder;
|
|
676
|
+
this.normalTitleColor = JSColor.controlTitle;
|
|
677
|
+
this.activeTitleColor = JSColor.activeControlTitle;
|
|
678
|
+
this.disabledTitleColor = JSColor.disabledControlTitle;
|
|
679
|
+
this.selectedTitleColor = JSColor.selectedControlTitle;
|
|
680
|
+
this.selectedActiveTitleColor = JSColor.activeSelectedControlTitle;
|
|
680
681
|
this.shadowColor = JSColor.initWithRGBA(0, 0, 0, 0.1);
|
|
681
682
|
this.shadowOffset = JSPoint(0, 1);
|
|
682
683
|
this.titleInsets = JSInsets(3, 7);
|
|
@@ -330,21 +330,21 @@ JSClass("UISliderDefaultStyler", UISliderLayerBasedStyler, {
|
|
|
330
330
|
init: function(){
|
|
331
331
|
UISliderDefaultStyler.$super.init.call(this);
|
|
332
332
|
this.knobSize = JSSize(16, 16);
|
|
333
|
-
this.normalTrackColor =
|
|
334
|
-
this.activeTrackColor =
|
|
335
|
-
this.disabledTrackColor =
|
|
336
|
-
this.normalTrackBorderColor =
|
|
337
|
-
this.activeTrackBorderColor =
|
|
338
|
-
this.disabledTrackBorderColor =
|
|
333
|
+
this.normalTrackColor = JSColor.initWithUIStyles(JSColor.controlBackground.colorDarkenedByPercentage(0.02), JSColor.controlBackground.colorDarkenedByPercentage(0.3), JSColor.controlBackground, JSColor.controlBackground);
|
|
334
|
+
this.activeTrackColor = this.normalTrackColor;
|
|
335
|
+
this.disabledTrackColor = JSColor.disabledControlBackground;
|
|
336
|
+
this.normalTrackBorderColor = JSColor.controlBorder;
|
|
337
|
+
this.activeTrackBorderColor = JSColor.controlBorder;
|
|
338
|
+
this.disabledTrackBorderColor = JSColor.disabledControlBorder;
|
|
339
339
|
this.trackInnerShadowColor = JSColor.black.colorWithAlpha(0.4);
|
|
340
340
|
this.trackInnerShadowOffset = JSPoint(0, 1);
|
|
341
|
-
this.normalKnobBackgroundColor =
|
|
342
|
-
this.disabledKnobBackgroundColor =
|
|
343
|
-
this.activeKnobBackgroundColor =
|
|
344
|
-
this.normalKnobBorderColor =
|
|
345
|
-
this.disabledKnobBorderColor =
|
|
346
|
-
this.activeKnobBorderColor =
|
|
347
|
-
this.knobShadowColor = JSColor.
|
|
341
|
+
this.normalKnobBackgroundColor = JSColor.controlBackground;
|
|
342
|
+
this.disabledKnobBackgroundColor = JSColor.disabledControlBackground;
|
|
343
|
+
this.activeKnobBackgroundColor = JSColor.activeControlBackground;
|
|
344
|
+
this.normalKnobBorderColor = JSColor.controlBorder;
|
|
345
|
+
this.disabledKnobBorderColor = JSColor.disabledControlBorder;
|
|
346
|
+
this.activeKnobBorderColor = JSColor.activeControlBorder;
|
|
347
|
+
this.knobShadowColor = JSColor.controlShadow;
|
|
348
348
|
this.knobShadowOffset = JSPoint(0, 1);
|
|
349
349
|
},
|
|
350
350
|
|
|
@@ -534,22 +534,6 @@ JSClass("UISliderDefaultStyler", UISliderLayerBasedStyler, {
|
|
|
534
534
|
|
|
535
535
|
});
|
|
536
536
|
|
|
537
|
-
UISliderDefaultStyler.NormalTrackColor = JSColor.initWithRGBA(245/255,245/255,245/255);
|
|
538
|
-
UISliderDefaultStyler.ActiveTrackColor = UISliderDefaultStyler.NormalTrackColor;
|
|
539
|
-
UISliderDefaultStyler.DisabledTrackColor = JSColor.initWithRGBA(240/255,240/255,240/255);
|
|
540
|
-
|
|
541
|
-
UISliderDefaultStyler.NormalTrackBorderColor = JSColor.initWithRGBA(204/255,204/255,204/255);
|
|
542
|
-
UISliderDefaultStyler.ActiveTrackBorderColor = UISliderDefaultStyler.NormalTrackBorderColor;
|
|
543
|
-
UISliderDefaultStyler.DisabledTrackBorderColor = JSColor.initWithRGBA(224/255,224/255,224/255);
|
|
544
|
-
|
|
545
|
-
UISliderDefaultStyler.NormalKnobBackgroundColor = JSColor.initWithRGBA(250/255,250/255,250/255);
|
|
546
|
-
UISliderDefaultStyler.ActiveKnobBackgroundColor = JSColor.initWithRGBA(224/255,224/255,224/255);
|
|
547
|
-
UISliderDefaultStyler.DisabledKnobBackgroundColor = JSColor.initWithRGBA(240/255,240/255,240/255);
|
|
548
|
-
|
|
549
|
-
UISliderDefaultStyler.NormalKnobBorderColor = JSColor.initWithRGBA(204/255,204/255,204/255);
|
|
550
|
-
UISliderDefaultStyler.ActiveKnobBorderColor = JSColor.initWithRGBA(192/255,192/255,192/255);
|
|
551
|
-
UISliderDefaultStyler.DisabledKnobBorderColor = JSColor.initWithRGBA(224/255,224/255,224/255);
|
|
552
|
-
|
|
553
537
|
JSClass("UISliderColorStyler", UISliderLayerBasedStyler, {
|
|
554
538
|
|
|
555
539
|
gradient: null,
|
|
@@ -595,13 +579,13 @@ JSClass("UISliderColorStyler", UISliderLayerBasedStyler, {
|
|
|
595
579
|
this.knobSize = JSSize(this.trackWidth + 6, this.trackWidth + 6);
|
|
596
580
|
}
|
|
597
581
|
this.trackRadius = this.trackWidth / 2;
|
|
598
|
-
this.normalKnobBackgroundColor = JSColor.
|
|
599
|
-
this.activeKnobBackgroundColor = JSColor.
|
|
600
|
-
this.disabledKnobBackgroundColor =
|
|
601
|
-
this.normalKnobBorderColor = JSColor.
|
|
602
|
-
this.activeKnobBorderColor = JSColor.
|
|
603
|
-
this.disabledKnobBorderColor = JSColor.
|
|
604
|
-
this.checkerColor = JSColor.initWithWhite(0.9);
|
|
582
|
+
this.normalKnobBackgroundColor = JSColor.controlBackground;
|
|
583
|
+
this.activeKnobBackgroundColor = JSColor.activeControlBackground;
|
|
584
|
+
this.disabledKnobBackgroundColor = JSColor.disabledControlBackground;
|
|
585
|
+
this.normalKnobBorderColor = JSColor.controlBorder;
|
|
586
|
+
this.activeKnobBorderColor = JSColor.activeControlBorder;
|
|
587
|
+
this.disabledKnobBorderColor = JSColor.disabledControlBorder;
|
|
588
|
+
this.checkerColor = JSColor.initWithUIStyles(JSColor.initWithWhite(0.9), JSColor.initWithWhite(0.1));
|
|
605
589
|
},
|
|
606
590
|
|
|
607
591
|
setColors: function(colors){
|