summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-09-11 17:35:08 +0200
committerJan Holesovsky <kendy@collabora.com>2018-11-08 09:14:36 +0100
commit5182b8aa2d4531afb7e9229ddab5e0b45b31a3f0 (patch)
tree0c53bc72b451ce65a588a202e59ab6d2b13097df /vcl
parent9c8eee81496485f040eede8a76d43613dc5b4d14 (diff)
custom widgets: differentiate stock and non-stock buttons
Change-Id: I05f01058d7886dacec3b00dcf31313aea3939164
Diffstat (limited to 'vcl')
-rw-r--r--vcl/headless/CustomWidgetDraw.cxx3
-rw-r--r--vcl/inc/WidgetThemeLibrary.hxx2
2 files changed, 5 insertions, 0 deletions
diff --git a/vcl/headless/CustomWidgetDraw.cxx b/vcl/headless/CustomWidgetDraw.cxx
index 37088f6aa968..aa4732c1bd05 100644
--- a/vcl/headless/CustomWidgetDraw.cxx
+++ b/vcl/headless/CustomWidgetDraw.cxx
@@ -96,6 +96,9 @@ bool CustomWidgetDraw::drawNativeControl(ControlType eType, ControlPart ePart,
break;
case ControlType::Pushbutton:
{
+ const PushButtonValue* pPushButtonValue = static_cast<const PushButtonValue*>(&rValue);
+ if (pPushButtonValue)
+ aParameters.bIsStock = pPushButtonValue->mbIsStock;
bOK = s_pWidgetImplementation->drawPushButton(aParameters, nWidth, nHeight);
}
break;
diff --git a/vcl/inc/WidgetThemeLibrary.hxx b/vcl/inc/WidgetThemeLibrary.hxx
index 53d5e5769ffa..19249d498034 100644
--- a/vcl/inc/WidgetThemeLibrary.hxx
+++ b/vcl/inc/WidgetThemeLibrary.hxx
@@ -24,6 +24,7 @@ struct ControlDrawParameters
, ePart(i_ePart)
, eState(i_eState)
, eButtonValue(ButtonValue::DontKnow)
+ , bIsStock(false)
, nValue(0)
{
}
@@ -32,6 +33,7 @@ struct ControlDrawParameters
ControlPart ePart;
ControlState eState;
ButtonValue eButtonValue;
+ bool bIsStock;
sal_Int64 nValue;
};