Skip to content

Commit 0e6cd45

Browse files
committed
3 buttons and aesthetics
1 parent 1d9f69c commit 0e6cd45

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

services/static-webserver/client/source/class/osparc/dashboard/SearchBarFilter.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,10 @@ qx.Class.define("osparc.dashboard.SearchBarFilter", {
331331
searchBarFilterProjects.setLayoutProperties({
332332
left: bounds.left,
333333
top: bounds.top,
334-
width: bounds.width,
335334
});
335+
searchBarFilterProjects.set({
336+
width: bounds.width,
337+
})
336338
},
337339

338340
__addChip: function(type, id, label) {

services/static-webserver/client/source/class/osparc/dashboard/SearchBarFilterProjects.js

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,14 @@ qx.Class.define("osparc.dashboard.SearchBarFilterProjects", {
4949
},
5050

5151
statics: {
52-
createToolbarRadioButton: function(label, icon, toolTipText, pos) {
52+
createToolbarRadioButton: function(label, icon, toolTipText = null, pos = null) {
5353
const rButton = new qx.ui.toolbar.RadioButton().set({
5454
label,
5555
icon,
5656
toolTipText,
57-
padding: 5,
58-
paddingLeft: 8,
59-
paddingRight: 8,
60-
margin: 0
57+
padding: 8,
58+
gap: 8,
59+
margin: 0,
6160
});
6261
rButton.getContentElement().setStyles({
6362
"border-radius": "0px"
@@ -91,13 +90,31 @@ qx.Class.define("osparc.dashboard.SearchBarFilterProjects", {
9190
case "my-projects-button":
9291
control = this.self().createToolbarRadioButton(
9392
this.tr("My Projects"),
94-
"@FontAwesome5Solid/file/20",
93+
"@FontAwesome5Solid/file/14",
9594
null,
9695
"left",
9796
);
9897
this.__radioGroup.add(control);
9998
this.getChildControl("context-buttons").add(control);
10099
break;
100+
case "templates-button":
101+
control = this.self().createToolbarRadioButton(
102+
this.tr("Templates"),
103+
"@FontAwesome5Solid/copy/14",
104+
);
105+
this.__radioGroup.add(control);
106+
this.getChildControl("context-buttons").add(control);
107+
break;
108+
case "public-projects-button":
109+
control = this.self().createToolbarRadioButton(
110+
this.tr("My Projects"),
111+
"@FontAwesome5Solid/globe/14",
112+
null,
113+
"right",
114+
);
115+
this.__radioGroup.add(control);
116+
this.getChildControl("context-buttons").add(control);
117+
break;
101118
case "search-bar":
102119
control = new osparc.dashboard.SearchBarFilter(this.__resourceType);
103120
this._add(control);
@@ -108,6 +125,8 @@ qx.Class.define("osparc.dashboard.SearchBarFilterProjects", {
108125

109126
__buildLayout: function() {
110127
this.getChildControl("my-projects-button");
128+
this.getChildControl("templates-button");
129+
this.getChildControl("public-projects-button");
111130
this.getChildControl("search-bar");
112131
},
113132

0 commit comments

Comments
 (0)