Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

library: Adds Adw.AboutWindow entry #305

Merged
merged 5 commits into from Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
}