fix wlx build
This commit is contained in:
@@ -7,6 +7,7 @@ use std::{
|
|||||||
use wgui::{
|
use wgui::{
|
||||||
event::{self, EventCallback, EventListenerCollection, EventListenerKind, ListenerHandleVec},
|
event::{self, EventCallback, EventListenerCollection, EventListenerKind, ListenerHandleVec},
|
||||||
parser::CustomAttribsInfoOwned,
|
parser::CustomAttribsInfoOwned,
|
||||||
|
widget::EventResult,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::state::AppState;
|
use crate::state::AppState;
|
||||||
@@ -43,7 +44,7 @@ pub(super) fn setup_custom_button<S>(
|
|||||||
#[cfg(feature = "wayvr")]
|
#[cfg(feature = "wayvr")]
|
||||||
app.tasks
|
app.tasks
|
||||||
.enqueue(TaskType::WayVR(WayVRAction::ToggleDashboard));
|
.enqueue(TaskType::WayVR(WayVRAction::ToggleDashboard));
|
||||||
Ok(())
|
Ok(EventResult::Consumed)
|
||||||
}),
|
}),
|
||||||
"::SetToggle" => {
|
"::SetToggle" => {
|
||||||
let arg = args.next().unwrap_or_default();
|
let arg = args.next().unwrap_or_default();
|
||||||
@@ -53,7 +54,7 @@ pub(super) fn setup_custom_button<S>(
|
|||||||
};
|
};
|
||||||
Box::new(move |_common, _data, app, _| {
|
Box::new(move |_common, _data, app, _| {
|
||||||
app.tasks.enqueue(TaskType::ToggleSet(set_idx));
|
app.tasks.enqueue(TaskType::ToggleSet(set_idx));
|
||||||
Ok(())
|
Ok(EventResult::Consumed)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
"::WatchHide" => todo!(),
|
"::WatchHide" => todo!(),
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ use wgui::{
|
|||||||
event::{self, EventCallback, EventListenerCollection, ListenerHandleVec},
|
event::{self, EventCallback, EventListenerCollection, ListenerHandleVec},
|
||||||
i18n::Translation,
|
i18n::Translation,
|
||||||
layout::Layout,
|
layout::Layout,
|
||||||
parser::{parse_color_hex, CustomAttribsInfoOwned},
|
parser::{CustomAttribsInfoOwned, parse_color_hex},
|
||||||
widget::label::WidgetLabel,
|
widget::{EventResult, label::WidgetLabel},
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::state::AppState;
|
use crate::state::AppState;
|
||||||
@@ -53,7 +53,7 @@ pub(super) fn setup_custom_label<S>(
|
|||||||
};
|
};
|
||||||
Box::new(move |common, data, _app, _| {
|
Box::new(move |common, data, _app, _| {
|
||||||
shell_on_tick(&state, common, data);
|
shell_on_tick(&state, common, data);
|
||||||
Ok(())
|
Ok(EventResult::Pass)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
"fifo" => {
|
"fifo" => {
|
||||||
@@ -71,7 +71,7 @@ pub(super) fn setup_custom_label<S>(
|
|||||||
};
|
};
|
||||||
Box::new(move |common, data, _app, _| {
|
Box::new(move |common, data, _app, _| {
|
||||||
pipe_on_tick(&state, common, data);
|
pipe_on_tick(&state, common, data);
|
||||||
Ok(())
|
Ok(EventResult::Pass)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
"battery" => {
|
"battery" => {
|
||||||
@@ -104,7 +104,7 @@ pub(super) fn setup_custom_label<S>(
|
|||||||
};
|
};
|
||||||
Box::new(move |common, data, app, _| {
|
Box::new(move |common, data, app, _| {
|
||||||
battery_on_tick(&state, common, data, app);
|
battery_on_tick(&state, common, data, app);
|
||||||
Ok(())
|
Ok(EventResult::Pass)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
"clock" => {
|
"clock" => {
|
||||||
@@ -167,12 +167,12 @@ pub(super) fn setup_custom_label<S>(
|
|||||||
|
|
||||||
Box::new(move |common, data, _app, _| {
|
Box::new(move |common, data, _app, _| {
|
||||||
clock_on_tick(&state, common, data);
|
clock_on_tick(&state, common, data);
|
||||||
Ok(())
|
Ok(EventResult::Pass)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
"ipd" => Box::new(|common, data, app, _| {
|
"ipd" => Box::new(|common, data, app, _| {
|
||||||
ipd_on_tick(common, data, app);
|
ipd_on_tick(common, data, app);
|
||||||
Ok(())
|
Ok(EventResult::Pass)
|
||||||
}),
|
}),
|
||||||
unk => {
|
unk => {
|
||||||
log::warn!("Unknown source value for label: {unk}");
|
log::warn!("Unknown source value for label: {unk}");
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ use wgui::{
|
|||||||
renderer_vk::util,
|
renderer_vk::util,
|
||||||
taffy::{self, prelude::length},
|
taffy::{self, prelude::length},
|
||||||
widget::{
|
widget::{
|
||||||
|
EventResult,
|
||||||
div::WidgetDiv,
|
div::WidgetDiv,
|
||||||
rectangle::{WidgetRectangle, WidgetRectangleParams},
|
rectangle::{WidgetRectangle, WidgetRectangleParams},
|
||||||
util::WLength,
|
util::WLength,
|
||||||
@@ -198,7 +199,7 @@ pub fn create_keyboard(
|
|||||||
move |common, data, _app, _state| {
|
move |common, data, _app, _state| {
|
||||||
common.alterables.trigger_haptics();
|
common.alterables.trigger_haptics();
|
||||||
on_enter_anim(k.clone(), common, data);
|
on_enter_anim(k.clone(), common, data);
|
||||||
Ok(())
|
Ok(EventResult::Pass)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@@ -211,7 +212,7 @@ pub fn create_keyboard(
|
|||||||
move |common, data, _app, _state| {
|
move |common, data, _app, _state| {
|
||||||
common.alterables.trigger_haptics();
|
common.alterables.trigger_haptics();
|
||||||
on_leave_anim(k.clone(), common, data);
|
on_leave_anim(k.clone(), common, data);
|
||||||
Ok(())
|
Ok(EventResult::Pass)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@@ -228,7 +229,7 @@ pub fn create_keyboard(
|
|||||||
|
|
||||||
handle_press(app, &k, state, button);
|
handle_press(app, &k, state, button);
|
||||||
on_press_anim(k.clone(), common, data);
|
on_press_anim(k.clone(), common, data);
|
||||||
Ok(())
|
Ok(EventResult::Pass)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@@ -242,7 +243,7 @@ pub fn create_keyboard(
|
|||||||
if handle_release(app, &k, state) {
|
if handle_release(app, &k, state) {
|
||||||
on_release_anim(k.clone(), common, data);
|
on_release_anim(k.clone(), common, data);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(EventResult::Pass)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@@ -260,7 +261,7 @@ pub fn create_keyboard(
|
|||||||
} else {
|
} else {
|
||||||
on_release_anim(k.clone(), common, data);
|
on_release_anim(k.clone(), common, data);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(EventResult::Pass)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user