Add complete keyboard navigation.

This commit is contained in:
2026-08-07 17:00:49 +02:00
parent 87a161058f
commit 5709c80209
38 changed files with 1943 additions and 355 deletions

View File

@@ -5,6 +5,8 @@ use iced::widget::{
};
use iced::{Alignment, Background, Border, Color, Element, Length, Shadow, Theme, Vector};
use super::keyboard;
/// Standard form field label color.
pub const LABEL_COLOR: Color = rgb8(0xB5, 0xBA, 0xC4);
pub const SECTION_COLOR: Color = rgb8(0x9D, 0xA5, 0xB4);
@@ -243,10 +245,13 @@ where
.size(12)
.color(LABEL_COLOR)
.shaping(Shaping::Advanced),
pick_list(list, selected.cloned(), on_select)
.padding([8, 10])
.width(Length::Fill)
.style(select_style),
keyboard::focusable(
pick_list(list, selected.cloned(), on_select)
.padding([8, 10])
.width(Length::Fill)
.style(select_style),
true,
),
]
.spacing(6)
.width(Length::Fill)
@@ -259,11 +264,14 @@ pub fn labeled_checkbox<'a, Message: Clone + 'a>(
is_checked: bool,
on_toggle: impl Fn(bool) -> Message + 'a,
) -> Element<'a, Message> {
checkbox(label, is_checked)
.on_toggle(on_toggle)
.size(16)
.text_size(14)
.into()
keyboard::focusable(
checkbox(label, is_checked)
.on_toggle(on_toggle)
.size(16)
.text_size(14),
true,
)
.into()
}
/// A section header with optional separator line.

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,5 @@
pub mod inputs;
pub mod keyboard;
pub mod native_edit;
pub mod popover;
pub mod webview;