Gui: Colorful/Greyable overlay status in icons
=============================================== Before this implementation, specific status via former mergeOverlayIcon() was greyed out with the visibility. With this commit, the developer has two options: a) override mergeGreyableOverlayIcons, in which case the overlay will be greyed out when the item is greyed out as per former mergeOverlayIcon() b) override mergeColorfulOverlayIcons, in which case the overlay will be superimposed after the icon is greyed out as it is the case for stardard error and recompute flags.
This commit is contained in:
committed by
abdullahtahiriyo
parent
035bea5082
commit
87c9f83bd6
@@ -302,10 +302,10 @@ void ViewProvider::update(const App::Property* prop)
|
||||
|
||||
QIcon ViewProvider::getIcon(void) const
|
||||
{
|
||||
return mergeOverlayIcons (Gui::BitmapFactory().pixmap(sPixmap));
|
||||
return mergeGreyableOverlayIcons (Gui::BitmapFactory().pixmap(sPixmap));
|
||||
}
|
||||
|
||||
QIcon ViewProvider::mergeOverlayIcons (const QIcon & orig) const
|
||||
QIcon ViewProvider::mergeGreyableOverlayIcons (const QIcon & orig) const
|
||||
{
|
||||
auto vector = getExtensionsDerivedFromType<Gui::ViewProviderExtension>();
|
||||
|
||||
@@ -313,7 +313,21 @@ QIcon ViewProvider::mergeOverlayIcons (const QIcon & orig) const
|
||||
|
||||
for (Gui::ViewProviderExtension* ext : vector) {
|
||||
if (!ext->ignoreOverlayIcon())
|
||||
overlayedIcon = ext->extensionMergeOverlayIcons(overlayedIcon);
|
||||
overlayedIcon = ext->extensionMergeGreyableOverlayIcons(overlayedIcon);
|
||||
}
|
||||
|
||||
return overlayedIcon;
|
||||
}
|
||||
|
||||
QIcon ViewProvider::mergeColorfulOverlayIcons (const QIcon & orig) const
|
||||
{
|
||||
auto vector = getExtensionsDerivedFromType<Gui::ViewProviderExtension>();
|
||||
|
||||
QIcon overlayedIcon = orig;
|
||||
|
||||
for (Gui::ViewProviderExtension* ext : vector) {
|
||||
if (!ext->ignoreOverlayIcon())
|
||||
overlayedIcon = ext->extensionMergeColorfullOverlayIcons(overlayedIcon);
|
||||
}
|
||||
|
||||
return overlayedIcon;
|
||||
|
||||
Reference in New Issue
Block a user