A new KColorCombo fro KDE 4?

Nicolas Goutte nicolasg at snafu.de
Wed Aug 10 17:08:52 BST 2005


On Tuesday 09 August 2005 20:32, Sébastien Laoût wrote:
> Hello,
>
> IMHO, the KColorCombo widget is not too usable.
> It presents too few color choice and we have to scroll to view all choices.
> The presented colors are not beautiful (they are dark colors from old
> terminals), so the "Custom..." entry always need to be used to make a good
> choice (and KColorDialog propose a to big amount of choice).
>
> For my program, I created a new ColorCombo for a better usability
> experience.
>
> And I found it could replace the standard KColorCombo.
>
> You can find the sources, a screenshot, and the API docs in the attached
> archive.
>
> As you can see on the screenshot, it is a combobox that, when popuped-up,
> present a rainbow (a better way to arrange colors for the user) array of
> colors with different brightness (from very light, for background colors,
> to very dark, for text colors, or the inverse for people who prefers
> white-on-black display).

Can you make a Gimp palette out of your colours, so that it can be added as 
new palette in the normal colour dialog.

> There is the possibility to select a default color (eg. use standard KDE
> background color...) or choose in the entire spectre with a KColorDialog.
> I tryed to make the API complete and simple enougth.
>
> This works but isn't yet finished:
> * It need to work in RTL environement, and have a min-size for the popup
> * Painting should be optimized to redraw only changed colors instead of
>   everything (it's why the current one can be slow with a big array of
> colors) * Dragging a color is possible only when the popup is open
> * Selected color should span all the combobox width
> * Add a setDefaultText() call to replace the "(Default)" string with a more
>   suited string like "(Standard Background)"...
>
> I would want to know your opinion on that.
> * Can it replace KComboBox in KDE 4?

> * Can it be introduced as a complement in KDE 3.5?
> * Is the API right?

We are beyond feature freeze. So if you replace the class in KDE 3.5, be 
careful to check the applications that have been changed.

> * Is it necessary to include the old KComboBox colors preset or was it here
>   just because a default preset was needed?

From what I see by a quick look into the code, the default colours are the 
standard colours. So I suppose that they are needed, for tasks like Web pages 
where you want to be sure to use standard colours.

> * The KWord color selected have names on the colors. Is it needed?

Personally I have never found the names useful and they are a translator's 
nighmare. (But the named colours in the normal colour dialog box are a 
translators' nighmare too (and the two groups of names are different!))

>
> The popup could even be made independant, so KWord could use it for theire
> colors drop-down toolbar tools...

Have a nice day!





More information about the kde-core-devel mailing list