Improve mouse support for menu and toggle.

This commit is contained in:
ArthurSonzogni
2021-04-24 18:16:13 +02:00
parent 890a41a64c
commit 8037a5fa5f
14 changed files with 124 additions and 36 deletions

View File

@@ -5,10 +5,8 @@
namespace ftxui {
Element Button::Render() {
return text(label) | //
border | //
(Focused() ? inverted : nothing) | //
reflect(box_);
auto style = Focused() ? inverted : nothing;
return text(label) | border | style | reflect(box_);
}
bool Button::OnEvent(Event event) {