Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
library: Adds Adw.AboutWindow entry (#305)
* Adds Adw.AboutWindow Demo * Updated Link * Updated Code * Updated Icon * Added Acknowledgement Section
- Loading branch information
1 parent
a6b4b6c
commit 960276f
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "About Window", | ||
"category": "user_interface", | ||
"description": "A window showing information about the application.", | ||
"panels": ["code", "preview"], | ||
"autorun": true | ||
} |