From 6aeee0b8faa5e7e88f593532f728d1c4c2f1b002 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 23 Jul 2015 10:43:16 -0300 Subject: [PATCH] Show opacity when brush is an image (ignoring the ink type) --- src/app/ui/context_bar.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/ui/context_bar.cpp b/src/app/ui/context_bar.cpp index a417cd7e1..815c0c831 100644 --- a/src/app/ui/context_bar.cpp +++ b/src/app/ui/context_bar.cpp @@ -1091,14 +1091,19 @@ void ContextBar::updateForTool(tools::Tool* tool) (tool->getController(0)->isFreehand() || tool->getController(1)->isFreehand()); + bool showOpacity = + (supportOpacity) && + ((isPaint && (hasInkWithOpacity || hasImageBrush)) || + (isEffect)); + // Show/Hide fields m_brushType->setVisible(supportOpacity && (!isFloodfill || (isFloodfill && hasImageBrush))); m_brushSize->setVisible(supportOpacity && !isFloodfill && !hasImageBrush); m_brushAngle->setVisible(supportOpacity && !isFloodfill && !hasImageBrush && hasBrushWithAngle); m_brushPatternField->setVisible(supportOpacity && hasImageBrush); m_inkType->setVisible(hasInk && !hasImageBrush); - m_inkOpacityLabel->setVisible(hasInkWithOpacity && supportOpacity); - m_inkOpacity->setVisible(hasInkWithOpacity && supportOpacity); + m_inkOpacityLabel->setVisible(showOpacity); + m_inkOpacity->setVisible(showOpacity); m_eyedropperField->setVisible(isEyedropper); m_autoSelectLayer->setVisible(isMove); m_freehandBox->setVisible(isFreehand && supportOpacity);