opacity & additive & curvature works
This commit is contained in:
@@ -9,14 +9,14 @@ use crate::{
|
||||
edit::EditWrapperManager,
|
||||
keyboard::builder::create_keyboard,
|
||||
screen::create_screens,
|
||||
watch::{WATCH_NAME, create_watch},
|
||||
watch::{create_watch, WATCH_NAME},
|
||||
},
|
||||
state::AppState,
|
||||
windowing::{
|
||||
OverlayID, OverlaySelector,
|
||||
set::{OverlayWindowSet, SerializedWindowSet},
|
||||
snap_upright,
|
||||
window::OverlayWindowData,
|
||||
OverlayID, OverlaySelector,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -197,13 +197,13 @@ impl<T> OverlayWindowManager<T> {
|
||||
return;
|
||||
};
|
||||
|
||||
if &*overlay.config.name == WATCH_NAME {
|
||||
if !overlay.config.default_state.grabbable {
|
||||
return; // FIXME: not a proper solution
|
||||
}
|
||||
|
||||
if enabled {
|
||||
self.wrappers
|
||||
.wrap_edit_mode(&mut overlay.config, app)
|
||||
.wrap_edit_mode(id, &mut overlay.config, app)
|
||||
.unwrap(); // FIXME: unwrap
|
||||
} else {
|
||||
self.wrappers.unwrap_edit_mode(&mut overlay.config);
|
||||
|
||||
@@ -285,6 +285,7 @@ impl OverlayWindowConfig {
|
||||
|
||||
// Contains the window state for a given set
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct OverlayWindowState {
|
||||
pub transform: Affine3A,
|
||||
pub alpha: f32,
|
||||
@@ -292,6 +293,7 @@ pub struct OverlayWindowState {
|
||||
pub interactable: bool,
|
||||
pub positioning: Positioning,
|
||||
pub curvature: Option<f32>,
|
||||
pub additive: bool,
|
||||
}
|
||||
|
||||
impl Default for OverlayWindowState {
|
||||
@@ -303,6 +305,7 @@ impl Default for OverlayWindowState {
|
||||
positioning: Positioning::Floating,
|
||||
curvature: None,
|
||||
transform: Affine3A::IDENTITY,
|
||||
additive: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user