ui: Add "About" window to display version, authors, license, etc.

This adds a new adw::AboutWindow containing information about version, authors, license, links etc.
It is opened via a new menu button in the toolbar, which opens a menu containing an "About Helvum" button.

The version and authors are pulled from the Cargo.toml file.
This commit is contained in:
Tom A. Wagner
2023-09-19 16:12:29 +02:00
parent e92c77f2b1
commit bc006fe393
4 changed files with 72 additions and 16 deletions

View File

@@ -2,6 +2,14 @@
<interface>
<requires lib="gtk" version="4.0"/>
<requires lib="Adw" version="1.0"/>
<menu id="primary_menu">
<section>
<item>
<attribute name="label">_About Helvum</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
</menu>
<template class="HelvumWindow" parent="AdwApplicationWindow">
<property name="default-width">1280</property>
<property name="default-height">720</property>
@@ -12,8 +20,21 @@
<child>
<object class="AdwHeaderBar" id="header_bar">
<child type="end">
<object class="HelvumZoomEntry">
<property name="zoomed-widget">graph</property>
<object class="GtkBox">
<style>
<class name="toolbar"></class>
</style>
<child>
<object class="HelvumZoomEntry">
<property name="zoomed-widget">graph</property>
</object>
</child>
<child>
<object class="GtkMenuButton">
<property name="icon-name">open-menu-symbolic</property>
<property name="menu-model">primary_menu</property>
</object>
</child>
</object>
</child>
</object>