-
-
Notifications
You must be signed in to change notification settings - Fork 90
Library: Add SpinButton Entry #248
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
Conversation
| @@ -0,0 +1,19 @@ | |||
| using Gtk 4.0; | |||
|
|
|||
| Box welcome { | |||
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 use an Adw.StatusPage like most demos
| import Gtk from "gi://Gtk?version=4.0"; | ||
| import GObject from "gi://GObject"; | ||
|
|
||
| Gtk.init(); |
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.
| import Gtk from "gi://Gtk?version=4.0"; | |
| import GObject from "gi://GObject"; | |
| Gtk.init(); | |
| import Gtk from "gi://Gtk"; | |
| import GObject from "gi://GObject"; |
unecessary in Workbench
| const spin_button = new Gtk.SpinButton(); | ||
| const adjustment = new Gtk.Adjustment({ | ||
| lower: 0, | ||
| page_increment: 1, | ||
| step_increment: 1, | ||
| upper: 100, | ||
| value: 0, | ||
| }); | ||
|
|
||
| spin_button.set_adjustment(adjustment); |
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.
Why in a separate window? Please move directly to the main.blp so it's clear how to use with Blueprint and so that there is no need to click a button.
There is already an example in Workbench on how to use adjustment with blueprint.
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.
That means I do not need to create a .js file since the spin button is created with blueprint, right?
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.
we still need the .js file to demonstrate the APIs
Perhaps the JavaScript could log the value when it changes?
| styles["pill"] | ||
| } | ||
|
|
||
| } |
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 links to online resources are missing
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 also add the HIG link like on other entries
https://developer.gnome.org/hig/patterns/controls/spin-buttons.html
| { | ||
| "name": "Spin Button", | ||
| "category": "user_interface", | ||
| "description": "Spin Button allows users to increment or decrement the displayed value of an attribute. ", |
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.
| "description": "Spin Button allows users to increment or decrement the displayed value of an attribute. ", | |
| "description": "Let users choose a precise numerical value.", |
| "code", | ||
| "preview" |
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.
Once we move the SpinButton to main.blp, the ui becomes more important.
| "code", | |
| "preview" | |
| "ui", | |
| "preview" |
|
please also revert changes to |
Added Adw.StatusPage
Added API reference
Created spinbutton using blueprint ui
Can you please explain what you mean? |
05f69f1 to
55e450f
Compare
If you look at the diff of this PR, there is a change to blueprint-compiler. In general, any change that cannot be explained doesn't belong in a contribution. You can solve it by merging Feel free to come by in the group chat if you need help. And sorry for the late response 🙃 |

Fixes #311