Skip to content

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

Closed

Description

@Skif-off

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.

Activity

  1. cameronwhite commented on Oct 14, 2023

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

  2. Skif-off commented on Oct 15, 2023

    @Skif-off
    ContributorAuthor

    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.

  3. cameronwhite commented on Oct 16, 2023

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

  4. Skif-off commented on Nov 30, 2024

    @Skif-off
    ContributorAuthor

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

  5. linked a pull request that will close this issueReplace default gtk color picker #1025on Dec 10, 2024
  6. added this to the 2.2 milestone on Dec 24, 2024
  7. cameronwhite commented on Dec 24, 2024

    @cameronwhite
    Member

    The new color picker dialog is now merged

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions