diff options
author | James Westman <james@flyingpimonster.net> | 2021-01-14 14:31:10 -0600 |
---|---|---|
committer | Marcus Lundblad <ml@update.uu.se> | 2021-02-09 20:48:40 +0000 |
commit | 7efd020875461ed5939216c850f6c3b8d27aefa1 (patch) | |
tree | 16a53e1d41f67cbe605a8a178c95e465145223fb /src/placeView.js | |
parent | 6132b3560532a500ab0efcd3102ca2e6aaff2485 (diff) | |
download | gnome-maps-7efd020875461ed5939216c850f6c3b8d27aefa1.tar.gz |
placeBar: Show current location details inline
The place dialog for Current Location didn't look very good--it was mostly
empty, and the Share button looked like it belonged in the headerbar. Fixed
by showing those details in the place bar itself, under the title row.
Diffstat (limited to 'src/placeView.js')
-rw-r--r-- | src/placeView.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/placeView.js b/src/placeView.js index e5808fc3..f3287d5a 100644 --- a/src/placeView.js +++ b/src/placeView.js @@ -60,6 +60,11 @@ var PlaceView = GObject.registerClass({ let mapView = params.mapView; delete params.mapView; + /* This mode is used in PlaceBar for inline current location details. + It hides the title box and decreases the start margin on the rows. */ + this._inlineMode = !!params.inlineMode; + delete params.inlineMode; + super._init(params); let ui = Utils.getUIObject('place-view', [ 'bubble-main-box', @@ -150,6 +155,10 @@ var PlaceView = GObject.registerClass({ } } + if (this._inlineMode) { + ui.titleBox.hide(); + } + this.updatePlaceDetails(); this._place.connect('notify::location', () => this._updateLocation()); @@ -412,6 +421,10 @@ var PlaceView = GObject.registerClass({ marginBottom: 6, spacing: 12 }); + if (this._inlineMode) { + box.marginStart = 6; + } + if (icon) { let widget = new Gtk.Image({ icon_name: icon, visible: true, |