apps: Mimic AdwStatusPage when showing "No Apps Found"

AdwStatusPage can't be used here, because an
unwanted scrollbar would appear inside of it.
See https://gitlab.gnome.org/GNOME/libadwaita/-/issues/697
This commit is contained in:
Automeris naranja 2023-11-07 16:52:01 -03:00 committed by Felipe Borges
parent 3feeb4c6f0
commit 1ae2c5295c

View file

@ -60,41 +60,56 @@
<child>
<!-- Empty search results placeholder -->
<object class="GtkBox" id="empty_search_placeholder">
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<!--AdwStatusPage can't be used here, see: https://gitlab.gnome.org/GNOME/libadwaita/-/issues/697-->
<property name="orientation">vertical</property>
<property name="spacing">18</property>
<property name="valign">center</property>
<!--Use AdwClamp like AdwStatusPage-->
<child>
<object class="GtkImage">
<property name="pixel_size">96</property>
<property name="icon_name">org.gnome.Software-symbolic</property>
<object class="AdwClamp">
<style>
<class name="dim-label"/>
</style>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">No Apps Found</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.44"/>
</attributes>
</object>
</child>
<child>
<object class="GtkButton" id="install_button">
<property name="label" translatable="yes">_Install Some…</property>
<property name="use_underline">True</property>
<property name="halign">center</property>
<signal name="clicked" handler="open_software_cb" object="CcApplicationsPanel" swapped="yes"/>
<style>
<class name="pill" />
<class name="status-page"/>
</style>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="valign">center</property>
<child>
<object class="GtkImage">
<property name="pixel_size">128</property>
<property name="icon_name">org.gnome.Software-symbolic</property>
<style>
<class name="dim-label"/>
<class name="icon"/>
</style>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">No Apps Found</property>
<property name="wrap">True</property>
<property name="wrap-mode">word-char</property>
<property name="justify">center</property>
<style>
<class name="title"/>
<class name="title-1"/>
</style>
</object>
</child>
<child>
<object class="GtkButton" id="install_button">
<property name="label" translatable="yes">_Find in Software</property>
<property name="use_underline">True</property>
<property name="halign">center</property>
<signal name="clicked" handler="open_software_cb" object="CcApplicationsPanel" swapped="yes"/>
<style>
<class name="pill"/>
<class name="suggested-action"/>
</style>
</object>
</child>
</object>
</property>
</object>
</child>
</object>