[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - include/vcl vcl/source
Michael Meeks
michael.meeks at collabora.com
Thu Feb 18 10:40:25 UTC 2016
include/vcl/salnativewidgets.hxx | 6 ++++++
vcl/source/control/spinfld.cxx | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 2fb86ca5316bb5cd982ac9283fae0d9930c692c7
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed Feb 17 20:42:52 2016 +0000
tdf#97922 - get control area right for spinbuttons.
Also avoid caching both spin-buttons and some other complex types.
The cache key needs to be able to include more state.
Change-Id: I8eff6b1c5c51d27afb796cae66b45390433138b4
Reviewed-on: https://gerrit.libreoffice.org/22443
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index 8c1176a..0789270 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -288,6 +288,12 @@ public:
case CTRL_RADIOBUTTON:
case CTRL_LISTNODE:
case CTRL_SLIDER:
+ // FIXME: these guys have complex state hidden in ImplControlValue
+ // structs which affects rendering, needs to be a and needs to be
+ // part of the key to our cache.
+ case CTRL_SPINBOX:
+ case CTRL_SPINBUTTONS:
+ case CTRL_TAB_ITEM:
return false;
case CTRL_MENUBAR:
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 8f4bbca..750900f 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -143,8 +143,9 @@ bool ImplDrawNativeSpinbuttons(vcl::RenderContext& rRenderContext, const Spinbut
if (rRenderContext.IsNativeControlSupported(CTRL_SPINBUTTONS, PART_ENTIRE_CONTROL))
{
+ Rectangle aArea = rSpinbuttonValue.maUpperRect.GetUnion(rSpinbuttonValue.maLowerRect);
// only paint the standalone spin buttons, all buttons are painted at once
- bNativeOK = rRenderContext.DrawNativeControl(CTRL_SPINBUTTONS, PART_ALL_BUTTONS, Rectangle(),
+ bNativeOK = rRenderContext.DrawNativeControl(CTRL_SPINBUTTONS, PART_ALL_BUTTONS, aArea,
ControlState::ENABLED, rSpinbuttonValue, OUString());
}
return bNativeOK;
More information about the Libreoffice-commits
mailing list