fmt
This commit is contained in:
@@ -19,8 +19,8 @@ use wlx_common::{audio, dash_interface::BoxDashInterface, timestep::Timestep};
|
||||
use crate::{
|
||||
assets,
|
||||
tab::{
|
||||
apps::TabApps, games::TabGames, home::TabHome, monado::TabMonado, processes::TabProcesses, settings::TabSettings,
|
||||
Tab, TabType,
|
||||
Tab, TabType, apps::TabApps, games::TabGames, home::TabHome, monado::TabMonado, processes::TabProcesses,
|
||||
settings::TabSettings,
|
||||
},
|
||||
util::{
|
||||
popup_manager::{MountPopupParams, PopupManager, PopupManagerParams},
|
||||
|
||||
@@ -8,9 +8,9 @@ use glam::Vec2;
|
||||
use wgui::{
|
||||
assets::AssetPath,
|
||||
components::{
|
||||
Component,
|
||||
button::{ButtonClickCallback, ComponentButton},
|
||||
checkbox::ComponentCheckbox,
|
||||
Component,
|
||||
},
|
||||
drawing::Color,
|
||||
event::StyleSetRequest,
|
||||
|
||||
@@ -410,9 +410,7 @@ impl WayVRClient {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn fn_wlx_overlay_show_hide(
|
||||
client: WayVRClientMutex,
|
||||
) -> anyhow::Result<()> {
|
||||
pub async fn fn_wlx_overlay_show_hide(client: WayVRClientMutex) -> anyhow::Result<()> {
|
||||
send_only!(client, &PacketClient::WlxShowHide);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -156,15 +156,11 @@ pub async fn wlx_device_haptics(
|
||||
)
|
||||
}
|
||||
|
||||
pub async fn wlx_overlay_show_hide(
|
||||
state: &mut WayVRClientState,
|
||||
) {
|
||||
pub async fn wlx_overlay_show_hide(state: &mut WayVRClientState) {
|
||||
handle_empty_result(
|
||||
WayVRClient::fn_wlx_overlay_show_hide(
|
||||
state.wayvr_client.clone(),
|
||||
)
|
||||
.await
|
||||
.context("failed to trigger overlay show hide"),
|
||||
WayVRClient::fn_wlx_overlay_show_hide(state.wayvr_client.clone())
|
||||
.await
|
||||
.context("failed to trigger overlay show hide"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ use wayvr_ipc::{
|
||||
};
|
||||
|
||||
use crate::helper::{
|
||||
WayVRClientState, wlx_device_haptics, wlx_input_state, wlx_panel_modify, wvr_process_get,
|
||||
wvr_process_launch, wvr_process_list, wvr_process_terminate, wvr_window_list,
|
||||
WayVRClientState, wlx_device_haptics, wlx_input_state, wlx_overlay_show_hide, wlx_panel_modify,
|
||||
wvr_process_get, wvr_process_launch, wvr_process_list, wvr_process_terminate, wvr_window_list,
|
||||
wvr_window_set_visible,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
use crate::{
|
||||
components::{checkbox::ComponentCheckbox, Component, ComponentBase, ComponentTrait, RefreshData},
|
||||
components::{Component, ComponentBase, ComponentTrait, RefreshData, checkbox::ComponentCheckbox},
|
||||
event::CallbackDataCommon,
|
||||
layout::WidgetPair,
|
||||
widget::{div::WidgetDiv, ConstructEssentials},
|
||||
widget::{ConstructEssentials, div::WidgetDiv},
|
||||
};
|
||||
|
||||
pub struct RadioValueChangeEvent {
|
||||
|
||||
@@ -9,11 +9,11 @@ use crate::{
|
||||
layout::{self, LayoutTask, LayoutTasks, WidgetID, WidgetPair},
|
||||
renderer_vk::text::{FontWeight, TextStyle},
|
||||
widget::{
|
||||
ConstructEssentials,
|
||||
div::WidgetDiv,
|
||||
label::{WidgetLabel, WidgetLabelParams},
|
||||
rectangle::{WidgetRectangle, WidgetRectangleParams},
|
||||
util::WLength,
|
||||
ConstructEssentials,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
use crate::{
|
||||
assets::AssetPath,
|
||||
components::{button, tooltip, Component},
|
||||
components::{Component, button, tooltip},
|
||||
drawing::Color,
|
||||
i18n::Translation,
|
||||
layout::WidgetID,
|
||||
parser::{
|
||||
parse_children, parse_f32, process_component,
|
||||
AttribPair, ParserContext, ParserFile, parse_children, parse_f32, process_component,
|
||||
style::{parse_color_opt, parse_round, parse_style, parse_text_style},
|
||||
AttribPair, ParserContext, ParserFile,
|
||||
},
|
||||
widget::util::WLength,
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
components::{checkbox, radio_group::ComponentRadioGroup, Component},
|
||||
components::{Component, checkbox, radio_group::ComponentRadioGroup},
|
||||
i18n::Translation,
|
||||
layout::WidgetID,
|
||||
parser::{process_component, style::parse_style, AttribPair, Fetchable, ParserContext},
|
||||
parser::{AttribPair, Fetchable, ParserContext, process_component, style::parse_style},
|
||||
};
|
||||
|
||||
pub enum CheckboxKind {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
components::{radio_group, Component},
|
||||
components::{Component, radio_group},
|
||||
layout::WidgetID,
|
||||
parser::{parse_children, process_component, style::parse_style, AttribPair, ParserContext, ParserFile},
|
||||
parser::{AttribPair, ParserContext, ParserFile, parse_children, process_component, style::parse_style},
|
||||
};
|
||||
|
||||
pub fn parse_component_radio_group<'a>(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
components::{slider, Component},
|
||||
components::{Component, slider},
|
||||
layout::WidgetID,
|
||||
parser::{process_component, style::parse_style, AttribPair, ParserContext},
|
||||
parser::{AttribPair, ParserContext, process_component, style::parse_style},
|
||||
widget::ConstructEssentials,
|
||||
};
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ use taffy::{
|
||||
|
||||
use crate::{
|
||||
drawing,
|
||||
parser::{is_percent, parse_color_hex, parse_f32, AttribPair, ParserContext},
|
||||
parser::{AttribPair, ParserContext, is_percent, parse_color_hex, parse_f32},
|
||||
renderer_vk::text::{FontWeight, HorizontalAlign, TextStyle},
|
||||
widget::util::WLength,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
layout::WidgetID,
|
||||
parser::{parse_children, parse_widget_universal, style::parse_style, AttribPair, ParserContext, ParserFile},
|
||||
parser::{AttribPair, ParserContext, ParserFile, parse_children, parse_widget_universal, style::parse_style},
|
||||
widget::div::WidgetDiv,
|
||||
};
|
||||
|
||||
|
||||
@@ -2,9 +2,8 @@ use crate::{
|
||||
assets::AssetPath,
|
||||
layout::WidgetID,
|
||||
parser::{
|
||||
parse_children, parse_widget_universal,
|
||||
AttribPair, ParserContext, ParserFile, parse_children, parse_widget_universal,
|
||||
style::{parse_color, parse_round, parse_style},
|
||||
AttribPair, ParserContext, ParserFile,
|
||||
},
|
||||
renderer_vk::text::custom_glyph::CustomGlyphData,
|
||||
widget::image::{WidgetImage, WidgetImageParams},
|
||||
|
||||
@@ -2,9 +2,8 @@ use crate::{
|
||||
i18n::Translation,
|
||||
layout::WidgetID,
|
||||
parser::{
|
||||
parse_children, parse_i32, parse_widget_universal,
|
||||
AttribPair, ParserContext, ParserFile, parse_children, parse_i32, parse_widget_universal,
|
||||
style::{parse_style, parse_text_style},
|
||||
AttribPair, ParserContext, ParserFile,
|
||||
},
|
||||
widget::label::{WidgetLabel, WidgetLabelParams},
|
||||
};
|
||||
|
||||
@@ -2,9 +2,8 @@ use crate::{
|
||||
drawing::GradientMode,
|
||||
layout::WidgetID,
|
||||
parser::{
|
||||
parse_children, parse_widget_universal,
|
||||
AttribPair, ParserContext, ParserFile, parse_children, parse_widget_universal,
|
||||
style::{parse_color, parse_round, parse_style},
|
||||
AttribPair, ParserContext, ParserFile,
|
||||
},
|
||||
widget::rectangle::{WidgetRectangle, WidgetRectangleParams},
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
assets::AssetPath,
|
||||
layout::WidgetID,
|
||||
parser::{parse_children, parse_widget_universal, style::parse_style, AttribPair, ParserContext, ParserFile},
|
||||
parser::{AttribPair, ParserContext, ParserFile, parse_children, parse_widget_universal, style::parse_style},
|
||||
renderer_vk::text::custom_glyph::CustomGlyphData,
|
||||
widget::sprite::{WidgetSprite, WidgetSpriteParams},
|
||||
};
|
||||
|
||||
@@ -77,11 +77,7 @@ impl From<&TextStyle> for Metrics {
|
||||
|
||||
impl From<&TextStyle> for Wrap {
|
||||
fn from(value: &TextStyle) -> Self {
|
||||
if value.wrap {
|
||||
Self::WordOrGlyph
|
||||
} else {
|
||||
Self::None
|
||||
}
|
||||
if value.wrap { Self::WordOrGlyph } else { Self::None }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use glam::Vec2;
|
||||
|
||||
use crate::{
|
||||
assets::AssetPath,
|
||||
components::{button::ComponentButton, ComponentTrait},
|
||||
components::{ComponentTrait, button::ComponentButton},
|
||||
globals::WguiGlobals,
|
||||
i18n::Translation,
|
||||
layout::Layout,
|
||||
|
||||
@@ -13,7 +13,7 @@ use crate::{
|
||||
i18n::Translation,
|
||||
layout::{Layout, LayoutTask, LayoutTasks, WidgetPair},
|
||||
parser::{self, Fetchable, ParserState},
|
||||
widget::{div::WidgetDiv, label::WidgetLabel, rectangle::WidgetRectangle, EventResult},
|
||||
widget::{EventResult, div::WidgetDiv, label::WidgetLabel, rectangle::WidgetRectangle},
|
||||
};
|
||||
|
||||
struct OpenedWindow {
|
||||
|
||||
@@ -120,9 +120,7 @@ pub(super) fn setup_custom_label<S: 'static>(
|
||||
"%H:%M"
|
||||
}
|
||||
}
|
||||
unk => {
|
||||
unk
|
||||
}
|
||||
unk => unk,
|
||||
};
|
||||
|
||||
let state = ClockLabelState {
|
||||
|
||||
@@ -51,8 +51,7 @@ where
|
||||
.enqueue(TaskType::Input(InputTask::Haptics { device, haptics }));
|
||||
}
|
||||
WayVRSignal::ShowHide => {
|
||||
app.tasks
|
||||
.enqueue(TaskType::Overlay(OverlayTask::ShowHide));
|
||||
app.tasks.enqueue(TaskType::Overlay(OverlayTask::ShowHide));
|
||||
}
|
||||
WayVRSignal::DropOverlay(overlay_id) => {
|
||||
app.tasks
|
||||
|
||||
@@ -350,9 +350,7 @@ impl Connection {
|
||||
));
|
||||
}
|
||||
|
||||
fn handle_wlx_overlay_show_hide(
|
||||
params: &mut TickParams
|
||||
) {
|
||||
fn handle_wlx_overlay_show_hide(params: &mut TickParams) {
|
||||
params.signals.send(WayVRSignal::ShowHide);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user