aboutsummaryrefslogtreecommitdiff
path: root/main/data
diff options
context:
space:
mode:
authorTeemu Ikonen <tpikonen@mailbox.org>2022-09-12 17:07:14 +0300
committerMarvin W <git@larma.de>2023-01-24 19:20:42 +0100
commit2741bf21ae6d53324a512dacef65d540be840fe4 (patch)
tree101504fd5cc5b1ec3390270f5e9b693c62057270 /main/data
parent1ef42b47d22d21600ccf1e2d8b4d80605448660d (diff)
downloaddino-2741bf21ae6d53324a512dacef65d540be840fe4.tar.gz
dino-2741bf21ae6d53324a512dacef65d540be840fe4.zip
Convert main window layout to 2 vertical boxes
Use Adw.Window as main window widget, add the now missing HeaderBars to MainWindowPlaceholder and MainWindow in the NoCSD case.
Diffstat (limited to 'main/data')
-rw-r--r--main/data/unified_main_content.ui177
-rw-r--r--main/data/unified_window_placeholder.ui12
2 files changed, 105 insertions, 84 deletions
diff --git a/main/data/unified_main_content.ui b/main/data/unified_main_content.ui
index 3fb7b6e5..f1294ab9 100644
--- a/main/data/unified_main_content.ui
+++ b/main/data/unified_main_content.ui
@@ -7,68 +7,22 @@
<property name="resize-start-child">False</property>
<property name="position">300</property>
<child>
- <object class="GtkStack" id="left_stack">
+ <object class="GtkBox" id="left_box">
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkStackPage">
- <property name="name">content</property>
- <property name="child">
- <object class="GtkScrolledWindow">
- <property name="hscrollbar_policy">never</property>
- <child>
- <object class="DinoUiConversationSelector" id="conversation_list">
- </object>
- </child>
- </object>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkStackPage">
- <property name="name">placeholder</property>
- <property name="child">
- <object class="GtkBox">
- <property name="margin-start">20</property>
- <property name="margin-end">20</property>
- <property name="margin-top">20</property>
- <property name="margin-bottom">20</property>
- <property name="spacing">10</property>
- <property name="valign">start</property>
- <property name="halign">start</property>
- <child>
- <object class="GtkImage" id="conversation_list_placeholder_image">
- <property name="valign">start</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="wrap">1</property>
- <property name="margin-top">70</property>
- <property name="margin-end">50</property>
- <property name="valign">end</property>
- <property name="label" translatable="1">Click here to start a conversation or join a channel.</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- </object>
- </property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkOverlay">
- <property name="child">
- <object class="GtkStack" id="right_stack">
+ <object class="GtkStack" id="left_stack">
+ <property name="hexpand">False</property>
<child>
<object class="GtkStackPage">
<property name="name">content</property>
<property name="child">
- <object class="DinoUiConversationView" id="conversation_view">
+ <object class="GtkScrolledWindow">
+ <property name="hscrollbar_policy">never</property>
+ <property name="vexpand">1</property>
+ <child>
+ <object class="DinoUiConversationSelector" id="conversation_list">
+ </object>
+ </child>
</object>
</property>
</object>
@@ -78,16 +32,17 @@
<property name="name">placeholder</property>
<property name="child">
<object class="GtkBox">
- <property name="orientation">vertical</property>
- <property name="hexpand">1</property>
- <property name="vexpand">1</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="margin-top">20</property>
+ <property name="margin-bottom">20</property>
+ <property name="spacing">10</property>
+ <property name="valign">start</property>
+ <property name="halign">start</property>
+ <property name="width_request">260</property>
<child>
- <object class="GtkImage">
- <property name="icon-name">im.dino.Dino-symbolic</property>
- <property name="pixel-size">144</property>
- <property name="margin-bottom">30</property>
+ <object class="GtkImage" id="conversation_list_placeholder_image">
+ <property name="valign">start</property>
<style>
<class name="dim-label"/>
</style>
@@ -95,13 +50,16 @@
</child>
<child>
<object class="GtkLabel">
- <property name="label" translatable="1">You have no open chats</property>
+ <property name="wrap">1</property>
+ <property name="margin-top">70</property>
+ <property name="margin-end">50</property>
+ <property name="xalign">0</property>
+ <property name="valign">end</property>
+ <property name="max-width-chars">0</property>
+ <property name="label" translatable="1">Click here to start a conversation or join a channel.</property>
<style>
<class name="dim-label"/>
</style>
- <attributes>
- <attribute name="scale" value="1.2"></attribute>
- </attributes>
</object>
</child>
</object>
@@ -109,22 +67,79 @@
</object>
</child>
</object>
- </property>
- <child type="overlay">
- <object class="GtkRevealer" id="search_revealer">
- <property name="halign">end</property>
- <property name="transition-type">slide-left</property>
- <style>
- <class name="dino-sidebar"/>
- </style>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="right_box">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkOverlay">
<property name="child">
- <object class="GtkFrame" id="search_frame">
- <property name="width-request">400</property>
+ <object class="GtkStack" id="right_stack">
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">content</property>
+ <property name="child">
+ <object class="DinoUiConversationView" id="conversation_view">
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">placeholder</property>
+ <property name="child">
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="hexpand">1</property>
+ <property name="vexpand">1</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <child>
+ <object class="GtkImage">
+ <property name="icon-name">im.dino.Dino-symbolic</property>
+ <property name="pixel-size">144</property>
+ <property name="margin-bottom">30</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="1">You have no open chats</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ <attributes>
+ <attribute name="scale" value="1.2"></attribute>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
</object>
</property>
+ <child type="overlay">
+ <object class="GtkRevealer" id="search_revealer">
+ <property name="halign">end</property>
+ <property name="transition-type">slide-left</property>
+ <style>
+ <class name="dino-sidebar"/>
+ </style>
+ <property name="child">
+ <object class="GtkFrame" id="search_frame">
+ <property name="width-request">400</property>
+ </object>
+ </property>
+ </object>
+ </child>
</object>
</child>
</object>
</child>
</object>
-</interface> \ No newline at end of file
+</interface>
diff --git a/main/data/unified_window_placeholder.ui b/main/data/unified_window_placeholder.ui
index 997d7220..91958077 100644
--- a/main/data/unified_window_placeholder.ui
+++ b/main/data/unified_window_placeholder.ui
@@ -2,13 +2,19 @@
<interface>
<requires lib="gtk" version="4.0"/>
<template class="DinoUiMainWindowPlaceholder">
- <property name="valign">center</property>
+ <property name="valign">fill</property>
<child>
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
- <property name="valign">center</property>
- <property name="halign">center</property>
+ <property name="valign">fill</property>
+ <property name="halign">fill</property>
<property name="hexpand">1</property>
+ <property name="vexpand">1</property>
+ <child>
+ <object class="GtkHeaderBar">
+ <property name="show-title-buttons">true</property>
+ </object>
+ </child>
<child>
<object class="GtkImage">
<property name="icon-name">im.dino.Dino-symbolic</property>