[polari] userList: Fix filter entry revealing
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] userList: Fix filter entry revealing
- Date: Mon, 10 Nov 2014 10:10:53 +0000 (UTC)
commit c44cf23e7040eef2f4da1ae0e6d6afe9493a5b98
Author: Jonas Danielsson <jonas danielsson threetimestwo org>
Date: Fri Nov 7 04:32:36 2014 -0500
userList: Fix filter entry revealing
Use the UserList numRows property to determine visibility of the
filter entry. This is more reliable than the allocated height.
https://bugzilla.gnome.org/show_bug.cgi?id=738518
src/userList.js | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/userList.js b/src/userList.js
index a8a0c94..68666e1 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -93,10 +93,10 @@ const UserListPopover = new Lang.Class({
_updateEntryVisibility: function() {
if (!this._userList)
return;
- let [, natHeight] = this._userList.widget.get_child().get_preferred_height();
- let height = this._userList.widget.get_allocated_height();
- this._revealer.reveal_child = this._entry.text != '' ||
- natHeight > height;
+
+ let reveal = this._entry.text != '' ||
+ this._userList.numRows > MAX_USERS_SHOWN;
+ this._revealer.reveal_child = reveal;
},
_updateFilter: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]