wayvr window size from res. remove decor tooltips
This commit is contained in:
@@ -14,12 +14,12 @@
|
||||
>
|
||||
<label id="label_title" margin_left="8" color="~color_text" size="22" weight="bold" />
|
||||
<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">
|
||||
<sprite width="28" height="28" src="watch/edit.svg" />
|
||||
</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">
|
||||
<sprite width="32" height="32" src="edit/close.svg" />
|
||||
</Button>
|
||||
|
||||
@@ -325,6 +325,7 @@ impl WvrServerState {
|
||||
title,
|
||||
app,
|
||||
window_handle,
|
||||
size_x.max(size_y),
|
||||
).context("Could not create WvrWindow overlay").inspect_err(|e| log::warn!("{e:?}")).ok()
|
||||
}),
|
||||
)));
|
||||
|
||||
@@ -51,7 +51,10 @@ pub fn create_wl_window_overlay(
|
||||
name: Arc<str>,
|
||||
app: &mut AppState,
|
||||
window: wayvr::window::WindowHandle,
|
||||
size_major: u32,
|
||||
) -> anyhow::Result<OverlayWindowConfig> {
|
||||
let scale = size_major as f32 / 1920.0;
|
||||
|
||||
Ok(OverlayWindowConfig {
|
||||
name: name.clone(),
|
||||
default_state: OverlayWindowState {
|
||||
@@ -60,7 +63,7 @@ pub fn create_wl_window_overlay(
|
||||
positioning: Positioning::Floating,
|
||||
curvature: Some(0.15),
|
||||
transform: Affine3A::from_scale_rotation_translation(
|
||||
Vec3::ONE,
|
||||
Vec3::ONE * scale,
|
||||
Quat::IDENTITY,
|
||||
vec3(0.0, 0.0, -0.95),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user