-
-
Notifications
You must be signed in to change notification settings - Fork 90
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: Port 'Color Picker' to Python #741
Conversation
|
||
def on_selected(_portal, task): | ||
r, g, b = _portal.pick_color_finish(task) | ||
print(r, g, b) |
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.
Forgotten debug print?
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.
Oh, yes, woops 😬
The PyGObject bindings for RGBA do not take arguments anymore. See: https://gitlab.gnome.org/GNOME/pygobject/-/issues/560#note_1607269 |
@theCapypara Thanks, that was the problem. My latest commit fixes the problem, although it somehow feels a bit weird, not sure if it's deviating too much from the JS version. |
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.
LGTM! The way you assign to RGBA now looks fine to me as well. Thank you!
Doesn't work yet. Somehow
Gdk.RGBA
doesn't properly set the color values, only to(0,0,0,0)