Switch to blueprints and improve roomlist
This commit is contained in:
parent
271298e295
commit
ac36fda566
|
@ -63,12 +63,19 @@ modules:
|
|||
- type: archive
|
||||
url: https://download.gnome.org/sources/libadwaita/1.2/libadwaita-1.2.0.tar.xz
|
||||
sha256: 322f3e1be39ba67981d9fe7228a85818eccaa2ed0aa42bcafe263af881c6460c
|
||||
- name: blueprint-compiler
|
||||
buildsystem: meson
|
||||
sources:
|
||||
- type: git
|
||||
url: https://gitlab.gnome.org/jwestman/blueprint-compiler
|
||||
branch: main
|
||||
- name: matrix-client
|
||||
buildsystem: simple
|
||||
build-options:
|
||||
env:
|
||||
CARGO_HOME: /run/build/matrix-client/cargo
|
||||
build-commands:
|
||||
- blueprint-compiler batch-compile ./resources ./resources ./resources/window.blp ./resources/shortcuts.blp
|
||||
- cargo --offline fetch --manifest-path Cargo.toml --verbose
|
||||
- cargo --offline build --release --verbose
|
||||
- install -Dm644 ${FLATPAK_ID}.gschema.xml -t /app/share/glib-2.0/schemas/
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
ShortcutsWindow help_overlay {
|
||||
modal: true;
|
||||
|
||||
ShortcutsSection {
|
||||
section-name: "shortcuts";
|
||||
max-height: 10;
|
||||
|
||||
ShortcutsGroup {
|
||||
title: C_("shortcut window", "General");
|
||||
|
||||
ShortcutsShortcut {
|
||||
title: C_("shortcut window", "Show shortcuts");
|
||||
action-name: "win.show-help-overlay";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
menu main-menu {
|
||||
}
|
||||
|
||||
template MainWindow : Adw.ApplicationWindow {
|
||||
default-width: 1280;
|
||||
default-height: 720;
|
||||
title: _("Matrix Client");
|
||||
content: Box {
|
||||
orientation: vertical;
|
||||
|
||||
Adw.HeaderBar {
|
||||
decoration-layout: "icon:minimize,maximize,close";
|
||||
[end]
|
||||
MenuButton {
|
||||
icon-name: "open-menu-symbolic";
|
||||
menu-model: main-menu;
|
||||
tooltip-text: _("Main Menu");
|
||||
}
|
||||
}
|
||||
|
||||
Adw.Flap {
|
||||
separator:Separator { };
|
||||
|
||||
[flap]
|
||||
Stack {
|
||||
vexpand: true;
|
||||
transition-type: over_up;
|
||||
|
||||
Box roomlist {
|
||||
orientation: vertical;
|
||||
spacing: 7;
|
||||
margin-top: 12;
|
||||
margin-bottom: 12;
|
||||
margin-start: 12;
|
||||
margin-end: 12;
|
||||
valign: start;
|
||||
halign: center;
|
||||
|
||||
Button {
|
||||
has-frame: false;
|
||||
child: Box {
|
||||
orientation: horizontal;
|
||||
spacing: 8;
|
||||
valign: start;
|
||||
halign: start;
|
||||
width-request: 160;
|
||||
|
||||
Adw.Avatar {
|
||||
text: "Fluffychat";
|
||||
show-initials: true;
|
||||
size: 24;
|
||||
}
|
||||
|
||||
Label {
|
||||
label: "Placeholder";
|
||||
ellipsize: end;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Box room {
|
||||
orientation: vertical;
|
||||
vexpand: true;
|
||||
hexpand: true;
|
||||
|
||||
ScrolledWindow {
|
||||
vexpand: true;
|
||||
hexpand: true;
|
||||
child: Label {
|
||||
label: "Placeholder";
|
||||
};
|
||||
}
|
||||
|
||||
Box {
|
||||
hexpand: true;
|
||||
orientation: vertical;
|
||||
margin-top: 12;
|
||||
margin-bottom: 12;
|
||||
margin-start: 12;
|
||||
margin-end: 12;
|
||||
spacing: 12;
|
||||
|
||||
Adw.EntryRow entry {
|
||||
title: _("Enter a Message…");
|
||||
input-purpose: free_form;
|
||||
enable-emoji-completion: true;
|
||||
show-apply-button: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue