diff --git a/apps/toolbox/src/app-root.xml b/apps/toolbox/src/app-root.xml index 54e70d976..323c21ffe 100644 --- a/apps/toolbox/src/app-root.xml +++ b/apps/toolbox/src/app-root.xml @@ -1,2 +1,2 @@ - + diff --git a/apps/toolbox/src/app.css b/apps/toolbox/src/app.css index 0e77e788e..769643545 100644 --- a/apps/toolbox/src/app.css +++ b/apps/toolbox/src/app.css @@ -57,8 +57,6 @@ Button { .box-shadow-demo .box-shadow-prop-controls TextField{ margin-left: 10; padding: 5; - border-bottom-width: 1; - border-color: #65ADF1; } .box-shadow-demo .controls .description { @@ -68,18 +66,22 @@ Button { margin-bottom: 10; } -.box-shadow-demo .controls Button[selectedAttr=true] { +.box-shadow-demo .controls .unselected { + background-color: transparent; + color: #65ADF1; +} + +.box-shadow-demo .controls .selected { background-color: #65ADF1; color: #fff; } - .box-shadow-prop-controls .btn-apply { background-color: #65ADF1; color: #fff; - padding: 10 15; + padding: 5 6; border-radius: 4; - margin-left: 10; - font-size: 17; + margin-right: 8; + font-size: 11; font-weight: bold; } diff --git a/apps/toolbox/src/pages/box-shadow.ts b/apps/toolbox/src/pages/box-shadow.ts index cc9e6d824..9981bb6a2 100644 --- a/apps/toolbox/src/pages/box-shadow.ts +++ b/apps/toolbox/src/pages/box-shadow.ts @@ -5,14 +5,17 @@ export function navigatingTo(args: EventData) { page.bindingContext = new BoxShadowModel(); } +const defaultBoxShadow = '0 4 4 4 rgba(0, 0, 0, 0.5)'; +// const defaultBoxShadow = '0 10 15 -3 rgba(200, 0, 0, 0.4)'; +// const defaultBoxShadow = '5 5 1 1 rgba(255, 0, 0, .9)'; +// const defaultBoxShadow = '5 5 5 10 rgba(255, 0, 0, .9)'; + export class BoxShadowModel extends Observable { private _selectedComponentType: string = 'buttons'; private _selectedBackgroundType: string; private _selectedBorderType: string; private _selectedAnimation: string; - private _boxShadow: string = '0 10 15 -3 rgba(200, 0, 0, 0.4)'; - // private _boxShadow: string = '5 5 1 1 rgba(255, 0, 0, .9)'; - // private _boxShadow: string = '5 5 5 10 rgba(255, 0, 0, .9)'; + private _boxShadow: string = defaultBoxShadow; background: string; borderWidth: number; @@ -78,7 +81,7 @@ export class BoxShadowModel extends Observable { this.borderRadius = 10; break; case 'partial': - this.borderRadius = '10 0 0 0'; + this.borderRadius = '10 10 0 0'; break; case 'none': this.borderRadius = 0; @@ -115,6 +118,26 @@ export class BoxShadowModel extends Observable { this.notifyPropertyChange('appliedBoxShadow', this.appliedBoxShadow); } + resetAll() { + this._boxShadow = defaultBoxShadow; + this.appliedBoxShadow = null; + this.notifyPropertyChange('appliedBoxShadow', this.appliedBoxShadow); + this.borderRadius = 0; + this.borderWidth = 0; + this.notifyPropertyChange('borderRadius', this.borderRadius); + this.notifyPropertyChange('borderWidth', this.borderWidth); + this.background = null; + this.notifyPropertyChange('background', this.background); + + this._selectedBackgroundType = null; + this.notifyPropertyChange('selectedBackgroundType', null); + this._selectedBorderType = null; + this.notifyPropertyChange('selectedBorderType', null); + this._selectedComponentType = null; + this.notifyPropertyChange('selectedComponentType', null); + this._selectedAnimation = null; + } + textChange(args): void { this._boxShadow = args.object.text; } diff --git a/apps/toolbox/src/pages/box-shadow.xml b/apps/toolbox/src/pages/box-shadow.xml index 48c86fba6..45ccbe9b0 100644 --- a/apps/toolbox/src/pages/box-shadow.xml +++ b/apps/toolbox/src/pages/box-shadow.xml @@ -9,7 +9,7 @@ - + @@ -28,7 +28,6 @@ - @@ -46,47 +45,46 @@ - - + + - - - - - - + + + + - +