mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
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:
parent
a164ab289e
commit
bf977b22cd
2 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ public:
|
|||
Font font;
|
||||
Image ok, cancel, exit;
|
||||
bool transparent;
|
||||
bool focus_use_ok;
|
||||
};
|
||||
|
||||
protected:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue