KMessageWidget: Remove decoration icon
Review Request #110327 - Created May 6, 2013 and submitted
|dolphin, kate, kdelibs|
This avoids confusion between the decoration icon and the close button, especially when type is KMessageWidget::Error. This happens for example with Dolphin when an error happens while trying to connect to an non available host. This change also has the nice side-effect of leaving more space for the widget text.
Tested with kmessagewidgetdemo, Dolphin and Kate.
Semi-OT (sorry) - what makes this thing appear "on top" of things (below the toolbar) - and why? In a NW gravity world, this means the UI is shifted downwards "under the users fingers" (no matter where you are, the poaint where your mouse was will be ~128px lower as soon as this appears - untriggered) a) Is moving it to the bottom in the cards? b) Is it in the cards for 4.11?
The patch itself is fine and most likely does not introduce regressions in terms of misbehavior. Still, is never showing an icon the way to go? Another way to work around this by default would be an additional function called KMessageWidget::setShowIcon(bool). In fact, I've recently been thinking that being able to set custom icons also may be a good idea, along with setting a custom color for the message widget. Maybe one could ex extend MessageType, i.e.: setMessageType(Custom). Along with setIcon() and setPalette() or similar. Then, the developer would have more control over the colors showing up in the Kate views. A disadvantage of this is, however, that this leads to inconsistent ui's. It this is needed, this patch works against this, though.
Given the posted screenshot, setting a unique icon is certainly a plus, since the colored background already serves as incident indicator (like a very heavily blurred watermark ;-) but this way actually even diminishes the related icon (the yellow triangle is rather lost on the yellow background and a disk or folder would work much better and provide additional information)