Skip to content

Conversation

@Kodecheff
Copy link

@Kodecheff Kodecheff commented Mar 23, 2023

Fixes #311

@@ -0,0 +1,19 @@
using Gtk 4.0;

Box welcome {
Copy link
Contributor

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

Comment on lines 1 to 4
import Gtk from "gi://Gtk?version=4.0";
import GObject from "gi://GObject";

Gtk.init();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Comment on lines 9 to 18
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);
Copy link
Contributor

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.

Copy link
Author

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?

Copy link
Contributor

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"]
}

}
Copy link
Contributor

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

Copy link
Contributor

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. ",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Spin Button allows users to increment or decrement the displayed value of an attribute. ",
"description": "Let users choose a precise numerical value.",

Comment on lines 6 to 7
"code",
"preview"
Copy link
Contributor

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.

Suggested change
"code",
"preview"
"ui",
"preview"

@sonnyp
Copy link
Contributor

sonnyp commented Mar 23, 2023

please also revert changes to blueprint-compiler

Added Adw.StatusPage
Added API reference
Created spinbutton using blueprint ui
@sonnyp sonnyp mentioned this pull request Mar 26, 2023
@sonnyp sonnyp self-assigned this Mar 26, 2023
@Kodecheff
Copy link
Author

please also revert changes to blueprint-compiler

Can you please explain what you mean?

@sonnyp sonnyp force-pushed the main branch 3 times, most recently from 05f69f1 to 55e450f Compare May 21, 2023 10:37
@sonnyp sonnyp assigned Kodecheff and unassigned sonnyp May 28, 2023
@sonnyp
Copy link
Contributor

sonnyp commented May 28, 2023

Can you please explain what you mean?

If you look at the diff of this PR, there is a change to blueprint-compiler.

image

In general, any change that cannot be explained doesn't belong in a contribution.

You can solve it by merging main into your branch. It doesn't have blueprint-compiler anymore.

Feel free to come by in the group chat if you need help.

And sorry for the late response 🙃

@sonnyp sonnyp mentioned this pull request Jun 10, 2023
@sonnyp
Copy link
Contributor

sonnyp commented Jun 15, 2023

#312

@sonnyp sonnyp closed this Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SpinButton entry

2 participants