summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2018-01-19 03:19:37 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2018-01-20 20:03:20 +0100
commit18ada80e3f98318d94b3be8109cd86eda1d095c8 (patch)
treed6d1e020b9fa314931ad5acb3bbf97fd6fa16543 /vcl/source/control
parenta468fef9ac977e812e83e3cce462b75d8d24c64d (diff)
WB_NOPOINTERFOCUS can be added after the button is created
Change-Id: I3f06aa8ea4edb981d201210b783c4624ffd68d16 Reviewed-on: https://gerrit.libreoffice.org/48175 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/button.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index ea0e7fd8e846..949cc65d5a9b 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -594,6 +594,14 @@ bool Button::set_property(const OString &rKey, const OUString &rValue)
eAlign = ImageAlign::Bottom;
SetImageAlign(eAlign);
}
+ else if (rKey == "focus-on-click")
+ {
+ WinBits nBits = GetStyle();
+ nBits &= ~WB_NOPOINTERFOCUS;
+ if (!toBool(rValue))
+ nBits |= WB_NOPOINTERFOCUS;
+ SetStyle(nBits);
+ }
else
return Control::set_property(rKey, rValue);
return true;