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 @@
False
300
-
-
-
-
-
+
+ False
content
-
+
+ never
+ 1
+
+
+
+
@@ -78,16 +32,17 @@
placeholder
- vertical
- 1
- 1
- center
- center
+ 20
+ 20
+ 20
+ 20
+ 10
+ start
+ start
+ 260
-
- im.dino.Dino-symbolic
- 144
- 30
+
+ start
@@ -95,13 +50,16 @@
- You have no open chats
+ 1
+ 70
+ 50
+ 0
+ end
+ 0
+ Click here to start a conversation or join a channel.
-
-
-
@@ -109,22 +67,79 @@
-
-
-
- end
- slide-left
-
+
+
+
+
+
+ vertical
+
+
-
- 400
+
+
+
+ content
+
+
+
+
+
+
+
+
+ placeholder
+
+
+ vertical
+ 1
+ 1
+ center
+ center
+
+
+ im.dino.Dino-symbolic
+ 144
+ 30
+
+
+
+
+
+ You have no open chats
+
+
+
+
+
+
+
+
+
+
+
+
+ end
+ slide-left
+
+
+
+ 400
+
+
+
+
-
\ No newline at end of file
+
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 @@
- center
+ fill
vertical
- center
- center
+ fill
+ fill
1
+ 1
+
+
+
im.dino.Dino-symbolic
diff --git a/main/src/ui/main_window.vala b/main/src/ui/main_window.vala
index 14058a29..475bd64a 100644
--- a/main/src/ui/main_window.vala
+++ b/main/src/ui/main_window.vala
@@ -6,7 +6,7 @@ using Dino.Entities;
namespace Dino.Ui {
-public class MainWindow : Gtk.Window {
+public class MainWindow : Adw.Window {
public signal void conversation_selected(Conversation conversation);
@@ -19,10 +19,10 @@ public class MainWindow : Gtk.Window {
public ConversationSelector conversation_selector;
public ConversationTitlebar conversation_titlebar;
public Widget conversation_list_titlebar;
- public HeaderBar placeholder_headerbar = new HeaderBar() { show_title_buttons=true };
public Box box = new Box(Orientation.VERTICAL, 0) { orientation=Orientation.VERTICAL };
- public Paned headerbar_paned = new Paned(Orientation.HORIZONTAL) { resize_start_child=false, shrink_start_child=false, shrink_end_child=false };
public Paned paned;
+ public Box left_box;
+ public Box right_box;
public Revealer search_revealer;
public GlobalSearch global_search;
private Stack stack = new Stack();
@@ -55,17 +55,17 @@ public class MainWindow : Gtk.Window {
((Widget)this).realize.connect(set_window_buttons);
((Widget)this).realize.connect(restore_window_size);
- setup_headerbar();
setup_unified();
+ setup_headerbar();
setup_stack();
-
- paned.bind_property("position", headerbar_paned, "position", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL);
}
private void setup_unified() {
Builder builder = new Builder.from_resource("/im/dino/Dino/unified_main_content.ui");
paned = (Paned) builder.get_object("paned");
box.append(paned);
+ left_box = (Box) builder.get_object("left_box");
+ right_box = (Box) builder.get_object("right_box");
left_stack = (Stack) builder.get_object("left_stack");
right_stack = (Stack) builder.get_object("right_stack");
conversation_view = (ConversationView) builder.get_object("conversation_view");
@@ -85,12 +85,15 @@ public class MainWindow : Gtk.Window {
conversation_list_titlebar = get_conversation_list_titlebar_csd();
conversation_titlebar = new ConversationTitlebarCsd();
} else {
+ Label title_label = new Label("Dino");
+ HeaderBar titlebar = new HeaderBar() { title_widget=title_label, show_title_buttons=true };
+ box.prepend(titlebar);
+
conversation_list_titlebar = new ConversationListTitlebar();
conversation_titlebar = new ConversationTitlebarNoCsd();
- box.append(headerbar_paned);
}
- headerbar_paned.set_start_child(conversation_list_titlebar);
- headerbar_paned.set_end_child(conversation_titlebar.get_widget());
+ left_box.prepend(conversation_list_titlebar);
+ right_box.prepend(conversation_titlebar.get_widget());
}
private void set_window_buttons() {
@@ -109,7 +112,7 @@ public class MainWindow : Gtk.Window {
stack.add_named(box, "main");
stack.add_named(welcome_placeholder, "welcome_placeholder");
stack.add_named(accounts_placeholder, "accounts_placeholder");
- set_child(stack);
+ set_content(stack);
}
public enum StackState {
@@ -125,25 +128,16 @@ public class MainWindow : Gtk.Window {
right_stack.set_visible_child_name("content");
stack.set_visible_child_name("main");
- if (Util.use_csd()) {
- set_titlebar(headerbar_paned);
- }
} else if (stack_state == StackState.CLEAN_START || stack_state == StackState.NO_ACTIVE_ACCOUNTS) {
if (stack_state == StackState.CLEAN_START) {
stack.set_visible_child_name("welcome_placeholder");
} else if (stack_state == StackState.NO_ACTIVE_ACCOUNTS) {
stack.set_visible_child_name("accounts_placeholder");
}
- if (Util.use_csd()) {
- set_titlebar(placeholder_headerbar);
- }
} else if (stack_state == StackState.NO_ACTIVE_CONVERSATIONS) {
stack.set_visible_child_name("main");
left_stack.set_visible_child_name("placeholder");
right_stack.set_visible_child_name("placeholder");
- if (Util.use_csd()) {
- set_titlebar(headerbar_paned);
- }
}
}