A new KColorCombo fro KDE 4?
Sébastien Laoût
slaout at linux62.org
Tue Aug 9 19:32:09 BST 2005
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).
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?
* Is it necessary to include the old KComboBox colors preset or was it here
just because a default preset was needed?
* The KWord color selected have names on the colors. Is it needed?
The popup could even be made independant, so KWord could use it for theire
colors drop-down toolbar tools...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CommonColorSelector.tar.bz2
Type: application/x-tbz
Size: 27036 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050809/3f202fd0/attachment.bin>
More information about the kde-core-devel
mailing list