Skip to content

Commit 383096b

Browse files
committed
notifications look like other menus
1 parent 7dc40ff commit 383096b

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

services/static-webserver/client/source/class/osparc/notification/NotificationUI.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ qx.Class.define("osparc.notification.NotificationUI", {
2222
this.base(arguments);
2323

2424
this.set({
25+
margin: 4,
2526
maxWidth: this.self().MAX_WIDTH,
2627
padding: this.self().PADDING,
2728
cursor: "pointer"
@@ -216,9 +217,14 @@ qx.Class.define("osparc.notification.NotificationUI", {
216217
}
217218
});
218219

219-
notification.bind("read", this, "backgroundColor", {
220-
converter: read => read ? "background-main-3" : "background-main-4"
221-
});
220+
const highlight = mouseOn => {
221+
this.set({
222+
backgroundColor: mouseOn ? "strong-main" : "transparent"
223+
})
224+
};
225+
this.addListener("mouseover", () => highlight(true));
226+
this.addListener("mouseout", () => highlight(false));
227+
highlight(false);
222228
},
223229

224230
__notificationTapped: function() {

services/static-webserver/client/source/class/osparc/notification/NotificationsContainer.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ qx.Class.define("osparc.notification.NotificationsContainer", {
2727
zIndex: osparc.utils.Utils.FLOATING_Z_INDEX,
2828
maxWidth: osparc.notification.NotificationUI.MAX_WIDTH,
2929
maxHeight: 250,
30-
backgroundColor: "background-main-3",
30+
backgroundColor: "background-main",
3131
decorator: "rounded",
3232
});
33+
let color = qx.theme.manager.Color.getInstance().resolve("text");
34+
color = qx.util.ColorUtil.stringToRgb(color);
35+
color.push(0.3); // add transparency
36+
color = qx.util.ColorUtil.rgbToRgbString(color);
37+
osparc.utils.Utils.addBorder(this, 1, color);
3338
osparc.utils.Utils.setIdToWidget(this, "notificationsContainer");
3439

3540
const root = qx.core.Init.getApplication().getRoot();

0 commit comments

Comments
 (0)