Change select contact dialog container to HdyClamp and set default size (#949)

This commit is contained in:
Michel Le Bihan 2021-01-15 13:16:10 +01:00 committed by fiaxh
parent 9b4f0a603b
commit bf5f83c073
3 changed files with 57 additions and 47 deletions

View file

@ -1,82 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<interface> <interface>
<template class="DinoUiSelectJidFragment"> <template class="DinoUiSelectJidFragment">
<property name="height_request">500</property> <property name="height_request">480</property>
<property name="width_request">460</property>
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="GtkGrid"> <object class="HdyClamp">
<property name="expand">True</property> <property name="margin-right">18</property>
<property name="margin-top">20</property> <property name="margin-left">18</property>
<property name="margin-right">80</property> <property name="maximum-size">300</property>
<property name="margin-bottom">20</property>
<property name="margin-left">80</property>
<property name="orientation">vertical</property>
<property name="row-spacing">10</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property>
<child> <child>
<object class="GtkEntry" id="entry"> <object class="GtkGrid">
<property name="activates_default">True</property>
<property name="hexpand">True</property>
<property name="visible">True</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="expand">True</property> <property name="expand">True</property>
<property name="margin-top">20</property>
<property name="margin-bottom">20</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="row-spacing">10</property>
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="GtkFrame"> <object class="GtkEntry" id="entry">
<property name="activates_default">True</property>
<property name="hexpand">True</property>
<property name="visible">True</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="expand">True</property>
<property name="orientation">vertical</property>
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="GtkScrolledWindow" id="scrolled_window"> <object class="GtkFrame">
<property name="hscrollbar_policy">never</property>
<property name="expand">True</property>
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="GtkBox" id="box"> <object class="GtkScrolledWindow" id="scrolled_window">
<property name="orientation">vertical</property> <property name="hscrollbar_policy">never</property>
<property name="expand">True</property>
<property name="visible">True</property> <property name="visible">True</property>
<child>
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
<property name="visible">True</property>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>
</child> </child>
</object>
</child>
<child>
<object class="GtkToolbar">
<property name="visible">True</property>
<style>
<class name="inline-toolbar"/>
</style>
<child> <child>
<object class="GtkToolItem"> <object class="GtkToolbar">
<property name="visible">True</property> <property name="visible">True</property>
<style>
<class name="inline-toolbar"/>
</style>
<child> <child>
<object class="GtkBox"> <object class="GtkToolItem">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="GtkButton" id="add_button"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="GtkImage"> <object class="GtkButton" id="add_button">
<property name="icon-name">list-add-symbolic</property>
<property name="icon-size">1</property>
<property name="visible">True</property> <property name="visible">True</property>
<child>
<object class="GtkImage">
<property name="icon-name">list-add-symbolic</property>
<property name="icon-size">1</property>
<property name="visible">True</property>
</object>
</child>
</object> </object>
</child> </child>
</object>
</child>
<child>
<object class="GtkButton" id="remove_button">
<property name="sensitive">False</property>
<property name="visible">True</property>
<child> <child>
<object class="GtkImage"> <object class="GtkButton" id="remove_button">
<property name="icon-name">list-remove-symbolic</property> <property name="sensitive">False</property>
<property name="icon-size">1</property>
<property name="visible">True</property> <property name="visible">True</property>
<child>
<object class="GtkImage">
<property name="icon-name">list-remove-symbolic</property>
<property name="icon-size">1</property>
<property name="visible">True</property>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>

View file

@ -35,6 +35,8 @@ public class AddConferenceDialog : Gtk.Dialog {
setup_jid_add_view(); setup_jid_add_view();
setup_conference_details_view(); setup_conference_details_view();
show_jid_add_view(); show_jid_add_view();
set_default_size(400, 520);
} }
private void show_jid_add_view() { private void show_jid_add_view() {

View file

@ -27,6 +27,8 @@ public class SelectContactDialog : Gtk.Dialog {
setup_view(); setup_view();
setup_headerbar(); setup_headerbar();
set_default_size(400, 520);
} }
public void set_filter(string str) { public void set_filter(string str) {