Kaydet (Commit) ec1b227b authored tarafından Jan Holesovsky's avatar Jan Holesovsky

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
üst bb051645
......@@ -160,14 +160,14 @@ public:
virtual bool set_property(const OString &rKey, const OUString &rValue) override;
virtual void ShowFocus(const tools::Rectangle& rRect) override;
void setStock(bool bIsStock)
void setAction(bool bIsAction)
{
mbIsStock = bIsStock;
mbIsAction = bIsAction;
}
bool isStock()
bool isAction()
{
return mbIsStock;
return mbIsAction;
}
protected:
......@@ -206,7 +206,7 @@ private:
SymbolType meSymbol;
TriState meState;
bool mbPressed;
bool mbIsStock;
bool mbIsAction;
};
inline void PushButton::Check( bool bCheck )
......
......@@ -497,7 +497,7 @@ public:
: ImplControlValue( ControlType::Pushbutton, 0 )
, mbBevelButton(false)
, mbSingleLine(true)
, mbIsStock(false)
, mbIsAction(false)
{}
virtual ~PushButtonValue() override;
......@@ -510,7 +510,7 @@ public:
bool mbBevelButton:1; // only used on OSX
bool mbSingleLine:1; // only used on OSX
bool mbIsStock:1;
bool mbIsAction:1;
};
......
......@@ -97,7 +97,7 @@ bool CustomWidgetDraw::drawNativeControl(ControlType eType, ControlPart ePart,
{
const PushButtonValue* pPushButtonValue = static_cast<const PushButtonValue*>(&rValue);
if (pPushButtonValue)
aParameters.bIsStock = pPushButtonValue->mbIsStock;
aParameters.bIsAction = pPushButtonValue->mbIsAction;
bOK = s_pWidgetImplementation->drawPushButton(aParameters, nWidth, nHeight);
}
break;
......
......@@ -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;
};
......
......@@ -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());
......
......@@ -2806,7 +2806,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
if (bIsButtonBox)
{
if (PushButton* pPushButton = dynamic_cast<PushButton*>(pChild))
pPushButton->setStock(true);
pPushButton->setAction(true);
}
aChilds.push_back(pChild);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment