1
0
mirror of https://gitlab.cvh-server.de/skrause/flashcards.git synced 2025-12-12 06:41:38 +01:00

remove en, update ui, some minor changes

This commit is contained in:
2025-02-17 17:46:00 +01:00
parent b98397d17a
commit 81d2e8d92e
9 changed files with 154 additions and 175 deletions

View File

@@ -2,8 +2,7 @@ using Gtk 4.0;
using Adw 1;
template $FlashcardsCreateCategoryDialog : Adw.AlertDialog {
heading: "Create a new category";
default-response: "add";
heading: _("Create a new category");
close-response: "cancel";
responses [
cancel: _("Cancel"),
@@ -12,7 +11,7 @@ template $FlashcardsCreateCategoryDialog : Adw.AlertDialog {
response => $on_response();
Adw.EntryRow entry {
title: "Category name";
title: _("Category title");
styles [
"card",
]

View File

@@ -16,47 +16,16 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
Adw.NavigationPage sidebar {
title: _("Categories");
Box {
orientation: vertical;
hexpand: true;
Adw.ToolbarView {
width-request: 360;
[top]
Adw.HeaderBar {
[end]
[start]
Gtk.Button {
icon-name: "list-add-symbolic";
clicked => $on_add_category();
}
}
Adw.Clamp {
hexpand: true;
ListBox topics {
hexpand: true;
selection-mode: single;
margin-top: 12;
margin-bottom: 12;
margin-start: 12;
margin-end: 12;
row-selected => $on_category_selected();
styles [
"boxed-list",
]
}
}
}
}
[content]
Adw.NavigationPage content {
title: _("Flashcards");
Box {
orientation: vertical;
hexpand: true;
Adw.HeaderBar {
[end]
Gtk.MenuButton {
icon-name: "open-menu-symbolic";
@@ -64,9 +33,44 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
}
}
Adw.Clamp {
hexpand: true;
content: ScrolledWindow {
ListBox topics {
valign: start;
selection-mode: single;
margin-top: 12;
margin-bottom: 12;
margin-start: 12;
margin-end: 12;
row-selected => $on_category_selected();
styles [
"boxed-list",
]
}
};
}
}
[content]
Adw.NavigationPage content {
title: _("Flashcards");
Adw.ToolbarView {
[top]
Adw.HeaderBar {
[start]
Gtk.Button {
icon-name: "user-trash-symbolic";
clicked => $on_delete_category();
}
[title]
Adw.WindowTitle title {
title: _("Flashcards");
subtitle: _("Test");
}
}
content: Adw.Clamp {
Adw.Bin {
margin-top: 12;
margin-bottom: 12;
@@ -85,7 +89,7 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
label: "Wie viel Grad hat ein Kreis?";
};
}
}
};
}
}
}