diff options
author | fiaxh <git@lightrise.org> | 2023-01-06 13:19:42 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2023-01-06 14:03:54 +0100 |
commit | dc52e7595cca06d0a2da7d11b3c88cb2f7ce529c (patch) | |
tree | 111f4a86a8541ce51bba7ec56f5b32197fcefc83 /main/data | |
parent | 4d7809bb12199a598b531ca3ca019a4bb5a867f7 (diff) | |
download | dino-dc52e7595cca06d0a2da7d11b3c88cb2f7ce529c.tar.gz dino-dc52e7595cca06d0a2da7d11b3c88cb2f7ce529c.zip |
Add support for XEP-0461 replies (with fallback)
Diffstat (limited to 'main/data')
-rw-r--r-- | main/data/chat_input.ui | 17 | ||||
-rw-r--r-- | main/data/conversation_content_view/view.ui | 119 | ||||
-rw-r--r-- | main/data/quote.ui | 80 | ||||
-rw-r--r-- | main/data/theme.css | 11 |
4 files changed, 150 insertions, 77 deletions
diff --git a/main/data/chat_input.ui b/main/data/chat_input.ui index 99b087aa..5e84c360 100644 --- a/main/data/chat_input.ui +++ b/main/data/chat_input.ui @@ -32,8 +32,21 @@ </object> </child> <child> - <object class="DinoUiChatTextView" id="chat_text_view"> - <property name="margin_start">7</property> + <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> diff --git a/main/data/conversation_content_view/view.ui b/main/data/conversation_content_view/view.ui index a9aae318..f6819b94 100644 --- a/main/data/conversation_content_view/view.ui +++ b/main/data/conversation_content_view/view.ui @@ -3,95 +3,64 @@ <requires lib="gtk" version="4.0"/> <template class="DinoUiConversationSummaryConversationView"> <child> - <object class="GtkStack" id="stack"> - <property name="transition_type">crossfade</property> - <child> - <object class="GtkStackPage"> - <property name="name">main</property> + <object class="GtkOverlay"> + <property name="child"> + <object class="GtkScrolledWindow" id="scrolled"> + <property name="hscrollbar_policy">never</property> + <property name="hexpand">1</property> + <property name="vexpand">1</property> <property name="child"> - <object class="GtkOverlay"> - <property name="child"> - <object class="GtkScrolledWindow" id="scrolled"> - <property name="hscrollbar_policy">never</property> - <property name="hexpand">1</property> - <property name="vexpand">1</property> - <property name="child"> - <object class="GtkBox" id="main_wrap_box"> - <property name="valign">end</property> + <object class="GtkBox" id="main_wrap_box"> + <property name="valign">end</property> + <child> + <object class="GtkOverlay"> + <child> + <object class="GtkBox" id="main_event_box"> <child> - <object class="GtkOverlay"> - <child> - <object class="GtkBox" id="main_event_box"> - <child> - <object class="DinoUiSizeRequestBox" id="main"> - <property name="margin-bottom">15</property> - <property name="orientation">vertical</property> - <property name="size-request-mode">height-for-width</property> - </object> - </child> - </object> - </child> - <child type="overlay"> - <object class="GtkBox" id="message_menu_box"> - <property name="margin-end">10</property> - <property name="halign">end</property> - <property name="valign">start</property> - <style> - <class name="linked"/> - </style> - <child> - <object class="GtkButton" id="button1"> - <property name="visible">0</property> - <property name="vexpand">0</property> - <property name="halign">end</property> - <property name="valign">end</property> - <child> - <object class="GtkImage" id="button1_icon"> - <property name="icon-size">normal</property> - </object> - </child> - </object> - </child> - </object> - </child> + <object class="DinoUiSizeRequestBox" id="main"> + <property name="margin-bottom">15</property> + <property name="orientation">vertical</property> + <property name="size-request-mode">height-for-width</property> </object> </child> </object> - </property> - </object> - </property> - <child type="overlay"> - <object class="GtkRevealer" id="notification_revealer"> - <property name="halign">center</property> - <property name="valign">start</property> - <property name="child"> - <object class="GtkFrame" id="frame2"> + </child> + <child type="overlay"> + <object class="GtkBox" id="message_menu_box"> + <property name="margin-end">10</property> + <property name="halign">end</property> + <property name="valign">start</property> <style> - <class name="app-notification"/> + <class name="linked"/> </style> - <property name="child"> - <object class="GtkBox" id="notifications"> - <property name="hexpand">0</property> - <property name="vexpand">0</property> - <property name="orientation">vertical</property> - </object> - </property> - <child type="label_item"> - <placeholder/> - </child> </object> - </property> + </child> </object> </child> </object> </property> </object> - </child> - <child> - <object class="GtkStackPage"> - <property name="name">void</property> + </property> + <child type="overlay"> + <object class="GtkRevealer" id="notification_revealer"> + <property name="halign">center</property> + <property name="valign">start</property> <property name="child"> - <object class="GtkBox"/> + <object class="GtkFrame" id="frame2"> + <style> + <class name="app-notification"/> + </style> + <property name="child"> + <object class="GtkBox" id="notifications"> + <property name="hexpand">0</property> + <property name="vexpand">0</property> + <property name="orientation">vertical</property> + </object> + </property> + <child type="label_item"> + <placeholder/> + </child> + </object> </property> </object> </child> diff --git a/main/data/quote.ui b/main/data/quote.ui new file mode 100644 index 00000000..a7c32ed8 --- /dev/null +++ b/main/data/quote.ui @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <requires lib="gtk" version="4.0"/> + <object class="GtkGrid" id="outer"> + <property name="column-spacing">5</property> + <style> + <class name="dino-quote"/> + </style> + <child> + <object class="DinoUiAvatarImage" id="avatar"> + <property name="allow_gray">False</property> + <property name="height">15</property> + <property name="width">15</property> + <property name="valign">center</property> + <layout> + <property name="column">0</property> + <property name="row">0</property> + </layout> + </object> + </child> + <child> + <object class="GtkLabel" id="author"> + <property name="ellipsize">end</property> + <property name="halign">start</property> + <property name="valign">baseline</property> + <property name="xalign">0</property> + <attributes> + <attribute name="weight" value="PANGO_WEIGHT_BOLD"/> + </attributes> + <layout> + <property name="column">1</property> + <property name="row">0</property> + </layout> + </object> + </child> + <child> + <object class="GtkLabel" id="time"> + <property name="ellipsize">end</property> + <property name="halign">start</property> + <property name="valign">baseline</property> + <property name="xalign">0</property> + <property name="hexpand">True</property> + <style> + <class name="dim-label"/> + </style> + <attributes> + <attribute name="scale" value="0.8"/> + </attributes> + <layout> + <property name="column">2</property> + <property name="row">0</property> + </layout> + </object> + </child> + <child> + <object class="GtkLabel" id="message"> + <property name="ellipsize">end</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <layout> + <property name="column">0</property> + <property name="row">1</property> + <property name="column-span">3</property> + </layout> + </object> + </child> + <child> + <object class="GtkButton" id="abort-button"> + <property name="icon-name">window-close-symbolic</property> + <property name="has-frame">False</property> + <property name="valign">center</property> + <layout> + <property name="column">3</property> + <property name="row">0</property> + <property name="row-span">2</property> + </layout> + </object> + </child> + </object> +</interface>
\ No newline at end of file diff --git a/main/data/theme.css b/main/data/theme.css index d657e0a3..3d24750e 100644 --- a/main/data/theme.css +++ b/main/data/theme.css @@ -109,6 +109,17 @@ window.dino-main .dino-conversation .message-box.error:hover { background: alpha(@error_color, 0.12); } +window.dino-main .dino-quote { + border-left: 3px solid alpha(@theme_fg_color, 0.2); + background: alpha(@theme_fg_color, 0.05); + border-color: alpha(@theme_fg_color, 0.2); + padding: 10px; +} + +window.dino-main .dino-quote:hover { + background: alpha(@theme_fg_color, 0.08); +} + /* Message Menu */ .message-menu-box { |