}
void
-_Button::OnAncestorInputEnableStateChanged(const _Control& control)
+_Button::OnAncestorEnableStateChanged(const _Control& control)
{
- __pButtonPresenter->OnAncestorInputEnableStateChanged(control);
+ __pButtonPresenter->OnAncestorEnableStateChanged(control);
return;
}
{
_ButtonStatus status = __buttonStatus;
- if (!IsEnabled())
+ if (IsEnabled() == false && status != _BUTTON_STATUS_SELECTED)
{
status = _BUTTON_STATUS_DISABLED;
}
{
_ButtonStatus status = __prevButtonStatus;
- if (!IsEnabled())
+ if (IsEnabled() == false && status != _BUTTON_STATUS_SELECTED)
{
status = _BUTTON_STATUS_DISABLED;
}
}
void
-_ButtonPresenter::OnAncestorInputEnableStateChanged(const _Control& control)
+_ButtonPresenter::OnAncestorEnableStateChanged(const _Control& control)
{
if (!__pButton->IsEnabled())
{
return;
}
- __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL);
- __pButton->Invalidate();
+ if (__pButton->GetButtonStatus() == _BUTTON_STATUS_PRESSED)
+ {
+ __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL);
+ __pButton->Invalidate();
+ }
return;
}
virtual void OnFontInfoRequested(unsigned long& style, float& size);
virtual Tizen::Graphics::Dimension GetContentSize(void) const;
virtual Tizen::Graphics::FloatDimension GetContentSizeF(void) const;
- virtual void OnAncestorInputEnableStateChanged(const _Control& control);
+ virtual void OnAncestorEnableStateChanged(const _Control& control);
public:
result SetText(const Tizen::Base::String& text);
virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo);
virtual void OnTouchMoveHandled(const _Control& control);
- virtual void OnAncestorInputEnableStateChanged(const _Control& control);
+ virtual void OnAncestorEnableStateChanged(const _Control& control);
void Draw(void);