anotherim-desktop/main/data/chat_input.ui
Xavier Del Campo Romero f2096694c6 Add send button / Enter key settings
Two new switches have been added to the application preferences:

- Enable send button
- Use Enter to insert newline ('\n')

The latter cannot be active or sensitive if the former is not active.
Otherwise, users would not be able to send messages.

Thanks to horazont for suggesting a separate switch for the behaviour
of the Enter key.
2024-03-29 16:58:50 +03:00

113 lines
5.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<template class="DinoUiChatInputView">
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<style>
<class name="dino-chatinput"/>
</style>
<child>
<object class="GtkFrame" id="frame">
<property name="margin_start">14</property>
<property name="margin_end">14</property>
<property name="child">
<object class="GtkBox" id="outer_box">
<child>
<object class="GtkButton" id="file_button">
<property name="icon-name">mail-attachment-symbolic</property>
<property name="margin-top">2</property>
<property name="valign">center</property>
<style>
<class name="flat"/>
<class name="dino-chatinput-button"/>
<class name="dino-attach-button"/>
<class name="image-button"/>
</style>
</object>
</child>
<child>
<object class="GtkSeparator" id="file_separator">
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="quote_box">
<property name="margin-top">10</property>
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="visible">False</property>
</object>
</child>
<child>
<object class="DinoUiChatTextView" id="chat_text_view">
<property name="margin_start">7</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkMenuButton" id="emoji_button">
<property name="icon-name">emoji-people-symbolic</property>
<property name="has-frame">False</property>
<property name="margin-top">2</property>
<property name="valign">center</property>
<style>
<class name="flat"/>
<class name="dino-chatinput-button"/>
<class name="image-button"/>
</style>
</object>
</child>
<child>
<object class="GtkMenuButton" id="encryption_button">
<property name="icon-name">changes-allow-symbolic</property>
<property name="has-frame">False</property>
<property name="margin-top">2</property>
<property name="valign">center</property>
<style>
<class name="flat"/>
<class name="dino-chatinput-button"/>
<class name="image-button"/>
</style>
</object>
</child>
<child>
<object class="GtkButton" id="send_button">
<property name="icon-name">mail-send-symbolic</property>
<property name="has-frame">False</property>
<property name="margin-top">2</property>
<property name="valign">center</property>
<property name="sensitive">false</property>
<style>
<class name="flat"/>
<class name="dino-chatinput-button"/>
<class name="image-button"/>
</style>
</object>
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkLabel" id="chat_input_status">
<property name="xalign">0</property>
<property name="margin_bottom">3</property>
<property name="margin_start">14</property>
<property name="margin_end">14</property>
<property name="wrap">True</property>
<attributes>
<attribute name="scale" value="0.8"></attribute>
</attributes>
<style>
<class name="chat-input-status"/>
</style>
</object>
</child>
</template>
</interface>