aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeemu Ikonen <tpikonen@gmail.com>2024-01-13 14:56:13 +0200
committerGitHub <noreply@github.com>2024-01-13 13:56:13 +0100
commit732d3a9814b383aa8f2c962d33c7feb0481ff7a7 (patch)
tree20514e4e28e2a850b5d4d4691dedd8948d585a43
parent22516c186285ed4723644ef790d1fe0ce43a0bf1 (diff)
downloaddino-732d3a9814b383aa8f2c962d33c7feb0481ff7a7.tar.gz
dino-732d3a9814b383aa8f2c962d33c7feb0481ff7a7.zip
Change select contact dialog container to AdwClamp (#1533)
-rw-r--r--main/data/add_conversation/select_jid_fragment.ui96
-rw-r--r--main/src/ui/add_conversation/add_conference_dialog.vala2
-rw-r--r--main/src/ui/add_conversation/select_contact_dialog.vala2
3 files changed, 54 insertions, 46 deletions
diff --git a/main/data/add_conversation/select_jid_fragment.ui b/main/data/add_conversation/select_jid_fragment.ui
index 787add9f..9687fd10 100644
--- a/main/data/add_conversation/select_jid_fragment.ui
+++ b/main/data/add_conversation/select_jid_fragment.ui
@@ -2,68 +2,72 @@
<interface>
<requires lib="gtk" version="4.0"/>
<template class="DinoUiSelectJidFragment">
- <property name="height_request">500</property>
- <property name="width_request">460</property>
<child>
- <object class="GtkGrid">
- <property name="hexpand">1</property>
- <property name="margin-top">20</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>
+ <object class="AdwClamp">
+ <property name="maximum-size">350</property>
+ <property name="tightening-threshold">300</property>
<child>
<object class="GtkBox">
<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="spacing">10</property>
<child>
- <object class="GtkFrame">
- <property name="child">
- <object class="GtkScrolledWindow" id="scrolled_window">
- <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 class="GtkEntry" id="entry">
+ <property name="activates-default">1</property>
+ <property name="hexpand">1</property>
</object>
</child>
<child>
<object class="GtkBox">
- <property name="css-classes">toolbar</property>
- <style>
- <class name="toolbar"/>
- <class name="inline-toolbar"/>
- </style>
+ <property name="hexpand">1</property>
+ <property name="vexpand">1</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkButton" id="add_button">
- <child>
- <object class="GtkImage">
- <property name="icon-name">list-add-symbolic</property>
- <property name="icon-size">normal</property>
+ <object class="GtkFrame">
+ <property name="child">
+ <object class="GtkScrolledWindow" id="scrolled_window">
+ <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>
- </child>
+ </property>
</object>
</child>
<child>
- <object class="GtkButton" id="remove_button">
- <property name="sensitive">0</property>
+ <object class="GtkBox">
+ <property name="css-classes">toolbar</property>
+ <style>
+ <class name="toolbar"/>
+ <class name="inline-toolbar"/>
+ </style>
+ <child>
+ <object class="GtkButton" id="add_button">
+ <child>
+ <object class="GtkImage">
+ <property name="icon-name">list-add-symbolic</property>
+ <property name="icon-size">normal</property>
+ </object>
+ </child>
+ </object>
+ </child>
<child>
- <object class="GtkImage">
- <property name="icon-name">list-remove-symbolic</property>
- <property name="icon-size">normal</property>
+ <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>
</child>
</object>
diff --git a/main/src/ui/add_conversation/add_conference_dialog.vala b/main/src/ui/add_conversation/add_conference_dialog.vala
index c5e4ac51..551f6713 100644
--- a/main/src/ui/add_conversation/add_conference_dialog.vala
+++ b/main/src/ui/add_conversation/add_conference_dialog.vala
@@ -24,6 +24,8 @@ public class AddConferenceDialog : Gtk.Dialog {
Object(use_header_bar : Util.use_csd() ? 1 : 0);
this.title = _("Join Channel");
this.modal = true;
+ this.default_width = 460;
+ this.default_height = 550;
this.stream_interactor = stream_interactor;
stack.visible = true;
diff --git a/main/src/ui/add_conversation/select_contact_dialog.vala b/main/src/ui/add_conversation/select_contact_dialog.vala
index b18f4c10..fb69257e 100644
--- a/main/src/ui/add_conversation/select_contact_dialog.vala
+++ b/main/src/ui/add_conversation/select_contact_dialog.vala
@@ -22,6 +22,8 @@ public class SelectContactDialog : Gtk.Dialog {
public SelectContactDialog(StreamInteractor stream_interactor, Gee.List<Account> accounts) {
Object(use_header_bar : Util.use_csd() ? 1 : 0);
modal = true;
+ this.default_width = 460;
+ this.default_height = 550;
this.stream_interactor = stream_interactor;
this.accounts = accounts;