Better file dialog confirm button behavior
This commit is contained in:
parent
1b8339ed5d
commit
ea726c7a93
1 changed files with 3 additions and 2 deletions
|
|
@ -318,11 +318,12 @@ namespace psemek::ui
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
path_edit->on_text_entered([=](std::u32string_view const & text_u32){
|
|
||||||
|
path_edit->on_text_changed([=](std::u32string_view const & text_u32){
|
||||||
std::string text = util::to_utf8(std::u32string(text_u32));
|
std::string text = util::to_utf8(std::u32string(text_u32));
|
||||||
*selected_path = *current_path / text;
|
*selected_path = *current_path / text;
|
||||||
confirm_button->set_hidden(text.empty());
|
confirm_button->set_hidden(text.empty());
|
||||||
}, false);
|
});
|
||||||
|
|
||||||
cancel_button->on_click([=]{
|
cancel_button->on_click([=]{
|
||||||
window->close();
|
window->close();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue