diff --git a/wgui/src/components/tabs.rs b/wgui/src/components/tabs.rs index 7870dd72..1143ec81 100644 --- a/wgui/src/components/tabs.rs +++ b/wgui/src/components/tabs.rs @@ -1,18 +1,18 @@ use crate::{ assets::AssetPath, components::{ - button::{self, ComponentButton}, Component, ComponentBase, ComponentTrait, RefreshData, + button::{self, ComponentButton}, }, event::CallbackDataCommon, i18n::Translation, layout::WidgetPair, - widget::{div::WidgetDiv, ConstructEssentials}, + widget::{ConstructEssentials, div::WidgetDiv}, }; use std::{cell::RefCell, rc::Rc}; use taffy::{ - prelude::{length, percent}, AlignItems, + prelude::{length, percent}, }; pub struct Entry<'a> { diff --git a/wgui/src/parser/mod.rs b/wgui/src/parser/mod.rs index 4cb8859b..78ab9f22 100644 --- a/wgui/src/parser/mod.rs +++ b/wgui/src/parser/mod.rs @@ -524,7 +524,7 @@ impl ParserContext<'_> { } fn populate_extra_variables(&mut self, other: &HashMap, Rc>) { - for (k,v) in other.iter() { + for (k, v) in other.iter() { self.data_local.var_map.insert(k.clone(), v.clone()); } } diff --git a/wgui/src/parser/style.rs b/wgui/src/parser/style.rs index 9722e4a1..afbed247 100644 --- a/wgui/src/parser/style.rs +++ b/wgui/src/parser/style.rs @@ -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, }; diff --git a/wlx-capture/src/pipewire/dbus_screencast.rs b/wlx-capture/src/pipewire/dbus_screencast.rs index a01dd516..29b3a713 100644 --- a/wlx-capture/src/pipewire/dbus_screencast.rs +++ b/wlx-capture/src/pipewire/dbus_screencast.rs @@ -1,50 +1,105 @@ // This code was autogenerated with `dbus-codegen-rust -g -m None --client nonblock`, see https://github.com/diwic/dbus-rs -use dbus as dbus; +use dbus; #[allow(unused_imports)] use dbus::arg; use dbus::nonblock; pub trait OrgFreedesktopPortalScreenCast { fn create_session(&self, options: arg::PropMap) -> nonblock::MethodReply>; - fn select_sources(&self, session_handle: dbus::Path, options: arg::PropMap) -> nonblock::MethodReply>; - fn start(&self, session_handle: dbus::Path, parent_window: &str, options: arg::PropMap) -> nonblock::MethodReply>; - fn open_pipe_wire_remote(&self, session_handle: dbus::Path, options: arg::PropMap) -> nonblock::MethodReply; + fn select_sources( + &self, + session_handle: dbus::Path, + options: arg::PropMap, + ) -> nonblock::MethodReply>; + fn start( + &self, + session_handle: dbus::Path, + parent_window: &str, + options: arg::PropMap, + ) -> nonblock::MethodReply>; + fn open_pipe_wire_remote( + &self, + session_handle: dbus::Path, + options: arg::PropMap, + ) -> nonblock::MethodReply; fn available_source_types(&self) -> nonblock::MethodReply; fn available_cursor_modes(&self) -> nonblock::MethodReply; fn version(&self) -> nonblock::MethodReply; } -impl<'a, T: nonblock::NonblockReply, C: ::std::ops::Deref> OrgFreedesktopPortalScreenCast for nonblock::Proxy<'a, C> { - +impl<'a, T: nonblock::NonblockReply, C: ::std::ops::Deref> + OrgFreedesktopPortalScreenCast for nonblock::Proxy<'a, C> +{ fn create_session(&self, options: arg::PropMap) -> nonblock::MethodReply> { - self.method_call("org.freedesktop.portal.ScreenCast", "CreateSession", (options, )) - .and_then(|r: (dbus::Path<'static>, )| Ok(r.0, )) + self.method_call( + "org.freedesktop.portal.ScreenCast", + "CreateSession", + (options,), + ) + .and_then(|r: (dbus::Path<'static>,)| Ok(r.0)) } - fn select_sources(&self, session_handle: dbus::Path, options: arg::PropMap) -> nonblock::MethodReply> { - self.method_call("org.freedesktop.portal.ScreenCast", "SelectSources", (session_handle, options, )) - .and_then(|r: (dbus::Path<'static>, )| Ok(r.0, )) + fn select_sources( + &self, + session_handle: dbus::Path, + options: arg::PropMap, + ) -> nonblock::MethodReply> { + self.method_call( + "org.freedesktop.portal.ScreenCast", + "SelectSources", + (session_handle, options), + ) + .and_then(|r: (dbus::Path<'static>,)| Ok(r.0)) } - fn start(&self, session_handle: dbus::Path, parent_window: &str, options: arg::PropMap) -> nonblock::MethodReply> { - self.method_call("org.freedesktop.portal.ScreenCast", "Start", (session_handle, parent_window, options, )) - .and_then(|r: (dbus::Path<'static>, )| Ok(r.0, )) + fn start( + &self, + session_handle: dbus::Path, + parent_window: &str, + options: arg::PropMap, + ) -> nonblock::MethodReply> { + self.method_call( + "org.freedesktop.portal.ScreenCast", + "Start", + (session_handle, parent_window, options), + ) + .and_then(|r: (dbus::Path<'static>,)| Ok(r.0)) } - fn open_pipe_wire_remote(&self, session_handle: dbus::Path, options: arg::PropMap) -> nonblock::MethodReply { - self.method_call("org.freedesktop.portal.ScreenCast", "OpenPipeWireRemote", (session_handle, options, )) - .and_then(|r: (arg::OwnedFd, )| Ok(r.0, )) + fn open_pipe_wire_remote( + &self, + session_handle: dbus::Path, + options: arg::PropMap, + ) -> nonblock::MethodReply { + self.method_call( + "org.freedesktop.portal.ScreenCast", + "OpenPipeWireRemote", + (session_handle, options), + ) + .and_then(|r: (arg::OwnedFd,)| Ok(r.0)) } fn available_source_types(&self) -> nonblock::MethodReply { - ::get(self, "org.freedesktop.portal.ScreenCast", "AvailableSourceTypes") + ::get( + self, + "org.freedesktop.portal.ScreenCast", + "AvailableSourceTypes", + ) } fn available_cursor_modes(&self) -> nonblock::MethodReply { - ::get(self, "org.freedesktop.portal.ScreenCast", "AvailableCursorModes") + ::get( + self, + "org.freedesktop.portal.ScreenCast", + "AvailableCursorModes", + ) } fn version(&self) -> nonblock::MethodReply { - ::get(self, "org.freedesktop.portal.ScreenCast", "version") + ::get( + self, + "org.freedesktop.portal.ScreenCast", + "version", + ) } }