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

Is it possible to replace the color selection dialog? #570

Open
Skif-off opened this issue Oct 13, 2023 · 4 comments
Open

Is it possible to replace the color selection dialog? #570

Skif-off opened this issue Oct 13, 2023 · 4 comments

Comments

@Skif-off
Copy link

Currently Pinta uses a primitive color choose window from GTK4 (2.1.1 from GTK3), it does not contain normal, convenient options: "Red", "Green", "Blue" and "Opacity".
Is there an alternative GTK component? Or maybe some flags that change it?

P.S. Can I use GTK 4.6.9? This is the latest version that available in xUbuntu 22.04 LTS.
I can just change configure.ac, but I don't know all the consequences.

@cameronwhite
Copy link
Member

Yeah, I'm not a huge fan of the GTK color chooser in recent versions. The closest to what you're asking for is if you click the "+" button to choose a custom color, then you can enter a hex code for the color, and right clicking on the various sliders / widgets lets you directly enter in a specific alpha value or HSV color

I wouldn't reject a PR to add a better dialog for Pinta, but it also might be better to go upstream to GTK and try to add missing functionality there so that it helps other apps too

For the question about GTK 4.6, you can give that a try but likely you'll hit some errors at runtime if Pinta tries to call a function that is from newer GTK versions

@Skif-off
Copy link
Author

if you click the "+" button to choose a custom color, then you can enter a hex code for the color

I'm not sure there's a quick and easy way to convert an RGB value to a HEX value in our heads :)

might be better to go upstream to GTK and try to add missing functionality there so that it helps other apps too

I don't know who makes decisions in the GNOME project and how, but some decisions seem strange/ambiguously :) I don't think this can work, moreover, I don’t have ready-made PR.

For the my question about GTK 4.6, I thought maybe this version number was chosen simply because Ubuntu 22.10 contains GTK 4.8.1.
At the moment, I do not have installed applications that require GTK4, so I tried to make a launch with LD_LIBRARY_PATH. But I get a mistake:
Settings schema 'org.gtk.gtk4.Settings.ColorChooser' is not installed.
For some reason, the values of XDG_DATA_DIRS and GSETTINGS_SCHEMA_DIR are ignored. This is not yet clear, I have already used this method with GTK4 and it works (but with C++ app, not C#). I was busy and checked in parallel with other things: now I can’t remember whether I checked with version 4.8.1 too (rebuilded from 22.10) or not :(
I'll think about it, I like Pinta.

@cameronwhite
Copy link
Member

I don't think the GTK 4.8 decision was done based on Ubuntu 22.10. I think it might have been needed to go along with libadwaita 1.2 (which is definitely a requirement), but not 100% sure

@Skif-off
Copy link
Author

Replace default gtk color picker (#1025)!
Just to make it convenient and quick to close this issue after merging :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants