wayvr window size from res. remove decor tooltips

This commit is contained in:
galister
2026-01-04 16:28:14 +09:00
parent b0763beb4a
commit 0c062d4b36
3 changed files with 7 additions and 3 deletions

View File

@@ -14,12 +14,12 @@
> >
<label id="label_title" margin_left="8" color="~color_text" size="22" weight="bold" /> <label id="label_title" margin_left="8" color="~color_text" size="22" weight="bold" />
<div gap="4"> <div gap="4">
<Button macro="window_button" tooltip="WATCH.EDIT_MODE" _release="::EditToggle" <Button macro="window_button" _release="::EditToggle"
border_color="~color_faded_translucent" color="~color_faded_50" color2="~color_faded_10"> border_color="~color_faded_translucent" color="~color_faded_50" color2="~color_faded_10">
<sprite width="28" height="28" src="watch/edit.svg" /> <sprite width="28" height="28" src="watch/edit.svg" />
</Button> </Button>
<Button macro="window_button" tooltip="DECOR.CLOSE_WINDOW" _release="::DecorCloseWindow" <Button macro="window_button" _release="::DecorCloseWindow"
border_color="~color_danger_translucent" color="~color_danger_50" color2="~color_danger_10"> border_color="~color_danger_translucent" color="~color_danger_50" color2="~color_danger_10">
<sprite width="32" height="32" src="edit/close.svg" /> <sprite width="32" height="32" src="edit/close.svg" />
</Button> </Button>

View File

@@ -325,6 +325,7 @@ impl WvrServerState {
title, title,
app, app,
window_handle, window_handle,
size_x.max(size_y),
).context("Could not create WvrWindow overlay").inspect_err(|e| log::warn!("{e:?}")).ok() ).context("Could not create WvrWindow overlay").inspect_err(|e| log::warn!("{e:?}")).ok()
}), }),
))); )));

View File

@@ -51,7 +51,10 @@ pub fn create_wl_window_overlay(
name: Arc<str>, name: Arc<str>,
app: &mut AppState, app: &mut AppState,
window: wayvr::window::WindowHandle, window: wayvr::window::WindowHandle,
size_major: u32,
) -> anyhow::Result<OverlayWindowConfig> { ) -> anyhow::Result<OverlayWindowConfig> {
let scale = size_major as f32 / 1920.0;
Ok(OverlayWindowConfig { Ok(OverlayWindowConfig {
name: name.clone(), name: name.clone(),
default_state: OverlayWindowState { default_state: OverlayWindowState {
@@ -60,7 +63,7 @@ pub fn create_wl_window_overlay(
positioning: Positioning::Floating, positioning: Positioning::Floating,
curvature: Some(0.15), curvature: Some(0.15),
transform: Affine3A::from_scale_rotation_translation( transform: Affine3A::from_scale_rotation_translation(
Vec3::ONE, Vec3::ONE * scale,
Quat::IDENTITY, Quat::IDENTITY,
vec3(0.0, 0.0, -0.95), vec3(0.0, 0.0, -0.95),
), ),