Skip to content

Commit 5851a8a

Browse files
authored
More visible Maximize button (#2232)
* allow sending null parent * iframe doesn't take the whole space
1 parent 5d507ee commit 5851a8a

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

services/web/client/source/class/osparc/component/widget/PersistentIframe.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
2929
},
3030

3131
statics: {
32-
getIcon: function(maximize) {
32+
getZoomIcon: function(maximize) {
3333
const iconURL = maximize ? "window-restore" : "window-maximize";
3434
return osparc.theme.common.Image.URLS[iconURL]+"/20";
3535
},
@@ -52,10 +52,10 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
5252
/**
5353
* Show Restore/Maximize
5454
*/
55-
showActionButton: {
55+
showZoomButton: {
5656
check: "Boolean",
5757
init: true,
58-
apply: "__applyShowActionButton"
58+
apply: "__applyShowZoomButton"
5959
},
6060

6161
/**
@@ -81,7 +81,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
8181
__iframe: null,
8282
__syncScheduled: null,
8383
__restartButton: null,
84-
__actionButton: null,
84+
__zoomButton: null,
8585

8686
// override
8787
_createContentElement : function() {
@@ -101,7 +101,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
101101
const restartButton = this.__restartButton = new qx.ui.form.Button(null, "@FontAwesome5Solid/redo-alt/14").set({
102102
zIndex: 20,
103103
paddingLeft: 8,
104-
paddingRight: 8,
104+
paddingRight: 4,
105105
paddingTop: 6,
106106
paddingBottom: 6,
107107
backgroundColor: "transparent",
@@ -114,20 +114,20 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
114114
appRoot.add(restartButton, {
115115
top:-10000
116116
});
117-
let actionButton = this.__actionButton = new qx.ui.form.Button(null).set({
118-
icon: this.self().getIcon(false),
117+
let zoomButton = this.__zoomButton = new qx.ui.form.Button(null).set({
118+
icon: this.self().getZoomIcon(false),
119119
zIndex: 20,
120120
backgroundColor: "transparent",
121121
decorator: null
122122
});
123-
osparc.utils.Utils.setIdToWidget(actionButton, this.self().getMaximizeWidgetId(false));
124-
appRoot.add(actionButton, {
123+
osparc.utils.Utils.setIdToWidget(zoomButton, this.self().getMaximizeWidgetId(false));
124+
appRoot.add(zoomButton, {
125125
top:-10000
126126
});
127-
actionButton.addListener("execute", e => {
127+
zoomButton.addListener("execute", e => {
128128
this.maximizeIFrame(!this.hasState("maximized"));
129129
}, this);
130-
appRoot.add(actionButton);
130+
appRoot.add(zoomButton);
131131
standin.addListener("appear", e => {
132132
this.__syncIframePos();
133133
});
@@ -138,7 +138,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
138138
restartButton.setLayoutProperties({
139139
top: -10000
140140
});
141-
actionButton.setLayoutProperties({
141+
zoomButton.setLayoutProperties({
142142
top: -10000
143143
});
144144
});
@@ -171,14 +171,14 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
171171
this.fireEvent("restore");
172172
this.removeState("maximized");
173173
}
174-
const actionButton = this.__actionButton;
175-
actionButton.setIcon(this.self().getIcon(maximize));
174+
const actionButton = this.__zoomButton;
175+
actionButton.setIcon(this.self().getZoomIcon(maximize));
176176
osparc.utils.Utils.setIdToWidget(actionButton, this.self().getMaximizeWidgetId(maximize));
177177
qx.event.message.Bus.getInstance().dispatchByName("maximizeIframe", this.hasState("maximized"));
178178
},
179179

180-
__applyShowActionButton: function(show) {
181-
show ? this.__actionButton.show() : this.__actionButton.exclude();
180+
__applyShowZoomButton: function(show) {
181+
show ? this.__zoomButton.show() : this.__zoomButton.exclude();
182182
},
183183

184184
__applyShowRestartButton: function(show) {
@@ -200,7 +200,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
200200
let divPos = qx.bom.element.Location.get(domElement, "scroll");
201201
let divSize = qx.bom.element.Dimension.getSize(domElement);
202202
this.__iframe.setLayoutProperties({
203-
top: divPos.top - iframeParentPos.top,
203+
top: divPos.top - iframeParentPos.top + 25,
204204
left: (divPos.left - iframeParentPos.left)
205205
});
206206
this.__iframe.set({
@@ -211,7 +211,7 @@ qx.Class.define("osparc.component.widget.PersistentIframe", {
211211
top: (divPos.top - iframeParentPos.top),
212212
right: (iframeParentPos.right - iframeParentPos.left - divPos.right) + 35
213213
});
214-
this.__actionButton.setLayoutProperties({
214+
this.__zoomButton.setLayoutProperties({
215215
top: (divPos.top - iframeParentPos.top),
216216
right: (iframeParentPos.right - iframeParentPos.left - divPos.right)
217217
});

services/web/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
724724
const processinglabel = this.tr("Processing study");
725725
importingStudyCard.getChildControl("state-label").setValue(processinglabel);
726726
importTask.setSubtitle(processinglabel);
727-
importingStudyCard.getProgressBar().exclude();
727+
importingStudyCard.getChildControl("progress-bar").exclude();
728728
}
729729
} else {
730730
console.log("Unable to compute progress information since the total size is unknown");

services/web/client/source/class/osparc/data/model/Node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ qx.Class.define("osparc.data.model.Node", {
11761176
// remove null entries from the payload
11771177
let filteredNodeEntry = {};
11781178
for (const key in nodeEntry) {
1179-
if (nodeEntry[key] !== null) {
1179+
if (nodeEntry[key] !== null || key === "parent") {
11801180
filteredNodeEntry[key] = nodeEntry[key];
11811181
}
11821182
}

services/web/client/source/class/osparc/ui/message/Loading.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ qx.Class.define("osparc.ui.message.Loading", {
115115
if (showMaximize) {
116116
const maximize = false;
117117
const maxButton = this.__maxButton = new qx.ui.form.Button(null).set({
118-
icon: osparc.component.widget.PersistentIframe.getIcon(maximize),
118+
icon: osparc.component.widget.PersistentIframe.getZoomIcon(maximize),
119119
decorator: null
120120
});
121121
osparc.utils.Utils.setIdToWidget(maxButton, osparc.component.widget.PersistentIframe.getMaximizeWidgetId(maximize));
@@ -160,7 +160,7 @@ qx.Class.define("osparc.ui.message.Loading", {
160160
this.removeState("maximized");
161161
}
162162
const maxButton = this.__maxButton;
163-
maxButton.setIcon(osparc.component.widget.PersistentIframe.getIcon(maximize));
163+
maxButton.setIcon(osparc.component.widget.PersistentIframe.getZoomIcon(maximize));
164164
osparc.utils.Utils.setIdToWidget(maxButton, osparc.component.widget.PersistentIframe.getMaximizeWidgetId(maximize));
165165
qx.event.message.Bus.getInstance().dispatchByName("maximizeIframe", this.hasState("maximized"));
166166
}

0 commit comments

Comments
 (0)