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 Button entry #198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in general this should split out the different types of buttons a bit more, it's mixing things too much. I'd not make them all pill buttons, and have separate buttons for showing the main types of buttons. I'd try a grid with normal, suggested, destructive, etc. similar to what's in the style classes demo in libadwaita.
I'd also not show .flat buttons here, because they're a special thing mainly to be used in constrained environments like toolbars/headerbars.
src/Library/demos/Button/main.blp
Outdated
|
||
Adw.StatusPage{ | ||
title: "Button"; | ||
description: "A simple way to trigger an event"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Allow people to perform actions by clicking"
src/Library/demos/Button/main.json
Outdated
{ | ||
"name": "Button", | ||
"category": "user_interface", | ||
"description": "A simple way to trigger an event", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/app.gresource.xml
Outdated
<file>Library/demos/Button/main.blp</file> | ||
<file>Library/demos/Button/main.json</file> | ||
<file>Library/demos/Button/main.js</file> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed anymore (you will have to merge main into your branch)
src/Library/demos/Button/main.blp
Outdated
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please take care of the indentation until it's automated
it should be 2 spaces
src/Library/demos/Button/main.js
Outdated
dialog.present(); | ||
} | ||
|
||
test_button.connect("clicked", handle_click); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the dialog is a bit annoying while testing because the user needs to close the modal to proceed - it is 'blocking'
Also Gtk.MessageDialog
will be deprecated in GTK 4.10
I don't have a much better idea - I'd say console.log("Hello, World!");
is enough for now
Okay understood. I'll make the necessary changes. |
Further to enhance the design i intend to smaller the icon-buttons respective to the class buttons but somehow due to the grid the buttons scale equally. |
Applied Changes to match styling as of Adwaita Demo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I did some cleanups before merging 8f5fc6e
FlowBox
didn't do anything useful and I simplified a bit the JS code
Created Button Demo under User Interface Section in Library
Issue workbenchdev/demos#3