diff --git a/uppsrc/CtrlLib/Button.cpp b/uppsrc/CtrlLib/Button.cpp index 368a6ecfa..85a49c4b7 100644 --- a/uppsrc/CtrlLib/Button.cpp +++ b/uppsrc/CtrlLib/Button.cpp @@ -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; diff --git a/uppsrc/CtrlLib/PushCtrl.h b/uppsrc/CtrlLib/PushCtrl.h index 6ca001398..fced17cc9 100644 --- a/uppsrc/CtrlLib/PushCtrl.h +++ b/uppsrc/CtrlLib/PushCtrl.h @@ -83,6 +83,7 @@ public: Font font; Image ok, cancel, exit; bool transparent; + bool focus_use_ok; }; protected: