mbasaglia / Qt-Color-Widgets

Color wheel widget and dialog for Qt
147 stars 54 forks source link

Add a syringe to pick colours as in gtk/kde colour pickers? #6

Closed ghost closed 11 years ago

ghost commented 11 years ago

The absence of such a feature in a pure Qt system is annoying when one tries to customise the system colours. The only app for such a custumisation is qtconfig and its colour choser is useless. Yours is very close except for that syringe thing. Razor-qt panel has such a syringe as an applet. If it's not unpractical for you adding that shringe would make Qt users community happier!

mbasaglia commented 11 years ago

I've tested it and seems easy enough to implement.

How do you think this should be implemented: as a self-standing widget (child of a QPushButton maybe), or just integrated into the dialog?

ghost commented 11 years ago

Great. Really it should ideally replace all other colour pickers in Qt apps, especially the one in the Qtconfig, but since this is impossible, it can be just a self-standing widget. Other Qt pickers seem to accept the drag-dropping of colours from the GTK one, so self-standing one should be good.

That said, being just an ordinary user, I've got no idea about QPushButton or integration into the dialog. Can you elaborate a bit?

mbasaglia commented 11 years ago

I can make it as a button that can be used in other places as well (like custom dialogs and such). Or give make functionality specific to the dialog.

The implementation of this feature seems trivial, so I don't know if is an overkill to create a button that does just that.

ghost commented 11 years ago

Like that:

I'll put the stand-alone Qt-Color-Picker app (as seen on your screen shot) on my panel or launch it from the applications menu. Once launched, instead of your current screen shot, I'll see the newly implemented/added syringe thing as well (just like kcolorchoser or the GTK one). That way, when I like a color seen in a web page for instance or elsewhere, I'll just click on the syringe icon in Qt-Color-Picker. Doing this changes the cursor to the plus sign. Then I'll click this plus-cursor on the colour (i.e. pick the colour) I like, then click again on the colour area of Qt-Color-Picker. So that I'll have picked a colour I like to use very easily, having all the relevant infos (hex, rgb etc.).

Sorry for this moron talking, but it's the only way I can clearly state what I mean!

Better than the above would be having Qt-Color-Picker popped-up whenever I click a colour dialogue in a Qt app, for instance in Juffed, but especially in Qtconfig, but that's impossible I guess.

ghost commented 11 years ago

Sorry for that incorrect part:

"Doing this changes the cursor to the plus sign. Then I'll click this plus-cursor on the colour (i.e. pick the colour) I like, then click again on the colour area of Qt-Color-Picker."

No need to "then click again on the colour area of Qt-Color-Picker".

mbasaglia commented 11 years ago

OK, got it. Should be fine to have it just in the dialog. I've added it in the repo.

ghost commented 11 years ago

Thanks so much.

ghost commented 11 years ago

Sorry to bother, but I'd just like to say that it's excellent, and so quick. It's incomprehensible that the huge Qt developers army hasn't implemented such a feature while KDE and GTK have it for years and while you've just done it in an instant. Really apreciated. Will promote it (at least) in Manjaro forum and may try to learn how to create an AUR package just for Qt-Color-Picker.

mbasaglia commented 11 years ago

I'm glad that you find my widget useful.

GTK was born to make graphical applications so that's explains why it has many color-related widgets. Qt indeed lacks in that field. The default color dialog is quite depressing...

ghost commented 11 years ago

Indeed. Apart from this syringe, it lacks hex numbering as well. Nature bless you! Thanks.

ghost commented 11 years ago

http://forum.manjaro.org/index.php?topic=6791.msg59277#msg59277 https://groups.google.com/forum/?hl=en#!topic/razor-qt/Ud5ooBGYMN4