Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create a Scrollbar Folder in demos add a main.blp, a main.css, a main.js and a main.json file implement basic display of a scrollbar and style it * add a default status page that can be customized * Add dynamism on the status page add test cases and different displays based on input update the main.json file with sample data * move the scrollbar demo to a different feature * add the missing js components in Blueprint * take out uneccessary lines in main.js * change the color in main.css to a named color * debug a persistent file issue * made recommended fixes * update widgets to follow Gnome standards Display not consistent with what was required Help in centralising all content and increasing the size of the search field * format the code to meet gnome standards * fix: dangling comma in JSON --------- Co-authored-by: Andy Holmes <andrew.g.r.holmes@gmail.com>
- Loading branch information
1 parent
51009c7
commit 98d7abb
Showing
4 changed files
with
69 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,44 @@ | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
Box { | ||
orientation: vertical; | ||
margin-top: 10; | ||
vexpand:true; | ||
|
||
Box { | ||
spacing: 12; | ||
orientation:horizontal; | ||
halign:center; | ||
|
||
Entry entry_1 { | ||
placeholder-text: _("Type to Start Searching… (Keywords: Error, No results)"); | ||
} | ||
|
||
Button submit_button { | ||
name: "submit"; | ||
label: _("Submit"); | ||
} | ||
} | ||
|
||
Adw.StatusPage content { | ||
title: _("No results found"); | ||
description: _("Try a different Search."); | ||
icon-name: 'edit-find-symbolic'; | ||
|
||
Box { | ||
margin-top: 18; | ||
orientation:horizontal; | ||
halign:center; | ||
|
||
LinkButton { | ||
label: "API Reference"; | ||
uri: "https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.0.0-alpha.1/class.StatusPage.html"; | ||
} | ||
LinkButton { | ||
label: " Entry Tutorial"; | ||
uri: "https://developer.gnome.org/documentation/tutorials/beginners/components/entry.html"; | ||
} | ||
} | ||
} | ||
} |
Empty file.
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,15 @@ | ||
const content = workbench.builder.get_object("content"); | ||
const entry = workbench.builder.get_object("entry_1"); | ||
const button = workbench.builder.get_object("submit_button"); | ||
|
||
button.connect("clicked", () => { | ||
const text = entry.get_text(); | ||
if (text === "Error") { | ||
content.title = "Error connecting to server"; | ||
} else if (text === "No results") { | ||
content.title = "No results found"; | ||
} else { | ||
content.title = "No content available for this keyword."; | ||
} | ||
}); | ||
|
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,10 @@ | ||
{ | ||
"name": "Status Page", | ||
"category": "user_interface", | ||
"description": "A page used for empty/error states and similar use-cases.", | ||
"panels": [ | ||
"ui", | ||
"preview" | ||
], | ||
"autorun": true | ||
} |