CtrlLib: Button style now supports 'focus_use_ok' to determine whether StyleOk is to be used if button is focused

git-svn-id: svn://ultimatepp.org/upp/trunk@12749 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2019-02-09 09:29:58 +00:00
parent a164ab289e
commit bf977b22cd
2 changed files with 3 additions and 1 deletions

View file

@ -191,6 +191,7 @@ CH_STYLE(Button, Style, StyleNormal)
focusmargin = 3;
overpaint = 0;
transparent = true;
focus_use_ok = true;
}
CH_STYLE(Button, Style, StyleOk)
@ -331,7 +332,7 @@ const Button::Style *Button::St() const
if(!b || b == this || b->GetTopCtrl() != GetTopCtrl())
st = &StyleOk();
}
if(HasFocus())
if(HasFocus() && st->focus_use_ok)
st = &StyleOk();
}
return st;

View file

@ -83,6 +83,7 @@ public:
Font font;
Image ok, cancel, exit;
bool transparent;
bool focus_use_ok;
};
protected: