move add_display::View -> add_window::View & display_options::View -> window_options::VIew, remove displays logic and replace it with window ones
[skip ci]
This commit is contained in:
@@ -14,6 +14,7 @@ use wgui::{
|
||||
taffy::Display,
|
||||
widget::label::WidgetLabel,
|
||||
};
|
||||
use wlx_common::dash_interface::BoxDashInterface;
|
||||
|
||||
use crate::{
|
||||
frontend::{FrontendTask, FrontendTasks},
|
||||
@@ -60,6 +61,7 @@ pub struct PopupContentFuncData<'a> {
|
||||
pub layout: &'a mut Layout,
|
||||
pub settings: &'a dyn SettingsIO,
|
||||
pub handle: PopupHandle,
|
||||
pub interface: &'a mut BoxDashInterface,
|
||||
pub id_content: WidgetID,
|
||||
}
|
||||
|
||||
@@ -125,6 +127,7 @@ impl PopupManager {
|
||||
globals: WguiGlobals,
|
||||
settings: &dyn SettingsIO,
|
||||
layout: &mut Layout,
|
||||
interface: &mut BoxDashInterface,
|
||||
frontend_tasks: FrontendTasks,
|
||||
params: MountPopupParams,
|
||||
) -> anyhow::Result<()> {
|
||||
@@ -181,6 +184,7 @@ impl PopupManager {
|
||||
handle: popup_handle.clone(),
|
||||
id_content,
|
||||
settings,
|
||||
interface,
|
||||
})?;
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
use std::{path::PathBuf, str::FromStr};
|
||||
|
||||
use wayvr_ipc::packet_server;
|
||||
use wgui::{
|
||||
assets::{AssetPath, AssetPathOwned},
|
||||
globals::WguiGlobals,
|
||||
@@ -13,7 +11,6 @@ use wgui::{
|
||||
sprite::{WidgetSprite, WidgetSpriteParams},
|
||||
},
|
||||
};
|
||||
use wlx_common::dash_interface::BoxDashInterface;
|
||||
|
||||
use crate::util::desktop_finder;
|
||||
|
||||
@@ -33,22 +30,6 @@ pub fn get_desktop_file_icon_path(desktop_file: &desktop_finder::DesktopFile) ->
|
||||
AssetPathOwned::BuiltIn(PathBuf::from_str("dashboard/terminal.svg").unwrap())
|
||||
}
|
||||
|
||||
pub fn get_all_windows(interface: &mut BoxDashInterface) -> anyhow::Result<Vec<packet_server::WvrWindow>> {
|
||||
let mut windows = Vec::<packet_server::WvrWindow>::new();
|
||||
|
||||
for display in interface.display_list()? {
|
||||
let Ok(window_list) = interface.display_window_list(display.handle) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
for window in window_list {
|
||||
windows.push(window)
|
||||
}
|
||||
}
|
||||
|
||||
Ok(windows)
|
||||
}
|
||||
|
||||
pub fn mount_simple_label(
|
||||
globals: &WguiGlobals,
|
||||
layout: &mut Layout,
|
||||
|
||||
Reference in New Issue
Block a user