fix: a11y_ready state for sctk surfaces
This commit is contained in:
parent
04c273a79b
commit
e4da5002ae
3 changed files with 25 additions and 6 deletions
|
|
@ -25,7 +25,8 @@ where
|
|||
theme_mode: theme::Mode,
|
||||
default_theme: P::Theme,
|
||||
style: theme::Style,
|
||||
pub(crate) ready: bool,
|
||||
ready: bool,
|
||||
a11y_ready: bool,
|
||||
}
|
||||
|
||||
impl<P: Program> Debug for State<P>
|
||||
|
|
@ -83,10 +84,23 @@ where
|
|||
default_theme,
|
||||
style,
|
||||
|
||||
ready: cfg!(not(feature = "a11y")),
|
||||
ready: true,
|
||||
a11y_ready: !cfg!(not(feature = "a11y")),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn is_ready(&self) -> bool {
|
||||
self.ready && self.a11y_ready
|
||||
}
|
||||
|
||||
pub(crate) fn set_ready(&mut self, ready: bool) {
|
||||
self.ready = ready;
|
||||
}
|
||||
|
||||
pub(crate) fn set_a11y_ready(&mut self, ready: bool) {
|
||||
self.a11y_ready = ready;
|
||||
}
|
||||
|
||||
pub fn viewport(&self) -> &Viewport {
|
||||
&self.viewport
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue