Skip to content

Commit 3cea167

Browse files
committed
more refactoring
1 parent 1e4c4a0 commit 3cea167

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ qx.Class.define("osparc.dashboard.GridButtonBase", {
4343
statics: {
4444
ITEM_WIDTH: 190,
4545
ITEM_HEIGHT: 220,
46-
PADDING: 8,
47-
SPACING_IN: 5,
46+
PADDING: 6,
4847
SPACING: 15,
4948
THUMBNAIL_SIZE: 50,
5049
POS: {
@@ -120,7 +119,6 @@ qx.Class.define("osparc.dashboard.GridButtonBase", {
120119
switch (id) {
121120
case "main-layout": {
122121
const grid = new qx.ui.layout.Grid();
123-
grid.setSpacing(this.self().SPACING_IN);
124122
grid.setRowFlex(this.self().POS.BODY.row, 1);
125123
grid.setColumnFlex(0, 1);
126124

@@ -166,15 +164,18 @@ qx.Class.define("osparc.dashboard.GridButtonBase", {
166164
break;
167165
}
168166
case "body":
169-
control = new qx.ui.container.Composite(new qx.ui.layout.VBox(6));
167+
control = new qx.ui.container.Composite(new qx.ui.layout.VBox(6)).set({
168+
padding: this.self().PADDING,
169+
alignY: "bottom",
170+
});
170171
break;
171172
case "footer": {
172173
const fGrid = new qx.ui.layout.Grid();
173174
fGrid.setSpacing(2);
174175
fGrid.setColumnFlex(this.self().FPOS.MODIFIED.row, 1);
175176
control = new qx.ui.container.Composite().set({
176177
backgroundColor: "background-card-overlay",
177-
padding: this.self().PADDING - 2,
178+
padding: this.self().PADDING,
178179
maxWidth: this.self().ITEM_WIDTH,
179180
maxHeight: this.self().ITEM_HEIGHT
180181
});

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ qx.Class.define("osparc.dashboard.GridButtonItem", {
8888
break;
8989
case "avatar-group": {
9090
const maxWidth = osparc.dashboard.GridButtonBase.ITEM_WIDTH - osparc.dashboard.GridButtonBase.PADDING * 2;
91-
control = new osparc.ui.basic.AvatarGroup(24, "left", maxWidth).set({
92-
paddingLeft: osparc.dashboard.GridButtonBase.PADDING,
93-
});
91+
control = new osparc.ui.basic.AvatarGroup(24, "left", maxWidth);
9492
this.getChildControl("body").addAt(control, this.self().BODY_POS.AVATAR_GROUP, {
9593
flex: 1,
9694
});
@@ -99,8 +97,7 @@ qx.Class.define("osparc.dashboard.GridButtonItem", {
9997
case "tags":
10098
control = new qx.ui.container.Composite(new qx.ui.layout.Flow(4, 4)).set({
10199
anonymous: true,
102-
paddingLeft: osparc.dashboard.GridButtonBase.PADDING,
103-
paddingRight: osparc.dashboard.GridButtonBase.PADDING,
100+
alignY: "bottom",
104101
});
105102
this.getChildControl("body").addAt(control, this.self().BODY_POS.TAGS);
106103
break;

0 commit comments

Comments
 (0)