[polari/wip/fmuellner/join-room-list: 3/3] serverRoomList: Enable fixed-height-mode for efficiency
- From: Gitlab Administrative User <gitlab src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/join-room-list: 3/3] serverRoomList: Enable fixed-height-mode for efficiency
- Date: Sat, 28 Oct 2017 16:38:51 +0000 (UTC)
commit 1d453827500600b11c0e7c95ae837cc545a4d318
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Oct 21 19:02:16 2017 +0200
serverRoomList: Enable fixed-height-mode for efficiency
All rows have the same height, so with some minor tweaks we can set
the colum's sizing to fixed and enable fixed-height-mode to speed
up the TreeView.
Fixes https://gitlab.gnome.org/GNOME/polari/issues/13
data/resources/server-room-list.ui | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/data/resources/server-room-list.ui b/data/resources/server-room-list.ui
index 8bdc74e..a053f13 100644
--- a/data/resources/server-room-list.ui
+++ b/data/resources/server-room-list.ui
@@ -63,6 +63,7 @@
<property name="visible">True</property>
<property name="model">modelFilter</property>
<property name="activate-on-single-click">True</property>
+ <property name="fixed-height-mode">True</property>
<property name="enable-grid-lines">horizontal</property>
<property name="headers-visible">False</property>
<style>
@@ -70,6 +71,7 @@
</style>
<child>
<object class="GtkTreeViewColumn">
+ <property name="sizing">fixed</property>
<child>
<object class="GtkCellRendererToggle" id="toggleRenderer"/>
<attributes>
@@ -95,6 +97,12 @@
<child>
<object class="GtkCellRendererText">
<property name="xalign">1.0</property>
+ <!-- Fixed-height mode requires fixed column sizing,
+ which means renderers don't grow with their content;
+ the biggest rooms on Freenode have around 2000 users,
+ so 5 digits should be a safe to no cut off the number
+ -->
+ <property name="width-chars">5</property>
</object>
<attributes>
<attribute name="text">2</attribute>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]