unlockDialog: Adjust notification style
I think I can flip the development table and become a designer now -- what else is needed beyond figuring out spacing anyway?!
This commit is contained in:
parent
d1f61e884d
commit
64aaa46333
@ -2071,19 +2071,19 @@ $_screenshield_shadow: 0px 0px 6px rgba(0, 0, 0, 0.726);
|
|||||||
|
|
||||||
.screen-shield-clock {
|
.screen-shield-clock {
|
||||||
color: white;
|
color: white;
|
||||||
font-weight: 300;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-bottom: 2.5em;
|
padding-bottom: 2.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-shield-clock-time {
|
.screen-shield-clock-time {
|
||||||
font-size: 72pt;
|
font-size: 64pt;
|
||||||
|
font-weight: 200;
|
||||||
padding-bottom: 24px;
|
padding-bottom: 24px;
|
||||||
font-feature-settings: "tnum";
|
font-feature-settings: "tnum";
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-shield-clock-date {
|
.screen-shield-clock-date {
|
||||||
font-size: 24pt;
|
font-size: 16pt;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2091,6 +2091,7 @@ $_screenshield_shadow: 0px 0px 6px rgba(0, 0, 0, 0.726);
|
|||||||
spacing: 6px;
|
spacing: 6px;
|
||||||
width: 30em;
|
width: 30em;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
padding: 24px 0;
|
||||||
max-height: 500px;
|
max-height: 500px;
|
||||||
.summary-notification-stack-scrollview {
|
.summary-notification-stack-scrollview {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
@ -2099,7 +2100,7 @@ $_screenshield_shadow: 0px 0px 6px rgba(0, 0, 0, 0.726);
|
|||||||
|
|
||||||
.notification,
|
.notification,
|
||||||
.screen-shield-notification-source {
|
.screen-shield-notification-source {
|
||||||
padding: 12px 6px;
|
padding: 12px;
|
||||||
border: 1px solid $osd_outer_borders_color;
|
border: 1px solid $osd_outer_borders_color;
|
||||||
background-color: transparentize($osd_bg_color,0.5);
|
background-color: transparentize($osd_bg_color,0.5);
|
||||||
color: $osd_fg_color;
|
color: $osd_fg_color;
|
||||||
|
@ -14,7 +14,7 @@ const AuthPrompt = imports.gdm.authPrompt;
|
|||||||
// The timeout before going back automatically to the lock screen (in seconds)
|
// The timeout before going back automatically to the lock screen (in seconds)
|
||||||
const IDLE_TIMEOUT = 2 * 60;
|
const IDLE_TIMEOUT = 2 * 60;
|
||||||
|
|
||||||
var SUMMARY_ICON_SIZE = 48;
|
var SUMMARY_ICON_SIZE = 24;
|
||||||
|
|
||||||
var Clock = class {
|
var Clock = class {
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -95,28 +95,28 @@ var NotificationsBox = class {
|
|||||||
this.actor.visible = this._notificationBox.visible;
|
this.actor.visible = this._notificationBox.visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
_makeNotificationCountText(count, isChat) {
|
|
||||||
if (isChat)
|
|
||||||
return ngettext("%d new message", "%d new messages", count).format(count);
|
|
||||||
else
|
|
||||||
return ngettext("%d new notification", "%d new notifications", count).format(count);
|
|
||||||
}
|
|
||||||
|
|
||||||
_makeNotificationSource(source, box) {
|
_makeNotificationSource(source, box) {
|
||||||
let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
|
let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
|
||||||
box.add(sourceActor, { y_fill: true });
|
box.add(sourceActor, { y_fill: true });
|
||||||
|
|
||||||
let textBox = new St.BoxLayout({ vertical: true });
|
let title = new St.Label({
|
||||||
box.add(textBox, { y_fill: false, y_align: St.Align.START });
|
text: source.title,
|
||||||
|
style_class: 'screen-shield-notification-label',
|
||||||
let title = new St.Label({ text: source.title,
|
x_expand: true,
|
||||||
style_class: 'screen-shield-notification-label' });
|
y_align: Clutter.ActorAlign.START,
|
||||||
textBox.add(title);
|
y_expand: true,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
|
});
|
||||||
|
box.add_child(title);
|
||||||
|
|
||||||
let count = source.unseenCount;
|
let count = source.unseenCount;
|
||||||
let countLabel = new St.Label({ text: this._makeNotificationCountText(count, source.isChat),
|
let countLabel = new St.Label({
|
||||||
style_class: 'screen-shield-notification-count-text' });
|
text: '%d'.format(count),
|
||||||
textBox.add(countLabel);
|
style_class: 'screen-shield-notification-count-text',
|
||||||
|
y_expand: true,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
|
});
|
||||||
|
box.add_child(countLabel);
|
||||||
|
|
||||||
box.visible = count != 0;
|
box.visible = count != 0;
|
||||||
return [title, countLabel];
|
return [title, countLabel];
|
||||||
@ -258,7 +258,7 @@ var NotificationsBox = class {
|
|||||||
this._showSource(source, obj, obj.sourceBox);
|
this._showSource(source, obj, obj.sourceBox);
|
||||||
} else {
|
} else {
|
||||||
let count = source.unseenCount;
|
let count = source.unseenCount;
|
||||||
obj.countLabel.text = this._makeNotificationCountText(count, source.isChat);
|
obj.countLabel.text = '%d'.format(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.sourceBox.visible = obj.visible && (source.unseenCount > 0);
|
obj.sourceBox.visible = obj.visible && (source.unseenCount > 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user