[gnome-shell] [placeDisplay] Port more to CSS, lower spacing
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] [placeDisplay] Port more to CSS, lower spacing
- Date: Thu, 12 Nov 2009 16:42:10 +0000 (UTC)
commit 06cf6c51f312316a2d6c229c86b36aafd541fb19
Author: Colin Walters <walters verbum org>
Date: Tue Nov 10 14:31:59 2009 -0500
[placeDisplay] Port more to CSS, lower spacing
Newer mockups have smaller spacing here.
https://bugzilla.gnome.org/show_bug.cgi?id=600734
data/theme/gnome-shell.css | 8 ++++++++
js/ui/placeDisplay.js | 33 +++++++++++++--------------------
2 files changed, 21 insertions(+), 20 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index a8bf9ba..f09b81f 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -219,6 +219,14 @@ StTooltip {
/* Places */
+.places-actions {
+ spacing: 4px;
+}
+
+#placesDevices {
+ padding-top: 4px;
+}
+
/* LookingGlass */
#LookingGlassDialog
diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js
index 3746c96..aa5003e 100644
--- a/js/ui/placeDisplay.js
+++ b/js/ui/placeDisplay.js
@@ -20,7 +20,6 @@ const GenericDisplay = imports.ui.genericDisplay;
const NAUTILUS_PREFS_DIR = '/apps/nautilus/preferences';
const DESKTOP_IS_HOME_KEY = NAUTILUS_PREFS_DIR + '/desktop_is_home_dir';
-const PLACES_VSPACING = 8;
const PLACES_ICON_SIZE = 16;
/**
@@ -371,15 +370,15 @@ DashPlaceDisplay.prototype = {
this.actor.append(this._rightBox, Big.BoxPackFlags.EXPAND);
// Subdivide left into actions and devices
- this._actionsBox = new Big.Box({ orientation: Big.BoxOrientation.VERTICAL,
- spacing: PLACES_VSPACING });
+ this._actionsBox = new St.BoxLayout({ style_class: 'places-actions',
+ vertical: true });
- this._devBox = new Big.Box({ orientation: Big.BoxOrientation.VERTICAL,
- spacing: PLACES_VSPACING,
- padding_top: 6 });
+ this._devBox = new St.BoxLayout({ style_class: 'places-actions',
+ name: 'placesDevices',
+ vertical: true });
- this._dirsBox = new Big.Box({ orientation: Big.BoxOrientation.VERTICAL,
- spacing: PLACES_VSPACING });
+ 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);
@@ -396,33 +395,27 @@ DashPlaceDisplay.prototype = {
},
_updateDefaults: function() {
- this._actionsBox.get_children().forEach(function (child) {
- child.destroy();
- });
+ this._actionsBox.destroy_children();
let places = Main.placesManager.getDefaultPlaces();
for (let i = 0; i < places.length; i++)
- this._actionsBox.append(new DashPlaceDisplayItem(places[i]).actor, Big.BoxPackFlags.NONE);
+ this._actionsBox.add(new DashPlaceDisplayItem(places[i]).actor);
},
_updateMounts: function() {
- this._devBox.get_children().forEach(function (child) {
- child.destroy();
- });
+ this._devBox.destroy_children();
let places = Main.placesManager.getMounts();
for (let i = 0; i < places.length; i++)
- this._devBox.append(new DashPlaceDisplayItem(places[i]).actor, Big.BoxPackFlags.NONE);
+ this._devBox.add(new DashPlaceDisplayItem(places[i]).actor);
},
_updateBookmarks: function() {
- this._dirsBox.get_children().forEach(function (child) {
- child.destroy();
- });
+ this._dirsBox.destroy_children();
let places = Main.placesManager.getBookmarks();
for (let i = 0; i < places.length; i ++)
- this._dirsBox.append(new DashPlaceDisplayItem(places[i]).actor, Big.BoxPackFlags.NONE);
+ this._dirsBox.add(new DashPlaceDisplayItem(places[i]).actor);
}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]