[gnome-shell] [placesDisplay] Replace remaining Big.Boxes with St.Widgets
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [placesDisplay] Replace remaining Big.Boxes with St.Widgets
- Date: Sat, 27 Mar 2010 18:34:57 +0000 (UTC)
commit 095e15fc1133969e789ed8091555b362bd1dfea9
Author: Florian Müllner <fmuellner src gnome org>
Date: Tue Feb 23 14:33:12 2010 +0100
[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
data/theme/gnome-shell.css | 4 ++++
js/ui/placeDisplay.js | 26 +++++++++++---------------
2 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index bad3292..703c6d1 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -518,6 +518,10 @@ StTooltip {
/* Places */
+.places-section {
+ spacing-columns: 4px;
+}
+
.places-item-box {
spacing: 4px;
}
diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js
index 50879cf..9c2a58b 100644
--- a/js/ui/placeDisplay.js
+++ b/js/ui/placeDisplay.js
@@ -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,28 +515,25 @@ 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 });
+ vertical: true });
this._devBox = new St.BoxLayout({ style_class: 'places-actions',
- name: 'placesDevices',
- vertical: true });
+ name: 'placesDevices',
+ vertical: true });
this._dirsBox = new St.BoxLayout({ style_class: 'places-actions',
- vertical: true });
+ 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]