Prevent hover styling and focus on input elements when disabled

This commit is contained in:
Mr-Wiseguy
2025-04-26 02:55:29 -04:00
parent b8ecd9608d
commit 43ec2d27be
7 changed files with 89 additions and 26 deletions
+6 -6
View File
@@ -249,12 +249,12 @@ void Element::process_event(const Event &) {
}
void Element::enable_focus() {
set_property(Rml::PropertyId::TabIndex, Rml::Style::TabIndex::Auto);
set_property(Rml::PropertyId::Focus, Rml::Style::Focus::Auto);
set_property(Rml::PropertyId::NavUp, Rml::Style::Nav::Auto);
set_property(Rml::PropertyId::NavDown, Rml::Style::Nav::Auto);
set_property(Rml::PropertyId::NavLeft, Rml::Style::Nav::Auto);
set_property(Rml::PropertyId::NavRight, Rml::Style::Nav::Auto);
set_tab_index_auto();
set_focusable(true);
set_nav_auto(NavDirection::Up);
set_nav_auto(NavDirection::Down);
set_nav_auto(NavDirection::Left);
set_nav_auto(NavDirection::Right);
}
void Element::clear_children() {