messageTray: restyle the message tray
The patch implements the new visual style for the message tray, that is now larger and has textured background. The icons are also larger. https://bugzilla.gnome.org/show_bug.cgi?id=677213
This commit is contained in:
parent
0ac4787f1a
commit
6f8e7f07f3
@ -36,6 +36,7 @@ dist_theme_DATA = \
|
|||||||
theme/filter-selected-rtl.svg \
|
theme/filter-selected-rtl.svg \
|
||||||
theme/gnome-shell.css \
|
theme/gnome-shell.css \
|
||||||
theme/logged-in-indicator.svg \
|
theme/logged-in-indicator.svg \
|
||||||
|
theme/message-tray-background.png \
|
||||||
theme/noise-texture.png \
|
theme/noise-texture.png \
|
||||||
theme/panel-button-border.svg \
|
theme/panel-button-border.svg \
|
||||||
theme/panel-button-highlight-narrow.svg \
|
theme/panel-button-highlight-narrow.svg \
|
||||||
|
@ -1172,10 +1172,9 @@ StButton.popup-menu-item:insensitive {
|
|||||||
|
|
||||||
/* Message Tray */
|
/* Message Tray */
|
||||||
#message-tray {
|
#message-tray {
|
||||||
background-gradient-direction: vertical;
|
background: #2e3436 url(message-tray-background.png);
|
||||||
background-gradient-start: rgba(0,0,0,0.01);
|
background-repeat: repeat;
|
||||||
background-gradient-end: rgba(0,0,0,0.82);
|
height: 72px;
|
||||||
height: 36px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification {
|
.notification {
|
||||||
@ -1387,7 +1386,7 @@ StButton.popup-menu-item:insensitive {
|
|||||||
|
|
||||||
#summary-mode {
|
#summary-mode {
|
||||||
padding: 2px 0px 0px 4px;
|
padding: 2px 0px 0px 4px;
|
||||||
height: 36px;
|
height: 72px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#summary-mode:rtl {
|
#summary-mode:rtl {
|
||||||
|
BIN
data/theme/message-tray-background.png
Normal file
BIN
data/theme/message-tray-background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
@ -31,6 +31,7 @@ const LONGER_SUMMARY_TIMEOUT = 4;
|
|||||||
const HIDE_TIMEOUT = 0.2;
|
const HIDE_TIMEOUT = 0.2;
|
||||||
const LONGER_HIDE_TIMEOUT = 0.6;
|
const LONGER_HIDE_TIMEOUT = 0.6;
|
||||||
|
|
||||||
|
const NOTIFICATION_ICON_SIZE = 24;
|
||||||
|
|
||||||
// We delay hiding of the tray if the mouse is within MOUSE_LEFT_ACTOR_THRESHOLD
|
// We delay hiding of the tray if the mouse is within MOUSE_LEFT_ACTOR_THRESHOLD
|
||||||
// range from the point where it left the tray.
|
// range from the point where it left the tray.
|
||||||
@ -542,7 +543,7 @@ const Notification = new Lang.Class({
|
|||||||
this._table.remove_style_class_name('multi-line-notification');
|
this._table.remove_style_class_name('multi-line-notification');
|
||||||
|
|
||||||
if (!this._icon) {
|
if (!this._icon) {
|
||||||
this._icon = params.icon || this.source.createIcon(this.source.ICON_SIZE);
|
this._icon = params.icon || this.source.createIcon(NOTIFICATION_ICON_SIZE);
|
||||||
this._table.add(this._icon, { row: 0,
|
this._table.add(this._icon, { row: 0,
|
||||||
col: 0,
|
col: 0,
|
||||||
x_expand: false,
|
x_expand: false,
|
||||||
@ -1132,7 +1133,7 @@ const SourceActor = new Lang.Class({
|
|||||||
const Source = new Lang.Class({
|
const Source = new Lang.Class({
|
||||||
Name: 'MessageTraySource',
|
Name: 'MessageTraySource',
|
||||||
|
|
||||||
ICON_SIZE: 24,
|
SOURCE_ICON_SIZE: 48,
|
||||||
|
|
||||||
_init: function(title, iconName, iconType) {
|
_init: function(title, iconName, iconType) {
|
||||||
this.title = title;
|
this.title = title;
|
||||||
@ -1191,8 +1192,7 @@ const Source = new Lang.Class({
|
|||||||
if (this._mainIcon)
|
if (this._mainIcon)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._mainIcon = new SourceActor(this, this.ICON_SIZE);
|
this._mainIcon = new SourceActor(this, this.SOURCE_ICON_SIZE);
|
||||||
return;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Unlike createIcon, this always returns the same actor;
|
// Unlike createIcon, this always returns the same actor;
|
||||||
@ -2213,7 +2213,7 @@ const MessageTray = new Lang.Class({
|
|||||||
// notifications that might have been in the process of hiding get full opacity.
|
// notifications that might have been in the process of hiding get full opacity.
|
||||||
//
|
//
|
||||||
// We tween any notification showing in the banner mode to banner height
|
// We tween any notification showing in the banner mode to banner height
|
||||||
// (this._notificationBin.y = -this.actor.height).
|
// (this._notificationBin.y = -this._notificationBin.height).
|
||||||
// This ensures that both new notifications and notifications in the banner mode that might
|
// This ensures that both new notifications and notifications in the banner mode that might
|
||||||
// have been in the process of hiding are shown with the banner height.
|
// have been in the process of hiding are shown with the banner height.
|
||||||
//
|
//
|
||||||
@ -2230,7 +2230,7 @@ const MessageTray = new Lang.Class({
|
|||||||
onCompleteScope: this
|
onCompleteScope: this
|
||||||
};
|
};
|
||||||
if (!this._notification.expanded)
|
if (!this._notification.expanded)
|
||||||
tweenParams.y = - this.actor.height;
|
tweenParams.y = -this._notificationBin.height;
|
||||||
|
|
||||||
this._tween(this._notificationBin, '_notificationState', State.SHOWN, tweenParams);
|
this._tween(this._notificationBin, '_notificationState', State.SHOWN, tweenParams);
|
||||||
},
|
},
|
||||||
|
@ -357,7 +357,7 @@ const NotificationDaemon = new Lang.Class({
|
|||||||
let gicon = this._iconForNotificationData(icon, hints);
|
let gicon = this._iconForNotificationData(icon, hints);
|
||||||
let iconActor = new St.Icon({ gicon: gicon,
|
let iconActor = new St.Icon({ gicon: gicon,
|
||||||
icon_type: St.IconType.FULLCOLOR,
|
icon_type: St.IconType.FULLCOLOR,
|
||||||
icon_size: source.ICON_SIZE });
|
icon_size: MessageTray.NOTIFICATION_ICON_SIZE });
|
||||||
|
|
||||||
if (notification == null) {
|
if (notification == null) {
|
||||||
notification = new MessageTray.Notification(source, summary, body,
|
notification = new MessageTray.Notification(source, summary, body,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user