Bug 253239 - Using KColorDialog, you are not able to select “inherit color”
Summary: Using KColorDialog, you are not able to select “inherit color”
Status: RESOLVED NOT A BUG
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdeui (show other bugs)
Version: 4.5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-04 17:10 UTC by Philipp A.
Modified: 2010-10-09 22:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Qt designer showing the UI difference (12.41 KB, image/png)
2010-10-04 17:10 UTC, Philipp A.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp A. 2010-10-04 17:10:45 UTC
Created attachment 52217 [details]
Qt designer showing the UI difference

Version:           4.5 (using KDE 4.5.1) 
OS:                Linux

Many utilizations of the color selection dialog need a option to select “inherit”, e.g. when you want to define a KDE color scheme which uses the same link colors for all elements.

KColorDialog does not have it, so it needs superfluous extra UI elements like the ones shown in the left half of the screenshot. (Or they simply leave the feature out and enable it only via textfile-hacking)

Reproducible: Always
Comment 1 Christoph Feck 2010-10-04 17:27:28 UTC
Could you use KColorDialog::setDefaultColor()?
Comment 2 Philipp A. 2010-10-04 18:08:30 UTC
i was not aware of this hack. does this mean that if you do the following…

someKCD::setDefaultColor();

…it displays a “use default color” option and sets this default color to a invalid color, so that you can check if the color returned is invalid and use the inherited instead?

if so, somebody should tell the developers of e.g. systemsettings (for the color scheme pane), because they don’t seem to know.
Comment 3 Christoph Feck 2010-10-06 12:30:36 UTC
It is not a hack, it is defined API.

And where in the Colors KCM is inheritance used?
Comment 4 Christoph Feck 2010-10-09 14:49:22 UTC
If you can provide the information requested in comment #3 please add a comment or reopen the bug.
Comment 5 Philipp A. 2010-10-09 16:18:49 UTC
i apolologize for being very vague, but in at least one of the kde versions from 4.2 to 4.4 i applied a preinstalled theme. some kColorButtons on other pages than “general colors” had text on them (instead of a color swatch), either “inherit”, or sth. similar.

so i’m sure there is (or was) a way to specify that a color should be inherited instead of using a specific one.

but that would be a kcm bug, not a kcolordialog bug.
Comment 6 Christoph Feck 2010-10-09 22:59:16 UTC
The colors KCM works differently. It does not use inheritance, but allows you to change several text colors at once using the Common set. When you then later change some of those text colors individually in the other color sets (View, Window, Button, etc.) then in Common it will display "Varies" to indicate that the color is not equal in all sets. You cannot make a QColorButton display multiple colors at once.