summaryrefslogtreecommitdiff
path: root/vcl/source/control/button.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-05-14 14:15:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-05-14 16:13:21 +0100
commit994b9700f824869ade12b16b8a2ebe333642e9ec (patch)
treedca25ba2dcc128390ab93ac499ffc5b2605a6707 /vcl/source/control/button.cxx
parent6cbdd2a141d906d941831496e0e697823fac3753 (diff)
gtk3: provide a scheme where NWF can render the focus rects itself
Change-Id: Ide68e35964670f7acf7a9098b2e04451a17e335a
Diffstat (limited to 'vcl/source/control/button.cxx')
-rw-r--r--vcl/source/control/button.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index d545f2d4645f..f6dec45595bc 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1657,6 +1657,20 @@ bool PushButton::set_property(const OString &rKey, const OString &rValue)
return true;
}
+void PushButton::ShowFocus(const Rectangle& rRect)
+{
+ bool bNativeOK;
+ if ((bNativeOK = IsNativeControlSupported(CTRL_PUSHBUTTON, PART_FOCUS)))
+ {
+ ImplControlValue aControlValue;
+ Rectangle aInRect(Point(), GetOutputSizePixel());
+ bNativeOK = GetOutDev()->DrawNativeControl(CTRL_PUSHBUTTON, PART_FOCUS, aInRect,
+ ControlState::FOCUSED, aControlValue, OUString());
+ }
+ if (!bNativeOK)
+ Button::ShowFocus(rRect);
+}
+
void OKButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
PushButton::ImplInit( pParent, nStyle );