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
Could you use KColorDialog::setDefaultColor()?
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.
It is not a hack, it is defined API. And where in the Colors KCM is inheritance used?
If you can provide the information requested in comment #3 please add a comment or reopen the bug.
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.
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.