diff --git a/platform/commonUI/general/res/sass/_fixed-position.scss b/platform/commonUI/general/res/sass/_fixed-position.scss index b2e10d7e72..e2fcaaedf1 100644 --- a/platform/commonUI/general/res/sass/_fixed-position.scss +++ b/platform/commonUI/general/res/sass/_fixed-position.scss @@ -52,6 +52,7 @@ font-size: 0.8rem; $p: 1px; line-height: 100%; + overflow: hidden; &.l-static-text { padding: $p; } diff --git a/platform/commonUI/general/res/sass/controls/_buttons.scss b/platform/commonUI/general/res/sass/controls/_buttons.scss index f3f26ddc86..d568d66ae0 100644 --- a/platform/commonUI/general/res/sass/controls/_buttons.scss +++ b/platform/commonUI/general/res/sass/controls/_buttons.scss @@ -33,7 +33,6 @@ $pad: $interiorMargin * $baseRatio; height: $btnStdH; line-height: $btnStdH; padding: 0 $pad; - vertical-align: top; &.labeled:before { // Icon when it's included diff --git a/platform/commonUI/general/res/sass/controls/_controls.scss b/platform/commonUI/general/res/sass/controls/_controls.scss index a84c26ea52..e1cf1ddf1d 100644 --- a/platform/commonUI/general/res/sass/controls/_controls.scss +++ b/platform/commonUI/general/res/sass/controls/_controls.scss @@ -309,9 +309,8 @@ textarea.lg { position: relative; height: 300px; } } } &:before { - //@include contextArrow(); pointer-events: none; - color: rgba($colorSelectFg, percentToDecimal($contrastInvokeMenuPercent)); + color: rgba($colorInvokeMenu, percentToDecimal($contrastInvokeMenuPercent)); display: block; position: absolute; right: $interiorMargin; top: 0; diff --git a/platform/commonUI/general/res/sass/user-environ/_layout.scss b/platform/commonUI/general/res/sass/user-environ/_layout.scss index 920ba0b3e5..690b30b191 100644 --- a/platform/commonUI/general/res/sass/user-environ/_layout.scss +++ b/platform/commonUI/general/res/sass/user-environ/_layout.scss @@ -240,7 +240,9 @@ body.desktop .pane .mini-tab-icon.toggle-pane { .top-bar .buttons-main .s-button, .top-bar .s-menu-button, .tool-bar .s-button, -.tool-bar .s-menu-button { +.tool-bar .s-menu-button, +.tool-bar .select, +.tool-bar .input-labeled { $h: $btnToolbarH; height: $h; line-height: $h; diff --git a/platform/commonUI/general/res/sass/user-environ/_tool-bar.scss b/platform/commonUI/general/res/sass/user-environ/_tool-bar.scss index e8788b195d..9d9c4b0786 100644 --- a/platform/commonUI/general/res/sass/user-environ/_tool-bar.scss +++ b/platform/commonUI/general/res/sass/user-environ/_tool-bar.scss @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ .tool-bar { + font-size: 0.7rem; &.btn-bar { white-space: nowrap; } @@ -30,9 +31,7 @@ input[type="search"], input[type="number"] { box-sizing: border-box; - font-size: .8em; height: $btnToolbarH; - margin-bottom: 1px; position: relative; &.sm { width: $btnToolbarH; diff --git a/platform/features/fixed/bundle.js b/platform/features/fixed/bundle.js index 4dc01d682e..3f8e1ced07 100644 --- a/platform/features/fixed/bundle.js +++ b/platform/features/fixed/bundle.js @@ -122,14 +122,6 @@ define([ "description": "Set border color", "control": "color" }, - { - "property": "color", - "cssClass": "icon-T", - "title": "Text color", - "description": "Set text color", - "mandatory": true, - "control": "color" - }, { "property": "url", "cssClass": "icon-image", @@ -145,6 +137,27 @@ define([ } ] }, + { + "items": [ + { + "property": "color", + "cssClass": "icon-T", + "title": "Text color", + "description": "Set text color", + "mandatory": true, + "control": "color" + }, + { + "property": "size", + "title": "Text size", + "description": "Set text size", + "control": "select", + "options": [9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 30, 36, 48, 72, 96].map(function (size) { + return { "name": size + " px", "value": size + "px" }; + }) + } + ] + }, { "items": [ { @@ -212,11 +225,7 @@ define([ "control": "numberfield", "description": "Resize object width", "min": "1" - } - ] - }, - { - "items": [ + }, { "property": "useGrid", "name": "Snap to Grid", diff --git a/platform/features/layout/res/templates/elements/telemetry.html b/platform/features/layout/res/templates/elements/telemetry.html index 0f5ed58f05..515c919dc4 100644 --- a/platform/features/layout/res/templates/elements/telemetry.html +++ b/platform/features/layout/res/templates/elements/telemetry.html @@ -21,7 +21,7 @@ -->
{{ngModel.element.text}}
diff --git a/platform/features/layout/src/elements/TextProxy.js b/platform/features/layout/src/elements/TextProxy.js index 939c88c5ef..a055ad3853 100644 --- a/platform/features/layout/src/elements/TextProxy.js +++ b/platform/features/layout/src/elements/TextProxy.js @@ -58,6 +58,19 @@ define( */ proxy.text = new AccessorMutator(element, 'text'); + /** + * Get and/or set the text size of this element. + * + * @param {string} [size] the new text size (if setting) + * @returns {string} the text size + * @memberof platform/features/layout.TextProxy# + */ + proxy.size = new AccessorMutator(element, 'size'); + + if (proxy.size() === undefined) { + proxy.size("13px"); + } + return proxy; } diff --git a/platform/features/layout/test/elements/TextProxySpec.js b/platform/features/layout/test/elements/TextProxySpec.js index ee6c5044f9..494ee76bda 100644 --- a/platform/features/layout/test/elements/TextProxySpec.js +++ b/platform/features/layout/test/elements/TextProxySpec.js @@ -35,7 +35,8 @@ define( y: 2, width: 42, height: 24, - fill: "transparent" + fill: "transparent", + size: "20px" }; testElements = [{}, {}, testElement, {}]; proxy = new TextProxy( @@ -50,6 +51,20 @@ define( expect(proxy.fill('#FFF')).toEqual('#FFF'); expect(proxy.fill()).toEqual('#FFF'); }); + + it("provides getter/setter for text size", function () { + expect(proxy.size()).toEqual('20px'); + expect(proxy.size('12px')).toEqual('12px'); + expect(proxy.size()).toEqual('12px'); + }); + + it("defaults to 13px for unspecified text size", function () { + testElement = {x: 1, y: 2}; + proxy = new TextProxy(testElement, 0, [testElement]); + + expect(proxy.size()).toEqual('13px'); + }); + }); } );