Skip to content

Commit

Permalink
library: Adds Adw.AboutWindow entry (#305)
Browse files Browse the repository at this point in the history
* Adds Adw.AboutWindow Demo
* Updated Link
* Updated Code
* Updated Icon
* Added Acknowledgement Section
  • Loading branch information
SoNiC-HeRE committed Jun 13, 2023
1 parent a6b4b6c commit 960276f
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/Library/demos/About Window/main.blp
@@ -0,0 +1,25 @@
using Gtk 4.0;
using Adw 1;

Adw.StatusPage {
title: "About Window";
description: _("A window showing information about the application.");

Box {
orientation: vertical;
halign: center;

Button button {
label: _("About");
margin-bottom: 12;
styles ['pill']
}

LinkButton {
label: "API Reference";
uri: "https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.3/class.AboutWindow.html";
}
}
}


27 changes: 27 additions & 0 deletions src/Library/demos/About Window/main.js
@@ -0,0 +1,27 @@
import Adw from "gi://Adw";
import Gtk from "gi://Gtk";

const parent = workbench.window;
const button = workbench.builder.get_object("button");

function handleClick() {
const dialog = new Adw.AboutWindow({
transient_for: parent,
application_name: "Application",
developer_name: "Developer Name",
license_type: Gtk.License.GPL_3_0_ONLY,
version: "1.2.3",
website: "https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.3",
application_icon: "application-x-executable",
issue_url: "https://gitlab.gnome.org/GNOME/libadwaita/-/issues",
developers: ["Sriyansh Shivam https://linkfree.io/SoNiC-HeRE"],
});

dialog.add_acknowledgement_section(_("Support Workbench"), [
"GitHub https://github.com/sonnyp/Workbench",
]);

dialog.present();
}

button.connect("clicked", handleClick);
7 changes: 7 additions & 0 deletions src/Library/demos/About Window/main.json
@@ -0,0 +1,7 @@
{
"name": "About Window",
"category": "user_interface",
"description": "A window showing information about the application.",
"panels": ["code", "preview"],
"autorun": true
}

0 comments on commit 960276f

Please sign in to comment.