From ec1b227b435a555464cb2a9fe747631485ebdbf1 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Wed, 28 Nov 2018 22:21:57 +0100 Subject: custom widgets: Rename 'stock' to 'action'. If the button has this property, it means it is located in the action area, not that it is a stock button per se. Change-Id: Ia57ad24d8cd4ff1d7b74d7ef82da0f352fe3deb3 --- vcl/headless/CustomWidgetDraw.cxx | 2 +- vcl/inc/WidgetThemeLibrary.hxx | 4 ++-- vcl/source/control/button.cxx | 6 +++--- vcl/source/window/builder.cxx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'vcl') diff --git a/vcl/headless/CustomWidgetDraw.cxx b/vcl/headless/CustomWidgetDraw.cxx index 8a920af1ee55b..9e49390b0f3a8 100644 --- a/vcl/headless/CustomWidgetDraw.cxx +++ b/vcl/headless/CustomWidgetDraw.cxx @@ -97,7 +97,7 @@ bool CustomWidgetDraw::drawNativeControl(ControlType eType, ControlPart ePart, { const PushButtonValue* pPushButtonValue = static_cast(&rValue); if (pPushButtonValue) - aParameters.bIsStock = pPushButtonValue->mbIsStock; + aParameters.bIsAction = pPushButtonValue->mbIsAction; bOK = s_pWidgetImplementation->drawPushButton(aParameters, nWidth, nHeight); } break; diff --git a/vcl/inc/WidgetThemeLibrary.hxx b/vcl/inc/WidgetThemeLibrary.hxx index ccb804cf1b6a3..ed4260226a800 100644 --- a/vcl/inc/WidgetThemeLibrary.hxx +++ b/vcl/inc/WidgetThemeLibrary.hxx @@ -79,7 +79,7 @@ struct ControlDrawParameters , ePart(i_ePart) , eState(i_eState) , eButtonValue(ButtonValue::DontKnow) - , bIsStock(false) + , bIsAction(false) , nValue(0) { } @@ -89,7 +89,7 @@ struct ControlDrawParameters ControlPart ePart; ControlState eState; ButtonValue eButtonValue; - bool bIsStock; + bool bIsAction; int64_t nValue; }; diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index b8dea3f8ee733..5e294019c36cd 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -615,7 +615,7 @@ void PushButton::ImplInitPushButtonData() mnDDStyle = PushButtonDropdownStyle::NONE; mbIsActive = false; mbPressed = false; - mbIsStock = false; + mbIsAction = false; } namespace @@ -1026,7 +1026,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext) if (bNativeOK) { PushButtonValue aControlValue; - aControlValue.mbIsStock = isStock(); + aControlValue.mbIsAction = isAction(); tools::Rectangle aCtrlRegion(aInRect); ControlState nState = ControlState::NONE; @@ -1682,7 +1682,7 @@ void PushButton::ShowFocus(const tools::Rectangle& rRect) if (IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Focus)) { PushButtonValue aControlValue; - aControlValue.mbIsStock = isStock(); + aControlValue.mbIsAction = isAction(); tools::Rectangle aInRect(Point(), GetOutputSizePixel()); GetOutDev()->DrawNativeControl(ControlType::Pushbutton, ControlPart::Focus, aInRect, ControlState::FOCUSED, aControlValue, OUString()); diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 2f788ce989c45..8ff3f0621d2a3 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -2806,7 +2806,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader) if (bIsButtonBox) { if (PushButton* pPushButton = dynamic_cast(pChild)) - pPushButton->setStock(true); + pPushButton->setAction(true); } aChilds.push_back(pChild); -- cgit