diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-16 16:02:57 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-16 16:02:57 +1100 |
| commit | bb0a071034b1a27d92a912332fe643998e4bd9ce (patch) | |
| tree | 8ca75a9079992b33add062c6ff9ccab991808b59 /utils | |
| parent | config: lock osds spacing (diff) | |
| download | caelestia-shell-bb0a071034b1a27d92a912332fe643998e4bd9ce.tar.gz caelestia-shell-bb0a071034b1a27d92a912332fe643998e4bd9ce.tar.bz2 caelestia-shell-bb0a071034b1a27d92a912332fe643998e4bd9ce.zip | |
popupwindow: remove opacity
It doesn't actually do anything?
I just realised that Hyprland also does the fade so no point
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/widgets.tsx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/utils/widgets.tsx b/utils/widgets.tsx index 7fddd04..51986ec 100644 --- a/utils/widgets.tsx +++ b/utils/widgets.tsx @@ -47,7 +47,7 @@ export const setupCustomTooltip = (self: any, text: string | Binding<string>) => export const setupChildClickthrough = (self: any) => self.connect("size-allocate", () => self.get_window()?.set_child_input_shapes()); -const overrideProp = <T,>( +const extendProp = <T,>( prop: T | Binding<T | undefined> | undefined, override: (prop: T | undefined) => T | undefined ) => prop && (prop instanceof Binding ? prop.as(override) : override(prop)); @@ -58,21 +58,14 @@ export const convertPopupWindowProps = (props: Widget.WindowProps): Widget.Windo ...props, visible: false, application: App, - name: props.monitor - ? overrideProp(props.name, n => (n && props.monitor ? n + props.monitor : undefined)) - : props.name, - namespace: overrideProp(props.name, n => `caelestia-${n}`), - className: overrideProp(props.className, c => `popup-window ${c}`), + name: props.monitor ? extendProp(props.name, n => (n ? n + props.monitor : undefined)) : props.name, + namespace: extendProp(props.name, n => `caelestia-${n}`), onKeyPressEvent: (self, event) => { // Close window on escape if (event.get_keyval()[1] === Gdk.KEY_Escape) self.hide(); 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 }); |