[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - include/vcl sfx2/source vcl/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 21 15:28:18 UTC 2019
include/vcl/button.hxx | 5 -
sfx2/source/dialog/infobar.cxx | 7 +
vcl/source/control/button.cxx | 148 ++++++++++++++++++++---------------------
3 files changed, 83 insertions(+), 77 deletions(-)
New commits:
commit 99e0e14d2441c44b554608da416f3cd3b2207521
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Nov 18 13:33:31 2019 +0100
Commit: Xisco FaulĂ <xiscofauli at libreoffice.org>
CommitDate: Thu Nov 21 16:27:14 2019 +0100
tdf#84183 Give infobar close btn some 'clicked' state
Slightly smaller cross when the button is clicked on to have
some feedback for the user
Change-Id: If0486319e9816378b2011bbb366b4c577c1ad84a
Reviewed-on: https://gerrit.libreoffice.org/83087
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
(cherry picked from commit 60c0874227201310c099fb717c0a665dbcf5bb33)
Reviewed-on: https://gerrit.libreoffice.org/83190
Reviewed-by: Xisco FaulĂ <xiscofauli at libreoffice.org>
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index c39c466d1afe..b0b2884c9ad0 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -47,8 +47,6 @@ private:
Button (const Button &) = delete;
Button & operator= (const Button &) = delete;
public:
- SAL_DLLPRIVATE DrawButtonFlags ImplGetButtonState() const;
- SAL_DLLPRIVATE DrawButtonFlags& ImplGetButtonState();
SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( WinBits nWinStyle, DrawFlags nDrawFlags );
SAL_DLLPRIVATE void ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size& rSize,
sal_uLong nImageSep,
@@ -81,6 +79,9 @@ public:
bool HasImage() const;
void SetImageAlign( ImageAlign eAlign );
ImageAlign GetImageAlign() const;
+ DrawButtonFlags GetButtonState() const;
+ DrawButtonFlags& GetButtonState();
+
bool IsSmallSymbol() const;
void SetSmallSymbol();
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 84ab3d85f8d0..8fc9f6c32fe1 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -23,6 +23,7 @@
#include <sfx2/viewsh.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
+#include <vcl/decoview.hxx>
using namespace std;
using namespace drawinglayer::geometry;
@@ -113,11 +114,15 @@ public:
void SfxCloseButton::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&)
{
+ Point aBtnPos(0, 0);
+ if (GetButtonState() & DrawButtonFlags::Pressed)
+ aBtnPos.Move(Size(1, 1));
+
const ViewInformation2D aNewViewInfos;
const unique_ptr<BaseProcessor2D> pProcessor(
createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos));
- const ::tools::Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel()));
+ const ::tools::Rectangle aRect(aBtnPos, PixelToLogic(GetSizePixel()));
drawinglayer::primitive2d::Primitive2DContainer aSeq(2);
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 6eb27669f306..53eaa3ff6b0c 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -480,12 +480,12 @@ const tools::Rectangle& Button::ImplGetFocusRect() const
return mpButtonData->maFocusRect;
}
-DrawButtonFlags& Button::ImplGetButtonState()
+DrawButtonFlags& Button::GetButtonState()
{
return mpButtonData->mnButtonState;
}
-DrawButtonFlags Button::ImplGetButtonState() const
+DrawButtonFlags Button::GetButtonState() const
{
return mpButtonData->mnButtonState;
}
@@ -588,7 +588,7 @@ void PushButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
Button::ImplInit( pParent, nStyle, nullptr );
if ( nStyle & WB_NOLIGHTBORDER )
- ImplGetButtonState() |= DrawButtonFlags::NoLightBorder;
+ GetButtonState() |= DrawButtonFlags::NoLightBorder;
ImplInitSettings( true );
}
@@ -792,7 +792,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
}
else
{
- aColor = isAction() ? ((ImplGetButtonState() & DrawButtonFlags::Default)
+ aColor = isAction() ? ((GetButtonState() & DrawButtonFlags::Default)
? rStyleSettings.GetDefaultActionButtonTextColor()
: rStyleSettings.GetActionButtonTextColor())
: rStyleSettings.GetButtonTextColor();
@@ -883,7 +883,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
{
HideFocus();
- DrawButtonFlags nButtonStyle = ImplGetButtonState();
+ DrawButtonFlags nButtonStyle = GetButtonState();
Size aOutSz(GetOutputSizePixel());
tools::Rectangle aRect(Point(), aOutSz);
tools::Rectangle aInRect = aRect;
@@ -945,11 +945,11 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
if (mbPressed || mbIsActive)
nState |= ControlState::PRESSED;
- if (ImplGetButtonState() & DrawButtonFlags::Pressed)
+ if (GetButtonState() & DrawButtonFlags::Pressed)
nState |= ControlState::PRESSED;
if (HasFocus())
nState |= ControlState::FOCUSED;
- if (ImplGetButtonState() & DrawButtonFlags::Default)
+ if (GetButtonState() & DrawButtonFlags::Default)
nState |= ControlState::DEFAULT;
if (Window::IsEnabled())
nState |= ControlState::ENABLED;
@@ -996,11 +996,11 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
nState |= ControlState::PRESSED;
nButtonStyle |= DrawButtonFlags::Pressed;
}
- if (ImplGetButtonState() & DrawButtonFlags::Pressed)
+ if (GetButtonState() & DrawButtonFlags::Pressed)
nState |= ControlState::PRESSED;
if (HasFocus())
nState |= ControlState::FOCUSED;
- if (ImplGetButtonState() & DrawButtonFlags::Default)
+ if (GetButtonState() & DrawButtonFlags::Default)
nState |= ControlState::DEFAULT;
if (Window::IsEnabled())
nState |= ControlState::ENABLED;
@@ -1116,25 +1116,25 @@ void PushButton::ImplSetDefButton( bool bSet )
if ( bSet )
{
- if( !(ImplGetButtonState() & DrawButtonFlags::Default) && bSetPos )
+ if( !(GetButtonState() & DrawButtonFlags::Default) && bSetPos )
{
// adjust pos/size when toggling from non-default to default
aPos.Move(-dLeft, -dTop);
aSize.AdjustWidth(dLeft + dRight );
aSize.AdjustHeight(dTop + dBottom );
}
- ImplGetButtonState() |= DrawButtonFlags::Default;
+ GetButtonState() |= DrawButtonFlags::Default;
}
else
{
- if( (ImplGetButtonState() & DrawButtonFlags::Default) && bSetPos )
+ if( (GetButtonState() & DrawButtonFlags::Default) && bSetPos )
{
// adjust pos/size when toggling from default to non-default
aPos.Move(dLeft, dTop);
aSize.AdjustWidth( -(dLeft + dRight) );
aSize.AdjustHeight( -(dTop + dBottom) );
}
- ImplGetButtonState() &= ~DrawButtonFlags::Default;
+ GetButtonState() &= ~DrawButtonFlags::Default;
}
if( bSetPos )
setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() );
@@ -1144,7 +1144,7 @@ void PushButton::ImplSetDefButton( bool bSet )
bool PushButton::ImplIsDefButton() const
{
- return bool(ImplGetButtonState() & DrawButtonFlags::Default);
+ return bool(GetButtonState() & DrawButtonFlags::Default);
}
PushButton::PushButton( WindowType nType ) :
@@ -1171,7 +1171,7 @@ void PushButton::MouseButtonDown( const MouseEvent& rMEvt )
! ( GetStyle() & WB_TOGGLE ) )
nTrackFlags |= StartTrackingFlags::ButtonRepeat;
- ImplGetButtonState() |= DrawButtonFlags::Pressed;
+ GetButtonState() |= DrawButtonFlags::Pressed;
Invalidate();
StartTracking( nTrackFlags );
@@ -1184,7 +1184,7 @@ void PushButton::Tracking( const TrackingEvent& rTEvt )
{
if ( rTEvt.IsTrackingEnded() )
{
- if ( ImplGetButtonState() & DrawButtonFlags::Pressed )
+ if ( GetButtonState() & DrawButtonFlags::Pressed )
{
if ( !(GetStyle() & WB_NOPOINTERFOCUS) && !rTEvt.IsTrackingCanceled() )
GrabFocus();
@@ -1197,14 +1197,14 @@ void PushButton::Tracking( const TrackingEvent& rTEvt )
if ( IsChecked() )
{
Check( false );
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
}
else
Check();
}
}
else
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
Invalidate();
@@ -1221,7 +1221,7 @@ void PushButton::Tracking( const TrackingEvent& rTEvt )
{
if ( ImplHitTestPushButton( this, rTEvt.GetMouseEvent().GetPosPixel() ) )
{
- if ( ImplGetButtonState() & DrawButtonFlags::Pressed )
+ if ( GetButtonState() & DrawButtonFlags::Pressed )
{
if ( rTEvt.IsTrackingRepeat() && (GetStyle() & WB_REPEAT) &&
! ( GetStyle() & WB_TOGGLE ) )
@@ -1229,15 +1229,15 @@ void PushButton::Tracking( const TrackingEvent& rTEvt )
}
else
{
- ImplGetButtonState() |= DrawButtonFlags::Pressed;
+ GetButtonState() |= DrawButtonFlags::Pressed;
Invalidate();
}
}
else
{
- if ( ImplGetButtonState() & DrawButtonFlags::Pressed )
+ if ( GetButtonState() & DrawButtonFlags::Pressed )
{
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
Invalidate();
}
}
@@ -1251,9 +1251,9 @@ void PushButton::KeyInput( const KeyEvent& rKEvt )
if ( !aKeyCode.GetModifier() &&
((aKeyCode.GetCode() == KEY_RETURN) || (aKeyCode.GetCode() == KEY_SPACE)) )
{
- if ( !(ImplGetButtonState() & DrawButtonFlags::Pressed) )
+ if ( !(GetButtonState() & DrawButtonFlags::Pressed) )
{
- ImplGetButtonState() |= DrawButtonFlags::Pressed;
+ GetButtonState() |= DrawButtonFlags::Pressed;
Invalidate();
}
@@ -1261,9 +1261,9 @@ void PushButton::KeyInput( const KeyEvent& rKEvt )
! ( GetStyle() & WB_TOGGLE ) )
Click();
}
- else if ( (ImplGetButtonState() & DrawButtonFlags::Pressed) && (aKeyCode.GetCode() == KEY_ESCAPE) )
+ else if ( (GetButtonState() & DrawButtonFlags::Pressed) && (aKeyCode.GetCode() == KEY_ESCAPE) )
{
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
Invalidate();
}
else
@@ -1274,7 +1274,7 @@ void PushButton::KeyUp( const KeyEvent& rKEvt )
{
vcl::KeyCode aKeyCode = rKEvt.GetKeyCode();
- if ( (ImplGetButtonState() & DrawButtonFlags::Pressed) &&
+ if ( (GetButtonState() & DrawButtonFlags::Pressed) &&
((aKeyCode.GetCode() == KEY_RETURN) || (aKeyCode.GetCode() == KEY_SPACE)) )
{
if ( GetStyle() & WB_TOGGLE )
@@ -1282,7 +1282,7 @@ void PushButton::KeyUp( const KeyEvent& rKEvt )
if ( IsChecked() )
{
Check( false );
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
}
else
Check();
@@ -1290,7 +1290,7 @@ void PushButton::KeyUp( const KeyEvent& rKEvt )
Toggle();
}
else
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
Invalidate();
@@ -1535,16 +1535,16 @@ void PushButton::SetState( TriState eState )
{
meState = eState;
if ( meState == TRISTATE_FALSE )
- ImplGetButtonState() &= ~DrawButtonFlags(DrawButtonFlags::Checked | DrawButtonFlags::DontKnow);
+ GetButtonState() &= ~DrawButtonFlags(DrawButtonFlags::Checked | DrawButtonFlags::DontKnow);
else if ( meState == TRISTATE_TRUE )
{
- ImplGetButtonState() &= ~DrawButtonFlags::DontKnow;
- ImplGetButtonState() |= DrawButtonFlags::Checked;
+ GetButtonState() &= ~DrawButtonFlags::DontKnow;
+ GetButtonState() |= DrawButtonFlags::Checked;
}
else // TRISTATE_INDET
{
- ImplGetButtonState() &= ~DrawButtonFlags::Checked;
- ImplGetButtonState() |= DrawButtonFlags::DontKnow;
+ GetButtonState() &= ~DrawButtonFlags::Checked;
+ GetButtonState() |= DrawButtonFlags::DontKnow;
}
CompatStateChanged( StateChangedType::State );
@@ -1572,9 +1572,9 @@ void PushButton::EndSelection()
{
EndTracking( TrackingEventFlags::Cancel );
if ( !IsDisposed() &&
- ImplGetButtonState() & DrawButtonFlags::Pressed )
+ GetButtonState() & DrawButtonFlags::Pressed )
{
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
if ( !mbPressed )
Invalidate();
}
@@ -1874,11 +1874,11 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
tools::Rectangle aCtrlRect(maStateRect.TopLeft(), maStateRect.GetSize());
ControlState nState = ControlState::NONE;
- if (ImplGetButtonState() & DrawButtonFlags::Pressed)
+ if (GetButtonState() & DrawButtonFlags::Pressed)
nState |= ControlState::PRESSED;
if (HasFocus())
nState |= ControlState::FOCUSED;
- if (ImplGetButtonState() & DrawButtonFlags::Default)
+ if (GetButtonState() & DrawButtonFlags::Default)
nState |= ControlState::DEFAULT;
if (IsEnabled())
nState |= ControlState::ENABLED;
@@ -1894,7 +1894,7 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
{
if (!maImage)
{
- DrawButtonFlags nStyle = ImplGetButtonState();
+ DrawButtonFlags nStyle = GetButtonState();
if (!IsEnabled())
nStyle |= DrawButtonFlags::Disabled;
if (mbChecked)
@@ -1925,7 +1925,7 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
// display border and selection status
aImageRect = aDecoView.DrawFrame(aImageRect, DrawFrameStyle::DoubleIn);
- if ((ImplGetButtonState() & DrawButtonFlags::Pressed) || !bEnabled)
+ if ((GetButtonState() & DrawButtonFlags::Pressed) || !bEnabled)
rRenderContext.SetFillColor( rStyleSettings.GetFaceColor());
else
rRenderContext.SetFillColor(rStyleSettings.GetFieldColor());
@@ -2278,7 +2278,7 @@ void RadioButton::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeft() && maMouseRect.IsInside( rMEvt.GetPosPixel() ) )
{
- ImplGetButtonState() |= DrawButtonFlags::Pressed;
+ GetButtonState() |= DrawButtonFlags::Pressed;
Invalidate();
Update();
StartTracking();
@@ -2292,12 +2292,12 @@ void RadioButton::Tracking( const TrackingEvent& rTEvt )
{
if ( rTEvt.IsTrackingEnded() )
{
- if ( ImplGetButtonState() & DrawButtonFlags::Pressed )
+ if ( GetButtonState() & DrawButtonFlags::Pressed )
{
if ( !(GetStyle() & WB_NOPOINTERFOCUS) && !rTEvt.IsTrackingCanceled() )
GrabFocus();
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
// do not call click handler if aborted
if ( !rTEvt.IsTrackingCanceled() )
@@ -2313,18 +2313,18 @@ void RadioButton::Tracking( const TrackingEvent& rTEvt )
{
if ( maMouseRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() ) )
{
- if ( !(ImplGetButtonState() & DrawButtonFlags::Pressed) )
+ if ( !(GetButtonState() & DrawButtonFlags::Pressed) )
{
- ImplGetButtonState() |= DrawButtonFlags::Pressed;
+ GetButtonState() |= DrawButtonFlags::Pressed;
Invalidate();
Update();
}
}
else
{
- if ( ImplGetButtonState() & DrawButtonFlags::Pressed )
+ if ( GetButtonState() & DrawButtonFlags::Pressed )
{
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
Invalidate();
Update();
}
@@ -2338,16 +2338,16 @@ void RadioButton::KeyInput( const KeyEvent& rKEvt )
if ( !aKeyCode.GetModifier() && (aKeyCode.GetCode() == KEY_SPACE) )
{
- if ( !(ImplGetButtonState() & DrawButtonFlags::Pressed) )
+ if ( !(GetButtonState() & DrawButtonFlags::Pressed) )
{
- ImplGetButtonState() |= DrawButtonFlags::Pressed;
+ GetButtonState() |= DrawButtonFlags::Pressed;
Invalidate();
Update();
}
}
- else if ( (ImplGetButtonState() & DrawButtonFlags::Pressed) && (aKeyCode.GetCode() == KEY_ESCAPE) )
+ else if ( (GetButtonState() & DrawButtonFlags::Pressed) && (aKeyCode.GetCode() == KEY_ESCAPE) )
{
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
Invalidate();
Update();
}
@@ -2359,9 +2359,9 @@ void RadioButton::KeyUp( const KeyEvent& rKEvt )
{
vcl::KeyCode aKeyCode = rKEvt.GetKeyCode();
- if ( (ImplGetButtonState() & DrawButtonFlags::Pressed) && (aKeyCode.GetCode() == KEY_SPACE) )
+ if ( (GetButtonState() & DrawButtonFlags::Pressed) && (aKeyCode.GetCode() == KEY_SPACE) )
{
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
ImplCallClick();
}
else
@@ -2468,9 +2468,9 @@ void RadioButton::GetFocus()
void RadioButton::LoseFocus()
{
- if ( ImplGetButtonState() & DrawButtonFlags::Pressed )
+ if ( GetButtonState() & DrawButtonFlags::Pressed )
{
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
Invalidate();
Update();
}
@@ -2969,9 +2969,9 @@ void CheckBox::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
if (HasFocus())
nState |= ControlState::FOCUSED;
- if (ImplGetButtonState() & DrawButtonFlags::Default)
+ if (GetButtonState() & DrawButtonFlags::Default)
nState |= ControlState::DEFAULT;
- if (ImplGetButtonState() & DrawButtonFlags::Pressed)
+ if (GetButtonState() & DrawButtonFlags::Pressed)
nState |= ControlState::PRESSED;
if (IsEnabled())
nState |= ControlState::ENABLED;
@@ -2990,7 +2990,7 @@ void CheckBox::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
if (!bNativeOK)
{
- DrawButtonFlags nStyle = ImplGetButtonState();
+ DrawButtonFlags nStyle = GetButtonState();
if (!IsEnabled())
nStyle |= DrawButtonFlags::Disabled;
if (meState == TRISTATE_INDET)
@@ -3135,7 +3135,7 @@ void CheckBox::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeft() && maMouseRect.IsInside( rMEvt.GetPosPixel() ) )
{
- ImplGetButtonState() |= DrawButtonFlags::Pressed;
+ GetButtonState() |= DrawButtonFlags::Pressed;
Invalidate();
Update();
StartTracking();
@@ -3149,12 +3149,12 @@ void CheckBox::Tracking( const TrackingEvent& rTEvt )
{
if ( rTEvt.IsTrackingEnded() )
{
- if ( ImplGetButtonState() & DrawButtonFlags::Pressed )
+ if ( GetButtonState() & DrawButtonFlags::Pressed )
{
if ( !(GetStyle() & WB_NOPOINTERFOCUS) && !rTEvt.IsTrackingCanceled() )
GrabFocus();
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
// do not call click handler if aborted
if ( !rTEvt.IsTrackingCanceled() )
@@ -3170,18 +3170,18 @@ void CheckBox::Tracking( const TrackingEvent& rTEvt )
{
if ( maMouseRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() ) )
{
- if ( !(ImplGetButtonState() & DrawButtonFlags::Pressed) )
+ if ( !(GetButtonState() & DrawButtonFlags::Pressed) )
{
- ImplGetButtonState() |= DrawButtonFlags::Pressed;
+ GetButtonState() |= DrawButtonFlags::Pressed;
Invalidate();
Update();
}
}
else
{
- if ( ImplGetButtonState() & DrawButtonFlags::Pressed )
+ if ( GetButtonState() & DrawButtonFlags::Pressed )
{
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
Invalidate();
Update();
}
@@ -3195,16 +3195,16 @@ void CheckBox::KeyInput( const KeyEvent& rKEvt )
if ( !aKeyCode.GetModifier() && (aKeyCode.GetCode() == KEY_SPACE) )
{
- if ( !(ImplGetButtonState() & DrawButtonFlags::Pressed) )
+ if ( !(GetButtonState() & DrawButtonFlags::Pressed) )
{
- ImplGetButtonState() |= DrawButtonFlags::Pressed;
+ GetButtonState() |= DrawButtonFlags::Pressed;
Invalidate();
Update();
}
}
- else if ( (ImplGetButtonState() & DrawButtonFlags::Pressed) && (aKeyCode.GetCode() == KEY_ESCAPE) )
+ else if ( (GetButtonState() & DrawButtonFlags::Pressed) && (aKeyCode.GetCode() == KEY_ESCAPE) )
{
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
Invalidate();
Update();
}
@@ -3216,9 +3216,9 @@ void CheckBox::KeyUp( const KeyEvent& rKEvt )
{
vcl::KeyCode aKeyCode = rKEvt.GetKeyCode();
- if ( (ImplGetButtonState() & DrawButtonFlags::Pressed) && (aKeyCode.GetCode() == KEY_SPACE) )
+ if ( (GetButtonState() & DrawButtonFlags::Pressed) && (aKeyCode.GetCode() == KEY_SPACE) )
{
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
ImplCheck();
}
else
@@ -3367,9 +3367,9 @@ void CheckBox::GetFocus()
void CheckBox::LoseFocus()
{
- if ( ImplGetButtonState() & DrawButtonFlags::Pressed )
+ if ( GetButtonState() & DrawButtonFlags::Pressed )
{
- ImplGetButtonState() &= ~DrawButtonFlags::Pressed;
+ GetButtonState() &= ~DrawButtonFlags::Pressed;
Invalidate();
Update();
}
@@ -3770,7 +3770,7 @@ void DisclosureButton::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
if (HasFocus())
nState |= ControlState::FOCUSED;
- if (ImplGetButtonState() & DrawButtonFlags::Default)
+ if (GetButtonState() & DrawButtonFlags::Default)
nState |= ControlState::DEFAULT;
if (Window::IsEnabled())
nState |= ControlState::ENABLED;
More information about the Libreoffice-commits
mailing list