summaryrefslogtreecommitdiff
path: root/src/favoritesPopover.js
diff options
context:
space:
mode:
authorJames Westman <james@flyingpimonster.net>2020-03-12 12:52:10 -0500
committerMarcus Lundblad <ml@update.uu.se>2020-03-16 21:20:25 +0000
commita3be127cf840c96240c0229ef375e720bf4a0740 (patch)
treeb0ca07dc29f43422c34f88dc5631e90c9058c0a5 /src/favoritesPopover.js
parent2501e1199cfae5fbce3ebe71ec38add3bcfad56a (diff)
downloadgnome-maps-a3be127cf840c96240c0229ef375e720bf4a0740.tar.gz
favoritesPopover: Minor style improvements
- Clean up margins/spacing: The margin in the popover is 6px and the spacing between the entry and listbox is also 6px - Remove the revealer around the search entry, and change the entry's visibility directly. You can't modify your favorites list from inside the popover anyway, so the reveal animation was never visible. - Fix the height calculation for the listbox Fixes #136.
Diffstat (limited to 'src/favoritesPopover.js')
-rw-r--r--src/favoritesPopover.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/favoritesPopover.js b/src/favoritesPopover.js
index 3a0454ff..8386eaa0 100644
--- a/src/favoritesPopover.js
+++ b/src/favoritesPopover.js
@@ -30,7 +30,6 @@ const _N_VISIBLE = 6;
var FavoritesPopover = GObject.registerClass({
Template: 'resource:///org/gnome/Maps/ui/favorites-popover.ui',
InternalChildren: [ 'mainGrid',
- 'revealer',
'entry',
'scrolledWindow',
'list' ],
@@ -71,10 +70,10 @@ var FavoritesPopover = GObject.registerClass({
this.connect('notify::rows', () => {
let visible = Math.min(this._rows, _N_VISIBLE);
let separators = visible - 1; // separators are 1px
- let height = (PlaceListRow.ROW_HEIGHT + 6) * visible + separators;
+ let height = PlaceListRow.ROW_HEIGHT * visible + separators;
this._scrolledWindow.min_content_height = height;
- this._revealer.reveal_child = this._rows > _N_VISIBLE;
+ this._entry.visible = this._rows > _N_VISIBLE;
});
this._entry.connect('changed',