mirror of
https://gitlab.com/schmiddi-on-mobile/flare.git
synced 2026-10-26 05:27:46 -04:00
206 lines
4.7 KiB
Plaintext
206 lines
4.7 KiB
Plaintext
using Gtk 4.0;
|
|
using Adw 1;
|
|
|
|
template $FlWindow: Adw.ApplicationWindow {
|
|
can-focus: true;
|
|
title: "Flare";
|
|
height-request: 300;
|
|
width-request: 300;
|
|
|
|
Adw.Breakpoint {
|
|
condition ("max-width: 720sp")
|
|
|
|
setters {
|
|
split_view.collapsed: true;
|
|
}
|
|
}
|
|
|
|
Adw.NavigationSplitView split_view {
|
|
min-sidebar-width: 300;
|
|
max-sidebar-width: 400;
|
|
sidebar-width-fraction: 0.25;
|
|
|
|
sidebar: Adw.NavigationPage {
|
|
title: _("Channel list");
|
|
tag: "channel-list";
|
|
|
|
Adw.ToolbarView {
|
|
[top]
|
|
Adw.HeaderBar {
|
|
title-widget: Adw.WindowTitle {
|
|
title: "Flare";
|
|
};
|
|
|
|
[start]
|
|
ToggleButton {
|
|
accessibility {
|
|
label: C_("accessibility", "Add Conversation");
|
|
}
|
|
|
|
tooltip-text: "Add Conversation";
|
|
icon-name: "document-edit-symbolic";
|
|
active: bind channel_list.add-conversation-enabled bidirectional;
|
|
}
|
|
|
|
[end]
|
|
MenuButton {
|
|
accessibility {
|
|
label: C_("accessibility", "Menu");
|
|
}
|
|
|
|
tooltip-text: "Menu";
|
|
menu-model: menubar;
|
|
primary: true;
|
|
icon-name: "open-menu-symbolic";
|
|
}
|
|
|
|
[end]
|
|
ToggleButton {
|
|
accessibility {
|
|
label: C_("accessibility", "Search");
|
|
}
|
|
|
|
tooltip-text: "Search";
|
|
icon-name: "system-search-symbolic";
|
|
active: bind channel_list.search-enabled no-sync-create;
|
|
clicked => $handle_search_clicked() swapped;
|
|
}
|
|
}
|
|
|
|
content: $FlChannelList channel_list {
|
|
active-channel-changed => $handle_go_forward() swapped;
|
|
manager: bind template.manager;
|
|
};
|
|
}
|
|
};
|
|
|
|
content: Adw.NavigationPage {
|
|
title: _("Chat");
|
|
tag: "chat";
|
|
|
|
Adw.ToolbarView {
|
|
[top]
|
|
Adw.HeaderBar {
|
|
title-widget: Box {
|
|
name: "room_title";
|
|
orientation: vertical;
|
|
halign: center;
|
|
valign: center;
|
|
|
|
Label title_label {
|
|
focusable: true;
|
|
ellipsize: end;
|
|
halign: center;
|
|
wrap: false;
|
|
single-line-mode: true;
|
|
use-markup: true;
|
|
width-chars: 5;
|
|
label: bind channel_list.active-channel as <$FlChannel>.title;
|
|
styles [
|
|
"title",
|
|
]
|
|
}
|
|
|
|
Label subtitle_label {
|
|
focusable: true;
|
|
ellipsize: end;
|
|
halign: center;
|
|
wrap: false;
|
|
single-line-mode: true;
|
|
use-markup: true;
|
|
visible: bind $or(channel_list.active-channel as <$FlChannel>.is-typing,$not_empty(channel_list.active-channel as <$FlChannel>.description) as <bool>) as <bool>;
|
|
label: bind $handle_typing(channel_list.active-channel as <$FlChannel>.is-typing,channel_list.active-channel as <$FlChannel>.description) as <string>;
|
|
tooltip-markup: bind channel_list.active-channel as <$FlChannel>.description;
|
|
|
|
styles [
|
|
"subtitle-room",
|
|
"dim-label",
|
|
]
|
|
}
|
|
};
|
|
|
|
[end]
|
|
MenuButton {
|
|
accessibility {
|
|
label: C_("accessibility", "Menu");
|
|
}
|
|
|
|
tooltip-text: "Menu";
|
|
menu-model: menubar-channel;
|
|
icon-name: "view-more-symbolic";
|
|
}
|
|
}
|
|
|
|
content: $FlChannelMessages channel_messages {
|
|
manager: bind template.manager;
|
|
active-channel: bind channel_list.active-channel;
|
|
};
|
|
}
|
|
};
|
|
}
|
|
}
|
|
|
|
menu menubar {
|
|
section {
|
|
item {
|
|
label: _("Settings");
|
|
action: "win.settings";
|
|
}
|
|
|
|
item {
|
|
label: _("Unlink");
|
|
action: "win.unlink";
|
|
}
|
|
|
|
item {
|
|
label: _("Linked Devices");
|
|
action: "win-managed.linked-devices";
|
|
hidden-when: "action-disabled";
|
|
}
|
|
|
|
item {
|
|
label: _("Clear messages");
|
|
action: "win.clear-messages";
|
|
}
|
|
|
|
item {
|
|
label: _("Submit Captcha");
|
|
action: "win.submit-captcha";
|
|
}
|
|
|
|
item {
|
|
label: _("Synchronize Contacts");
|
|
action: "win.sync-contacts";
|
|
}
|
|
|
|
item {
|
|
label: _("Keybindings");
|
|
action: "win.show-help-overlay";
|
|
}
|
|
|
|
item {
|
|
label: _("About");
|
|
action: "win.about";
|
|
}
|
|
|
|
item {
|
|
label: _("Quit");
|
|
action: "win.kill";
|
|
}
|
|
}
|
|
}
|
|
|
|
menu menubar-channel {
|
|
section {
|
|
item {
|
|
label: _("Channel Information");
|
|
action: "win.channel-information";
|
|
}
|
|
|
|
item {
|
|
label: _("Clear Messages");
|
|
action: "win.channel-clear-messages";
|
|
}
|
|
}
|
|
}
|