messageTray: Summary items should be square and have spacing

Each summary icon is 48x48 with a padding of 6px on each side. Thus,
each summary item is 60px wide. Therefore the summary mode should be
60px high instead of 72px.

Changed the tray actor to use a ClutterBinLayout so that it honors the
y-expand property of its children.

https://bugzilla.gnome.org/show_bug.cgi?id=682248
This commit is contained in:
Debarshi Ray 2012-09-01 03:21:51 +02:00
parent 1a7fad129d
commit 69735940ec
2 changed files with 4 additions and 1 deletions

View File

@ -1418,7 +1418,8 @@ StButton.popup-menu-item:insensitive {
#summary-mode { #summary-mode {
padding: 2px 0px 0px 4px; padding: 2px 0px 0px 4px;
height: 72px; height: 60px;
spacing: 10px;
} }
#summary-mode:rtl { #summary-mode:rtl {

View File

@ -1361,6 +1361,7 @@ const MessageTray = new Lang.Class({
})); }));
this.actor = new St.Widget({ name: 'message-tray', this.actor = new St.Widget({ name: 'message-tray',
layout_manager: new Clutter.BinLayout(),
reactive: true, reactive: true,
track_hover: true }); track_hover: true });
this.actor.connect('style-changed', Lang.bind(this, this._onStyleChanged)); this.actor.connect('style-changed', Lang.bind(this, this._onStyleChanged));
@ -1378,6 +1379,7 @@ const MessageTray = new Lang.Class({
this._notificationClickedId = 0; this._notificationClickedId = 0;
this._summaryBin = new St.Bin({ x_align: St.Align.END, this._summaryBin = new St.Bin({ x_align: St.Align.END,
y_expand: true, // this is the Clutter property
reactive: true }); reactive: true });
this._summaryBin.connect('button-release-event', Lang.bind(this, function(actor, event) { this._summaryBin.connect('button-release-event', Lang.bind(this, function(actor, event) {
this._setClickedSummaryItem(null); this._setClickedSummaryItem(null);