Use a GtkListBox placeholder widget to show the "No input source selected" message. Also, remove the hexpand and vexpand properties from the list box, which currently aren't doing anything.
56 lines
2.2 KiB
XML
56 lines
2.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<template class="CcInputListBox" parent="AdwBin">
|
|
|
|
<child>
|
|
<object class="GtkListBox" id="listbox">
|
|
<property name="selection-mode">none</property>
|
|
<signal name="row_activated" handler="input_row_activated_cb" object="CcInputListBox" swapped="yes"/>
|
|
<signal name="keynav_failed" handler="keynav_failed_cb" object="CcInputListBox" swapped="yes"/>
|
|
<child type="placeholder">
|
|
<object class="GtkLabel">
|
|
<property name="label" translatable="yes">No input source selected</property>
|
|
<property name="wrap">true</property>
|
|
<property name="max-width-chars">50</property>
|
|
<style>
|
|
<class name="dim-label" />
|
|
<class name="cc-placeholder-row" />
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<style>
|
|
<class name="boxed-list"/>
|
|
</style>
|
|
<child>
|
|
<object class="GtkListBoxRow" id="add_input_row">
|
|
<property name="selectable">False</property>
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="halign">center</property>
|
|
<property name="margin_start">12</property>
|
|
<property name="margin_end">12</property>
|
|
<property name="margin_top">16</property>
|
|
<property name="margin_bottom">16</property>
|
|
<property name="spacing">6</property>
|
|
<child>
|
|
<object class="GtkImage">
|
|
<property name="hexpand">True</property>
|
|
<property name="icon_name">list-add-symbolic</property>
|
|
<property name="accessible_role">presentation</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="use_underline">True</property>
|
|
<property name="label" translatable="yes">_Add Input Source…</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
</template>
|
|
</interface>
|