Skip to content

Commit 730037d

Browse files
committed
crop value
1 parent 5164d46 commit 730037d

File tree

2 files changed

+26
-17
lines changed

2 files changed

+26
-17
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ qx.Class.define("osparc.workbench.DiskUsageIndicator", {
8282
const indicator = this.getChildControl("disk-indicator")
8383
control = new qx.ui.basic.Label().set({
8484
value: "",
85-
font: "text-13",
85+
font: "text-12",
8686
textColor: "contrasted-text-light",
8787
alignX: "center",
8888
alignY: "middle",

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

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ qx.Class.define("osparc.workbench.NodeUI", {
4040
construct: function(node) {
4141
this.base(arguments);
4242

43-
const grid = new qx.ui.layout.Grid(4, 1);
43+
const grid = new qx.ui.layout.Grid(2, 1);
4444
grid.setColumnFlex(1, 1);
4545

4646
this.set({
@@ -222,10 +222,10 @@ qx.Class.define("osparc.workbench.NodeUI", {
222222
});
223223
break;
224224
case "middle-container":
225-
control = new qx.ui.container.Composite(new qx.ui.layout.HBox(3).set({
225+
control = new qx.ui.container.Composite(new qx.ui.layout.HBox(2).set({
226226
alignY: "middle"
227227
})).set({
228-
padding: [3, 4]
228+
padding: 4
229229
});
230230
this.add(control, {
231231
row: 0,
@@ -245,7 +245,7 @@ qx.Class.define("osparc.workbench.NodeUI", {
245245
const type = osparc.service.Utils.getType(nodeType);
246246
if (type) {
247247
control.set({
248-
icon: type.icon + "14",
248+
icon: type.icon + "13",
249249
toolTipText: type.label
250250
});
251251
} else if (this.getNode().isUnknown()) {
@@ -595,14 +595,11 @@ qx.Class.define("osparc.workbench.NodeUI", {
595595
const width = 120;
596596
this.__setNodeUIWidth(width);
597597

598-
const label = new qx.ui.basic.Label().set({
599-
font: "text-18"
598+
const valueLabel = new qx.ui.basic.Label().set({
599+
paddingLeft: 4,
600+
font: "text-14"
600601
});
601-
const middleContainer = this.getChildControl("middle-container");
602-
middleContainer.add(label);
603-
604-
this.getNode().bind("outputs", label, "value", {
605-
converter: outputs => {
602+
const outputToValue = outputs => {
606603
if ("out_1" in outputs && "value" in outputs["out_1"]) {
607604
const val = outputs["out_1"]["value"];
608605
if (Array.isArray(val)) {
@@ -611,8 +608,18 @@ qx.Class.define("osparc.workbench.NodeUI", {
611608
return String(val);
612609
}
613610
return "";
614-
}
611+
}
612+
this.getNode().bind("outputs", valueLabel, "value", {
613+
converter: outputs => outputToValue(outputs)
614+
});
615+
this.getNode().bind("outputs", valueLabel, "toolTipText", {
616+
converter: outputs => outputToValue(outputs)
615617
});
618+
const middleContainer = this.getChildControl("middle-container");
619+
middleContainer.add(valueLabel, {
620+
flex: 1
621+
});
622+
616623
this.fireEvent("updateNodeDecorator");
617624
},
618625

@@ -642,15 +649,17 @@ qx.Class.define("osparc.workbench.NodeUI", {
642649
},
643650

644651
__turnIntoProbeUI: function() {
645-
const width = 150;
652+
const width = 120;
646653
this.__setNodeUIWidth(width);
647654

648655
const linkLabel = new osparc.ui.basic.LinkLabel().set({
649-
paddingLeft: 5,
650-
font: "text-12"
656+
paddingLeft: 4,
657+
font: "text-14"
651658
});
652659
const middleContainer = this.getChildControl("middle-container");
653-
middleContainer.add(linkLabel);
660+
middleContainer.add(linkLabel, {
661+
flex: 1
662+
});
654663

655664
this.getNode().getPropsForm().addListener("linkFieldModified", () => this.__setProbeValue(linkLabel), this);
656665
this.__setProbeValue(linkLabel);

0 commit comments

Comments
 (0)