Skip to content

Commit 8420c55

Browse files
committed
minor
1 parent 66af5ed commit 8420c55

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

services/static-webserver/client/source/class/osparc/desktop/ZoomButtons.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
* </pre>
2929
*/
3030

31-
const ZOOM_BUTTON_SIZE = 32;
32-
3331
qx.Class.define("osparc.desktop.ZoomButtons", {
3432
extend: qx.ui.toolbar.ToolBar,
3533

@@ -52,6 +50,10 @@ qx.Class.define("osparc.desktop.ZoomButtons", {
5250
"zoomReset": "qx.event.type.Event"
5351
},
5452

53+
statics: {
54+
ZOOM_BUTTON_SIZE: 32,
55+
},
56+
5557
members: {
5658
__buildLayout: function() {
5759
this.add(this.__getZoomOutButton());
@@ -64,9 +66,9 @@ qx.Class.define("osparc.desktop.ZoomButtons", {
6466
appearance: "form-button-outlined",
6567
padding: [5, 5],
6668
marginLeft: 10,
67-
width: ZOOM_BUTTON_SIZE,
68-
height: ZOOM_BUTTON_SIZE,
69-
maxHeight: ZOOM_BUTTON_SIZE
69+
width: this.self().ZOOM_BUTTON_SIZE,
70+
height: this.self().ZOOM_BUTTON_SIZE,
71+
maxHeight: this.self().ZOOM_BUTTON_SIZE,
7072
});
7173
if (tooltip) {
7274
btn.setToolTipText(tooltip);

services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
* </pre>
3434
*/
3535

36-
const BUTTON_SIZE = 38;
37-
const NODE_INPUTS_WIDTH = 210;
38-
3936
qx.Class.define("osparc.workbench.WorkbenchUI", {
4037
extend: qx.ui.core.Widget,
4138

@@ -56,16 +53,8 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
5653
},
5754

5855
statics: {
59-
getDashedBorderStyle(isRight) {
60-
const side = isRight ? "right" : "left";
61-
const borderStyle = {};
62-
borderStyle["background-image"] = `linear-gradient(to bottom, #3D3D3D 50%, rgba(255, 255, 255, 0) 0%)`;
63-
borderStyle["background-position"] = side;
64-
borderStyle["background-size"] = "5px 50px";
65-
borderStyle["background-repeat"] = "repeat-y";
66-
return borderStyle;
67-
},
68-
56+
BUTTON_SIZE: 38,
57+
NODE_INPUTS_WIDTH: 210,
6958
ZOOM_VALUES: [
7059
0.1,
7160
0.2,
@@ -83,7 +72,17 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
8372
2,
8473
2.5,
8574
3
86-
]
75+
],
76+
77+
getDashedBorderStyle(isRight) {
78+
const side = isRight ? "right" : "left";
79+
const borderStyle = {};
80+
borderStyle["background-image"] = `linear-gradient(to bottom, #3D3D3D 50%, rgba(255, 255, 255, 0) 0%)`;
81+
borderStyle["background-position"] = side;
82+
borderStyle["background-size"] = "5px 50px";
83+
borderStyle["background-repeat"] = "repeat-y";
84+
return borderStyle;
85+
},
8786
},
8887

8988
events: {
@@ -227,8 +226,8 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
227226
__addDeleteItemButton: function() {
228227
const deleteItemButton = this.__deleteItemButton = new qx.ui.form.Button().set({
229228
icon: "@FontAwesome5Solid/trash/18",
230-
width: BUTTON_SIZE,
231-
height: BUTTON_SIZE,
229+
width: this.self().BUTTON_SIZE,
230+
height: this.self().BUTTON_SIZE,
232231
visibility: "excluded"
233232
});
234233
deleteItemButton.addListener("execute", () => {
@@ -271,8 +270,8 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
271270
const label = isInput ? this.tr("INPUTS") : this.tr("OUTPUTS");
272271
const inputOutputNodesLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(5));
273272
inputOutputNodesLayout.set({
274-
width: NODE_INPUTS_WIDTH,
275-
maxWidth: NODE_INPUTS_WIDTH,
273+
width: this.self().NODE_INPUTS_WIDTH,
274+
maxWidth: this.self().NODE_INPUTS_WIDTH,
276275
allowGrowX: false,
277276
padding: [0, 6]
278277
});

0 commit comments

Comments
 (0)