ui: rewrite help overlay in blueprint

This commit is contained in:
0xMRTT 2023-05-22 21:28:46 +02:00
parent 7ea98afa48
commit 4d2d2b49b8
Signed by: 0xMRTT
GPG Key ID: 910B287304120902
3 changed files with 35 additions and 41 deletions

34
data/ui/help-overlay.blp Normal file
View File

@ -0,0 +1,34 @@
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", "Imagine");
action-name: "app.ask";
}
ShortcutsShortcut {
title: C_("shortcut window", "Show Shortcuts");
action-name: "win.show-help-overlay";
}
ShortcutsShortcut {
title: C_("shortcut window", "Preferences");
action-name: "app.preferences";
}
ShortcutsShortcut {
title: C_("shortcut window", "Quit");
action-name: "app.quit";
}
}
}
}

View File

@ -1,41 +0,0 @@
<?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">Imagine</property>
<property name="action-name">app.ask</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>
<child>
<object class="GtkShortcutsShortcut">
<property name="title" translatable="yes" context="shortcut window">Preferences</property>
<property name="action-name">app.preferences</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -1,5 +1,6 @@
blueprints = custom_target('blueprints',
input: files(
'help-overlay.blp',
'preferences.blp',
'window.blp',
),