Now About Social Code
aboutsummaryrefslogtreecommitdiff
path: root/src/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtk')
-rw-r--r--src/gtk/chat.ui67
-rw-r--r--src/gtk/help-overlay.ui29
-rw-r--r--src/gtk/message.ui63
-rw-r--r--src/gtk/preferences.ui83
4 files changed, 242 insertions, 0 deletions
diff --git a/src/gtk/chat.ui b/src/gtk/chat.ui
new file mode 100644
index 0000000..23477ad
--- /dev/null
+++ b/src/gtk/chat.ui
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk" version="4.0"/>
+ <requires lib="libadwaita" version="1.0"/>
+ <template class="WeegtkChat" parent="AdwBin">
+ <style>
+ <class name="view"/>
+ </style>
+ <property name="child">
+ <object class="AdwToolbarView">
+ <child type="top">
+ <object class="AdwHeaderBar">
+ <property name="show-title">True</property>
+ </object>
+ </child>
+ <property name="content">
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkScrolledWindow" id="window">
+ <property name="vexpand">True</property>
+ <property name="hscrollbar_policy">3</property>
+ <child>
+ <object class="AdwClampScrollable">
+ <property name="maximum-size">750</property>
+ <property name="tightening-threshold">550</property>
+ <property name="child">
+ <object class="GtkListView" id="messages">
+ <property name="orientation">1</property>
+ <style>
+ <class name="navigation-sidebar"/>
+ </style>
+ </object>
+ </property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwClamp">
+ <property name="maximum-size">750</property>
+ <property name="tightening-threshold">550</property>
+ <property name="child">
+ <object class="GtkBox">
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
+ <child>
+ <object class="GtkEntry" id="text_entry">
+ <property name="halign">fill</property>
+ <property name="hexpand">True</property>
+ <property name="hexpand-set">True</property>
+ <property name="width-request">50</property>
+ <property name="margin-start">5</property>
+ <property name="margin-end">5</property>
+ <signal name="activate" handler="entry_activate"/>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+ </property>
+ </template>
+</interface>
diff --git a/src/gtk/help-overlay.ui b/src/gtk/help-overlay.ui
new file mode 100644
index 0000000..ef12f02
--- /dev/null
+++ b/src/gtk/help-overlay.ui
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkShortcutsWindow" id="help_overlay">
+ <property name="modal">True</property>
+ <child>
+ <object class="GtkShortcutsSection">
+ <property name="section-name">shortcuts</property>
+ <property name="max-height">10</property>
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="title" translatable="yes" context="shortcut window">General</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="title" translatable="yes" context="shortcut window">Show Shortcuts</property>
+ <property name="action-name">win.show-help-overlay</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="title" translatable="yes" context="shortcut window">Quit</property>
+ <property name="action-name">app.quit</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/src/gtk/message.ui b/src/gtk/message.ui
new file mode 100644
index 0000000..dca0237
--- /dev/null
+++ b/src/gtk/message.ui
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk" version="4.0"/>
+ <template class="WeegtkMessage" parent="GtkBox">
+ <property name="orientation">horizontal</property>
+ <property name="valign">start</property>
+ <property name="halign">start</property>
+ <!-- <property name="margin-top">2</property> -->
+ <!-- <property name="margin-bottom">2</property> -->
+ <style>
+ <class name="message"/>
+ </style>
+ <child>
+ <object class="AdwAvatar" id="avatar">
+ <property name="size">32</property>
+ <property name="text" translatable="true">Username</property>
+ <property name="show-initials">true</property>
+ <property name="margin-start">10</property>
+ <property name="margin-end">10</property>
+ <property name="valign">start</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="MessageText">
+ <property name="orientation">1</property>
+ <property name="valign">1</property>
+ <property name="halign">1</property>
+ <child>
+ <object class="GtkLabel" id="username">
+ <property name="label" translatable="true">Username</property>
+ <property name="halign">1</property>
+ <property name="selectable">true</property>
+ <style>
+ <class name="username"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="message_list">
+ <property name="orientation">1</property>
+ <property name="valign">1</property>
+ <property name="halign">1</property>
+ <!-- <child> -->
+ <!-- <object class="GtkLabel" id="message"> -->
+ <!-- <property name="label" translatable="true">This is the the message that some user sent</property> -->
+ <!-- <property name="halign">1</property> -->
+ <!-- <property name="selectable">true</property> -->
+ <!-- <property name="wrap">true</property> -->
+ <!-- <property name="halign">0</property> -->
+ <!-- <property name="hexpand">true</property> -->
+ <!-- <property name="hexpand-set">true</property> -->
+ <!-- <property name="xalign">0</property> -->
+ <!-- <style> -->
+ <!-- <class name="message"/> -->
+ <!-- </style> -->
+ <!-- </object> -->
+ <!-- </child> -->
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/src/gtk/preferences.ui b/src/gtk/preferences.ui
new file mode 100644
index 0000000..5823d2f
--- /dev/null
+++ b/src/gtk/preferences.ui
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk" version="4.0"/>
+ <requires lib="libadwaita" version="1.0"/>
+ <template class="WeegtkPreferences" parent="AdwPreferencesDialog">
+ <property name="content-height">1000</property>
+ <property name="search-enabled">True</property>
+ <signal name="closed" handler="preferences_closed"/>
+ <child>
+ <object class="AdwPreferencesPage">
+ <property name="icon_name">preferences-window-layout-symbolic</property>
+ <property name="title">Settings</property>
+ <property name="use-underline">True</property>
+ <child>
+ <object class="AdwPreferencesGroup">
+ <property name="title" translatable="yes">Connection</property>
+ <child>
+ <object class="AdwEntryRow" id="hostname">
+ <property name="title" translatable="yes">Hostname</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwEntryRow" id="port">
+ <property name="title" translatable="yes">Port</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwPasswordEntryRow" id="password">
+ <property name="title" translatable="yes">Password</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwEntryRow" id="ssh_host">
+ <property name="title" translatable="yes">SSH host</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwEntryRow" id="ssh_port">
+ <property name="title" translatable="yes">SSH port</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwEntryRow" id="ssh_username">
+ <property name="title" translatable="yes">SSH username</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">SSH key</property>
+ <child>
+ <object class="GtkButton">
+ <property name="valign">center</property>
+ <property name="action-name">ssh_key.open</property>
+ <child>
+ <object class="GtkBox">
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage">
+ <property name="icon-name">document-open-symbolic</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="ssh_key_label">
+ <property name="ellipsize">middle</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>