Change select contact dialog container to AdwClamp (#1533)

This commit is contained in:
Teemu Ikonen 2024-01-13 14:56:13 +02:00 committed by GitHub
parent 22516c1862
commit 732d3a9814
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 46 deletions

View file

@ -2,68 +2,72 @@
<interface> <interface>
<requires lib="gtk" version="4.0"/> <requires lib="gtk" version="4.0"/>
<template class="DinoUiSelectJidFragment"> <template class="DinoUiSelectJidFragment">
<property name="height_request">500</property>
<property name="width_request">460</property>
<child> <child>
<object class="GtkGrid"> <object class="AdwClamp">
<property name="hexpand">1</property> <property name="maximum-size">350</property>
<property name="margin-top">20</property> <property name="tightening-threshold">300</property>
<property name="margin-end">80</property>
<property name="margin-bottom">20</property>
<property name="margin-start">80</property>
<property name="orientation">vertical</property>
<property name="row-spacing">10</property>
<child>
<object class="GtkEntry" id="entry">
<property name="activates_default">1</property>
<property name="hexpand">1</property>
</object>
</child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="hexpand">1</property> <property name="hexpand">1</property>
<property name="vexpand">1</property> <property name="margin-start">12</property>
<property name="margin-end">12</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="spacing">10</property>
<child> <child>
<object class="GtkFrame"> <object class="GtkEntry" id="entry">
<property name="child"> <property name="activates-default">1</property>
<object class="GtkScrolledWindow" id="scrolled_window"> <property name="hexpand">1</property>
<property name="hscrollbar_policy">never</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="child">
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
</object>
</property>
</object>
</property>
</object> </object>
</child> </child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="css-classes">toolbar</property> <property name="hexpand">1</property>
<style> <property name="vexpand">1</property>
<class name="toolbar"/> <property name="orientation">vertical</property>
<class name="inline-toolbar"/>
</style>
<child> <child>
<object class="GtkButton" id="add_button"> <object class="GtkFrame">
<child> <property name="child">
<object class="GtkImage"> <object class="GtkScrolledWindow" id="scrolled_window">
<property name="icon-name">list-add-symbolic</property> <property name="hscrollbar-policy">never</property>
<property name="icon-size">normal</property> <property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="child">
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
</object>
</property>
</object> </object>
</child> </property>
</object> </object>
</child> </child>
<child> <child>
<object class="GtkButton" id="remove_button"> <object class="GtkBox">
<property name="sensitive">0</property> <property name="css-classes">toolbar</property>
<style>
<class name="toolbar"/>
<class name="inline-toolbar"/>
</style>
<child> <child>
<object class="GtkImage"> <object class="GtkButton" id="add_button">
<property name="icon-name">list-remove-symbolic</property> <child>
<property name="icon-size">normal</property> <object class="GtkImage">
<property name="icon-name">list-add-symbolic</property>
<property name="icon-size">normal</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="remove_button">
<property name="sensitive">0</property>
<child>
<object class="GtkImage">
<property name="icon-name">list-remove-symbolic</property>
<property name="icon-size">normal</property>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>

View file

@ -24,6 +24,8 @@ public class AddConferenceDialog : Gtk.Dialog {
Object(use_header_bar : Util.use_csd() ? 1 : 0); Object(use_header_bar : Util.use_csd() ? 1 : 0);
this.title = _("Join Channel"); this.title = _("Join Channel");
this.modal = true; this.modal = true;
this.default_width = 460;
this.default_height = 550;
this.stream_interactor = stream_interactor; this.stream_interactor = stream_interactor;
stack.visible = true; stack.visible = true;

View file

@ -22,6 +22,8 @@ public class SelectContactDialog : Gtk.Dialog {
public SelectContactDialog(StreamInteractor stream_interactor, Gee.List<Account> accounts) { public SelectContactDialog(StreamInteractor stream_interactor, Gee.List<Account> accounts) {
Object(use_header_bar : Util.use_csd() ? 1 : 0); Object(use_header_bar : Util.use_csd() ? 1 : 0);
modal = true; modal = true;
this.default_width = 460;
this.default_height = 550;
this.stream_interactor = stream_interactor; this.stream_interactor = stream_interactor;
this.accounts = accounts; this.accounts = accounts;