Skip to content

Commit 1dda832

Browse files
odeimaizmrnicegyu11
authored andcommitted
🎨 [Frontend] ViP Store: Add splitpane to Store (ITISFoundation#7254)
1 parent ff7f618 commit 1dda832

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
lines changed

‎services/static-webserver/client/source/class/osparc/navigation/UserMenu.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ qx.Class.define("osparc.navigation.UserMenu", {
8686
this.add(control);
8787
break;
8888
case "market":
89-
control = new qx.ui.menu.Button(this.tr("Model Market"));
89+
control = new qx.ui.menu.Button(this.tr("Model Store"));
9090
control.addListener("execute", () => osparc.vipMarket.MarketWindow.openWindow());
9191
this.add(control);
9292
break;

‎services/static-webserver/client/source/class/osparc/vipMarket/MarketWindow.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ qx.Class.define("osparc.vipMarket.MarketWindow", {
1919
extend: osparc.ui.window.TabbedWindow,
2020

2121
construct: function(nodeId, category) {
22-
this.base(arguments, "store", this.tr("Model Market"));
22+
this.base(arguments, "store", this.tr("Model Store"));
2323

2424
osparc.utils.Utils.setIdToWidget(this, "storeWindow");
2525

26-
const width = Math.min(1100, window.innerWidth); // since we go over the supported minimum, take the min
27-
const height = 700;
26+
const width = Math.min(1200, window.innerWidth); // since we go over the supported minimum, take the min
27+
const height = Math.min(700, window.innerHeight); // since we go over the supported minimum, take the min
2828
this.set({
2929
width,
3030
height

‎services/static-webserver/client/source/class/osparc/vipMarket/VipMarket.js‎

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,22 @@
1616
************************************************************************ */
1717

1818
qx.Class.define("osparc.vipMarket.VipMarket", {
19-
extend: qx.ui.core.Widget,
19+
extend: qx.ui.splitpane.Pane,
2020

2121
construct: function(licensedItems) {
22-
this.base(arguments);
23-
24-
this._setLayout(new qx.ui.layout.HBox(10));
22+
this.base(arguments, "horizontal");
23+
24+
this.setOffset(5);
25+
this.getChildControl("splitter").set({
26+
width: 1,
27+
backgroundColor: "text",
28+
opacity: 0.3,
29+
});
30+
this.getChildControl("slider").set({
31+
width: 2,
32+
backgroundColor: "text",
33+
opacity: 1,
34+
});
2535

2636
this.__buildLayout();
2737

@@ -60,16 +70,16 @@ qx.Class.define("osparc.vipMarket.VipMarket", {
6070
case "left-side":
6171
control = new qx.ui.container.Composite(new qx.ui.layout.VBox(10)).set({
6272
alignY: "middle",
73+
paddingRight: 5,
6374
});
64-
this._add(control);
75+
this.add(control, 0); // flex: 0
6576
break;
6677
case "right-side":
6778
control = new qx.ui.container.Composite(new qx.ui.layout.VBox(10)).set({
6879
alignY: "middle",
80+
paddingLeft: 5,
6981
});
70-
this._add(control, {
71-
flex: 1
72-
});
82+
this.add(control, 1); // flex: 1
7383
break;
7484
case "toolbar-layout":
7585
control = new qx.ui.container.Composite(new qx.ui.layout.HBox(10)).set({
@@ -88,10 +98,12 @@ qx.Class.define("osparc.vipMarket.VipMarket", {
8898
control = new osparc.filter.TextFilter("text", "vipModels").set({
8999
alignY: "middle",
90100
allowGrowY: false,
91-
minWidth: 160,
101+
allowGrowX: true,
102+
marginRight: 5,
92103
});
93104
control.getChildControl("textfield").set({
94105
backgroundColor: "transparent",
106+
allowGrowX: true,
95107
});
96108
this.addListener("appear", () => control.getChildControl("textfield").focus());
97109
this.getChildControl("toolbar-layout").add(control, {
@@ -102,8 +114,7 @@ qx.Class.define("osparc.vipMarket.VipMarket", {
102114
control = new qx.ui.form.List().set({
103115
decorator: "no-border",
104116
spacing: 5,
105-
minWidth: 250,
106-
maxWidth: 250,
117+
width: 250,
107118
backgroundColor: "transparent",
108119
});
109120
this.getChildControl("left-side").add(control, {

0 commit comments

Comments
 (0)