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: Add Header Bar entry #260

Merged
merged 6 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions src/Library/demos/Header Bar/main.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
using Gtk 4.0;
using Adw 1;

Gtk.Window {
default-width: 800;
default-height: 600;
title: _("Header Bar");
titlebar: Adw.HeaderBar {
centering-policy: strict;
show-start-title-buttons: true;
show-end-title-buttons: true;
decoration-layout: "icon:minimize,close";

[start]
Button {
label: _("Open");
}
[start]
Button {
icon-name: "tab-new-filled-symbolic";
}
[end]
MenuButton {
icon-name: "view-more-symbolic";
menu-model: window_menu;
}
[end]
Button {
icon-name: "loupe-large-symbolic";
}
};

Adw.StatusPage {
title: "Header Bar";
description: _("Custom titlebars for windows");

Box{
orientation:vertical;

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

LinkButton {
label: "Human Interface Guidelines";
uri: "https://developer.gnome.org/hig/patterns/containers/header-bars.html";
}
}
}
}

menu window_menu {
section {
item {
label: _("Keyboard Shortcuts");
action: "app.shortcuts";
}

item {
label: _("About App");
action: "app.about";
}
}
}
10 changes: 10 additions & 0 deletions src/Library/demos/Header Bar/main.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Header Bar",
"category": "user_interface",
"description": "Custom titlebars for windows",
"panels": [
"ui",
"preview"
],
"autorun": true
}