popupwindow: remove opacity
It doesn't actually do anything? I just realised that Hyprland also does the fade so no point
This commit is contained in:
parent
31056d48bd
commit
bb0a071034
2 changed files with 3 additions and 19 deletions
|
|
@ -17,15 +17,6 @@ label.icon {
|
||||||
@include font.icon;
|
@include font.icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-window {
|
|
||||||
transition: opacity 300ms linear;
|
|
||||||
opacity: 0;
|
|
||||||
|
|
||||||
&.visible {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
separator,
|
separator,
|
||||||
.separator {
|
.separator {
|
||||||
@include lib.rounded(2);
|
@include lib.rounded(2);
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export const setupCustomTooltip = (self: any, text: string | Binding<string>) =>
|
||||||
export const setupChildClickthrough = (self: any) =>
|
export const setupChildClickthrough = (self: any) =>
|
||||||
self.connect("size-allocate", () => self.get_window()?.set_child_input_shapes());
|
self.connect("size-allocate", () => self.get_window()?.set_child_input_shapes());
|
||||||
|
|
||||||
const overrideProp = <T,>(
|
const extendProp = <T,>(
|
||||||
prop: T | Binding<T | undefined> | undefined,
|
prop: T | Binding<T | undefined> | undefined,
|
||||||
override: (prop: T | undefined) => T | undefined
|
override: (prop: T | undefined) => T | undefined
|
||||||
) => prop && (prop instanceof Binding ? prop.as(override) : override(prop));
|
) => prop && (prop instanceof Binding ? prop.as(override) : override(prop));
|
||||||
|
|
@ -58,21 +58,14 @@ export const convertPopupWindowProps = (props: Widget.WindowProps): Widget.Windo
|
||||||
...props,
|
...props,
|
||||||
visible: false,
|
visible: false,
|
||||||
application: App,
|
application: App,
|
||||||
name: props.monitor
|
name: props.monitor ? extendProp(props.name, n => (n ? n + props.monitor : undefined)) : props.name,
|
||||||
? overrideProp(props.name, n => (n && props.monitor ? n + props.monitor : undefined))
|
namespace: extendProp(props.name, n => `caelestia-${n}`),
|
||||||
: props.name,
|
|
||||||
namespace: overrideProp(props.name, n => `caelestia-${n}`),
|
|
||||||
className: overrideProp(props.className, c => `popup-window ${c}`),
|
|
||||||
onKeyPressEvent: (self, event) => {
|
onKeyPressEvent: (self, event) => {
|
||||||
// Close window on escape
|
// Close window on escape
|
||||||
if (event.get_keyval()[1] === Gdk.KEY_Escape) self.hide();
|
if (event.get_keyval()[1] === Gdk.KEY_Escape) self.hide();
|
||||||
|
|
||||||
return props.onKeyPressEvent?.(self, event);
|
return props.onKeyPressEvent?.(self, event);
|
||||||
},
|
},
|
||||||
setup: self => {
|
|
||||||
self.connect("notify::visible", () => self.toggleClassName("visible", self.visible));
|
|
||||||
props.setup?.(self);
|
|
||||||
},
|
|
||||||
borderWidth: 20, // To allow shadow, cause if not it gets cut off
|
borderWidth: 20, // To allow shadow, cause if not it gets cut off
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue