[placesDisplay] Replace remaining Big.Boxes with St.Widgets

While most of the code already is CSS stylable, the two-colum setup
is still done using Big.Box with hard coded spacings. Port those
remaining parts to St.Widget, so that all spacings can be adjusted
by the theme.

https://bugzilla.gnome.org/show_bug.cgi?id=610385
This commit is contained in:
Florian Müllner 2010-02-23 14:33:12 +01:00
parent ca2a11c57d
commit 095e15fc11
2 changed files with 15 additions and 15 deletions

View File

@ -518,6 +518,10 @@ StTooltip {
/* Places */
.places-section {
spacing-columns: 4px;
}
.places-item-box {
spacing: 4px;
}

View File

@ -1,6 +1,5 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Big = imports.gi.Big;
const Clutter = imports.gi.Clutter;
const Pango = imports.gi.Pango;
const GLib = imports.gi.GLib;
@ -516,14 +515,9 @@ DashPlaceDisplay.prototype = {
// look better in that there would be an even number of items left+right,
// but it seems like we want some sort of differentiation between actions
// like "Connect to server..." and regular folders
this.actor = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL,
spacing: 4 });
this._leftBox = new Big.Box({ orientation: Big.BoxOrientation.VERTICAL });
this.actor.append(this._leftBox, Big.BoxPackFlags.EXPAND);
this._rightBox = new Big.Box({ orientation: Big.BoxOrientation.VERTICAL });
this.actor.append(this._rightBox, Big.BoxPackFlags.EXPAND);
this.actor = new St.Table({ style_class: 'places-section',
homogeneous: true });
// Subdivide left into actions and devices
this._actionsBox = new St.BoxLayout({ style_class: 'places-actions',
vertical: true });
@ -534,10 +528,12 @@ DashPlaceDisplay.prototype = {
this._dirsBox = new St.BoxLayout({ style_class: 'places-actions',
vertical: true });
this._leftBox.append(this._actionsBox, Big.BoxPackFlags.NONE);
this._leftBox.append(this._devBox, Big.BoxPackFlags.NONE);
// Subdivide left into actions and devices
this.actor.add(this._actionsBox, { row: 0, col: 0 });
this.actor.add(this._devBox, { row: 1, col: 0 });
this._rightBox.append(this._dirsBox, Big.BoxPackFlags.NONE);
// Bookmarks span the entire right
this.actor.add(this._dirsBox, { row: 0, col: 1, row_span: 2 });
Main.placesManager.connect('defaults-updated', Lang.bind(this, this._updateDefaults));
Main.placesManager.connect('bookmarks-updated', Lang.bind(this, this._updateBookmarks));