Skip to content
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

Merged
merged 4 commits into from
Nov 11, 2023
Merged

Conversation

gregorni
Copy link
Contributor

Doesn't work yet. Somehow Gdk.RGBA doesn't properly set the color values, only to (0,0,0,0)


def on_selected(_portal, task):
r, g, b = _portal.pick_color_finish(task)
print(r, g, b)
Copy link
Contributor

Choose a reason for hiding this comment

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

Forgotten debug print?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, yes, woops 😬

@theCapypara
Copy link
Contributor

The PyGObject bindings for RGBA do not take arguments anymore. See: https://gitlab.gnome.org/GNOME/pygobject/-/issues/560#note_1607269

@gregorni
Copy link
Contributor Author

@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.

Copy link
Contributor

@theCapypara theCapypara left a 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!

@theCapypara theCapypara marked this pull request as ready for review November 11, 2023 17:23
@theCapypara theCapypara merged commit 9d99189 into main Nov 11, 2023
1 check passed
@theCapypara theCapypara deleted the color-picker-python branch November 11, 2023 17:27
lw64 pushed a commit that referenced this pull request Dec 18, 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.

3 participants