summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-08-01 21:22:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-08-02 09:44:40 +0200
commit40b18263e71921a5bb4f219b2098022a5bbbad19 (patch)
tree3725643a6cf1d42f307b894d4c8c6de6a0e580f4 /vcl
parent7f38fabe3f723c85482c91ce6586e38081ee013f (diff)
DrawButtonFlags::NoImage never set
Change-Id: I7ad7dbadad3bff1fe60b4aa9950bf1ec6a902835 Reviewed-on: https://gerrit.libreoffice.org/76828 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/button.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 1c1b673770d3..a46ab29fc08a 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -218,7 +218,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
bool bAddImageSep)
{
OUString aText(GetText());
- bool bDrawImage = HasImage() && ! (ImplGetButtonState() & DrawButtonFlags::NoImage);
+ bool bDrawImage = HasImage();
bool bDrawText = !aText.isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText);
bool bHasSymbol = pSymbolRect != nullptr;
@@ -1618,7 +1618,7 @@ Size PushButton::CalcMinimumSize() const
else
aSize = Size( 26, 24 );
}
- else if ( Button::HasImage() && ! (ImplGetButtonState() & DrawButtonFlags::NoImage) )
+ else if ( Button::HasImage() )
aSize = GetModeImage().GetSizePixel();
if( mnDDStyle == PushButtonDropdownStyle::MenuButton ||
mnDDStyle == PushButtonDropdownStyle::SplitMenuButton )
@@ -2016,7 +2016,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
if ( !maImage )
{
if ( ( !aText.isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) ) ||
- ( HasImage() && ! (ImplGetButtonState() & DrawButtonFlags::NoImage) ) )
+ HasImage() )
{
DrawTextFlags nTextStyle = Button::ImplGetTextStyle( nWinStyle, nDrawFlags );
@@ -2847,7 +2847,7 @@ Size RadioButton::CalcMinimumSize() const
aSize.AdjustHeight(8);
}
- if (Button::HasImage() && !(ImplGetButtonState() & DrawButtonFlags::NoImage))
+ if (Button::HasImage())
{
Size aImgSize = GetModeImage().GetSizePixel();
aSize = Size(std::max(aImgSize.Width(), aSize.Width()),
@@ -3033,7 +3033,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
pDev->IntersectClipRegion( tools::Rectangle( rPos, rSize ) );
if ( ( !aText.isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) ) ||
- ( HasImage() && ! (ImplGetButtonState() & DrawButtonFlags::NoImage) ) )
+ ( HasImage() ) )
{
DrawTextFlags nTextStyle = Button::ImplGetTextStyle( nWinStyle, nDrawFlags );