fix: build with a11y feature
This commit is contained in:
parent
b01b34df2b
commit
3c1a60cb05
3 changed files with 6 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ publish = false
|
|||
[dependencies]
|
||||
apply = "0.3.0"
|
||||
fraction = "0.14.0"
|
||||
libcosmic = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "dbus-config", ] }
|
||||
libcosmic = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "dbus-config", "a11y" ] }
|
||||
once_cell = "1.18"
|
||||
slotmap = "1.0.6"
|
||||
env_logger = "0.10"
|
||||
|
|
|
|||
2
iced
2
iced
|
|
@ -1 +1 @@
|
|||
Subproject commit 68b3e4966c0c0d66f138b8eabc37a2c117f95b6f
|
||||
Subproject commit 484ac7be751d4cc6d87ef384562f0c137d86dfbb
|
||||
|
|
@ -47,7 +47,7 @@ where
|
|||
{
|
||||
id: Id,
|
||||
#[cfg(feature = "a11y")]
|
||||
name: Option<Cow<'a, str>>,
|
||||
name: Option<std::borrow::Cow<'a, str>>,
|
||||
#[cfg(feature = "a11y")]
|
||||
description: Option<iced_accessibility::Description<'a>>,
|
||||
#[cfg(feature = "a11y")]
|
||||
|
|
@ -187,7 +187,7 @@ where
|
|||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the name of the [`Button`].
|
||||
pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self {
|
||||
pub fn name(mut self, name: impl Into<std::borrow::Cow<'a, str>>) -> Self {
|
||||
self.name = Some(name.into());
|
||||
self
|
||||
}
|
||||
|
|
@ -203,7 +203,7 @@ where
|
|||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
pub fn description(mut self, description: impl Into<Cow<'a, str>>) -> Self {
|
||||
pub fn description(mut self, description: impl Into<std::borrow::Cow<'a, str>>) -> Self {
|
||||
self.description = Some(iced_accessibility::Description::Text(description.into()));
|
||||
self
|
||||
}
|
||||
|
|
@ -653,7 +653,7 @@ pub fn update<'a, Message: Clone>(
|
|||
#[cfg(feature = "a11y")]
|
||||
Event::A11y(event_id, iced_accessibility::accesskit::ActionRequest { action, .. }) => {
|
||||
let state = state();
|
||||
if let Some(Some(on_press)) = (id == event_id
|
||||
if let Some(Some(on_press)) = (event_id == event_id
|
||||
&& matches!(action, iced_accessibility::accesskit::Action::Default))
|
||||
.then(|| on_press.clone())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue