Commit ccf57c33 authored by Alessandro Portale's avatar Alessandro Portale

Icons: Use theme color for disabled icon state

The color role was already availabe in Utils::Theme, but
Utils::Icon didn't yet make use of it. That was a bug.

Change-Id: Ifb99e08567223c0999296fde34f61de21b764b14
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent f1ccad12
...@@ -6,7 +6,7 @@ DefaultTextEditorColorScheme=dark.xml ...@@ -6,7 +6,7 @@ DefaultTextEditorColorScheme=dark.xml
[Palette] [Palette]
shadowBackground=ff232323 shadowBackground=ff232323
text=ffe7e7e7 text=ffe7e7e7
textDisabled=ffa0a0a0 textDisabled=ff909090
hoverBackground=ff515151 hoverBackground=ff515151
selectedBackground=ff151515 selectedBackground=ff151515
normalBackground=ff333333 normalBackground=ff333333
......
...@@ -184,8 +184,7 @@ QIcon Icon::icon() const ...@@ -184,8 +184,7 @@ QIcon Icon::icon() const
const QPixmap combinedMask = Utils::combinedMask(masks, m_style); const QPixmap combinedMask = Utils::combinedMask(masks, m_style);
result.addPixmap(masksToIcon(masks, combinedMask, m_style)); result.addPixmap(masksToIcon(masks, combinedMask, m_style));
QColor disabledColor = creatorTheme()->palette().mid().color(); const QColor disabledColor = creatorTheme()->color(Theme::IconsDisabledColor);
disabledColor.setAlphaF(0.6);
result.addPixmap(maskToColorAndAlpha(combinedMask, disabledColor), QIcon::Disabled); result.addPixmap(maskToColorAndAlpha(combinedMask, disabledColor), QIcon::Disabled);
return result; return result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment