Browse Source

components: Reduce minimal height of PillSearchEntry

Since there have been measuring fixes in GTK and it doesn't grow
excessively anymore when we insert a pill.
merge-requests/2003/head
Kévin Commaille 11 months ago
parent
commit
6813a4c98e
No known key found for this signature in database
GPG Key ID: C971D9DBC9D678D
  1. 17
      src/components/pill/search_entry.ui
  2. 23
      src/session/view/content/room_details/invite_subpage/mod.ui
  3. 17
      src/session/view/content/room_details/permissions/add_members_subpage.ui

17
src/components/pill/search_entry.ui

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="PillSearchEntry" parent="AdwBin">
<property name="accessible-role">search</property>
<property name="child">
<object class="CustomEntry">
<!-- FIXME: inserting a Pill makes the Entry grow, therefore we force more height so that it doesn't grow visually
Would be nice to fix it properly. Including the vertical alignment of Pills in the textview
-->
<property name="height-request">74</property>
<child>
<object class="GtkBox">
<property name="spacing">6</property>
@ -18,15 +15,21 @@
</child>
<child>
<object class="GtkScrolledWindow">
<property name="vexpand">True</property>
<property name="hexpand">True</property>
<property name="vscrollbar-policy">external</property>
<property name="max-content-height">200</property>
<property name="propagate-natural-height">True</property>
<child>
<object class="GtkTextView" id="text_view">
<property name="height-request">38</property>
<property name="hexpand">True</property>
<property name="justification">left</property>
<property name="wrap-mode">word-char</property>
<property name="accepts-tab">False</property>
<property name="pixels_above_lines">3</property>
<property name="pixels_below_lines">3</property>
<property name="pixels_inside_wrap">6</property>
<property name="pixels-above-lines">6</property>
<property name="pixels-below-lines">11</property>
<property name="pixels-inside-wrap">11</property>
<property name="buffer">
<object class="GtkTextBuffer" id="text_buffer"/>
</property>

23
src/session/view/content/room_details/invite_subpage/mod.ui

@ -29,21 +29,16 @@
</object>
</child>
<child type="top">
<object class="GtkSearchBar">
<property name="search-mode-enabled">True</property>
<object class="AdwClamp">
<property name="margin-bottom">6</property>
<property name="margin-end">30</property>
<property name="margin-start">30</property>
<property name="margin-top">6</property>
<property name="hexpand">True</property>
<child>
<object class="AdwClamp">
<property name="margin-bottom">6</property>
<property name="margin-end">30</property>
<property name="margin-start">30</property>
<property name="margin-top">6</property>
<property name="hexpand">True</property>
<child>
<object class="PillSearchEntry" id="search_entry">
<property name="editable" bind-source="invite_button" bind-property="is-loading" bind-flags="sync-create | invert-boolean"/>
<signal name="pill-removed" handler="remove_pill_invitee" swapped="yes" />
</object>
</child>
<object class="PillSearchEntry" id="search_entry">
<property name="editable" bind-source="invite_button" bind-property="is-loading" bind-flags="sync-create | invert-boolean"/>
<signal name="pill-removed" handler="remove_pill_invitee" swapped="yes" />
</object>
</child>
</object>

17
src/session/view/content/room_details/permissions/add_members_subpage.ui

@ -20,18 +20,13 @@
</object>
</child>
<child type="top">
<object class="GtkSearchBar">
<property name="search-mode-enabled">True</property>
<object class="AdwClamp">
<property name="margin-bottom">6</property>
<property name="margin-end">30</property>
<property name="margin-start">30</property>
<property name="margin-top">6</property>
<child>
<object class="AdwClamp">
<property name="margin-bottom">6</property>
<property name="margin-end">30</property>
<property name="margin-start">30</property>
<property name="margin-top">6</property>
<child>
<object class="PillSearchEntry" id="search_entry" />
</child>
</object>
<object class="PillSearchEntry" id="search_entry" />
</child>
</object>
</child>

Loading…
Cancel
Save