💥 ags(center-window): fix big-media widget being cut because of the revealer
This commit is contained in:
+13
-24
@@ -5,7 +5,7 @@ import { getDateTime } from "../scripts/time";
|
|||||||
import { Separator, SeparatorProps } from "../widget/Separator";
|
import { Separator, SeparatorProps } from "../widget/Separator";
|
||||||
import { PopupWindow, PopupWindowProps } from "../widget/PopupWindow";
|
import { PopupWindow, PopupWindowProps } from "../widget/PopupWindow";
|
||||||
import { BigMedia } from "../widget/center-window/BigMedia";
|
import { BigMedia } from "../widget/center-window/BigMedia";
|
||||||
import AstalMpris from "gi://AstalMpris?version=0.1";
|
import AstalMpris from "gi://AstalMpris";
|
||||||
|
|
||||||
export const CenterWindow = (mon: number) => PopupWindow({
|
export const CenterWindow = (mon: number) => PopupWindow({
|
||||||
namespace: "center-window",
|
namespace: "center-window",
|
||||||
@@ -50,29 +50,18 @@ export const CenterWindow = (mon: number) => PopupWindow({
|
|||||||
} as Widget.BoxProps)
|
} as Widget.BoxProps)
|
||||||
]
|
]
|
||||||
} as Widget.BoxProps),
|
} as Widget.BoxProps),
|
||||||
new Widget.Revealer({
|
Separator({
|
||||||
revealChild: bind(AstalMpris.get_default(), "players").as(players =>
|
orientation: Gtk.Orientation.HORIZONTAL,
|
||||||
players.filter(player => player.available).length > 0),
|
alpha: .5,
|
||||||
transitionDuration: 220,
|
cssColor: "gray",
|
||||||
transitionType: Gtk.RevealerTransitionType.SLIDE_RIGHT,
|
visible: bind(AstalMpris.get_default(), "players").as(players => players.length > 0),
|
||||||
child: new Widget.Box({
|
size: 1
|
||||||
children: [
|
} as SeparatorProps),
|
||||||
Separator({
|
new Widget.Box({
|
||||||
orientation: Gtk.Orientation.HORIZONTAL,
|
className: "vertical right",
|
||||||
alpha: .5,
|
orientation: Gtk.Orientation.VERTICAL,
|
||||||
cssColor: "gray",
|
child: BigMedia()
|
||||||
size: 1
|
} as Widget.BoxProps)
|
||||||
} as SeparatorProps),
|
|
||||||
new Widget.Box({
|
|
||||||
className: "vertical right",
|
|
||||||
orientation: Gtk.Orientation.VERTICAL,
|
|
||||||
children: [
|
|
||||||
BigMedia()
|
|
||||||
]
|
|
||||||
} as Widget.BoxProps)
|
|
||||||
]
|
|
||||||
} as Widget.BoxProps)
|
|
||||||
} as Widget.RevealerProps)
|
|
||||||
]
|
]
|
||||||
} as Widget.BoxProps)
|
} as Widget.BoxProps)
|
||||||
} as PopupWindowProps);
|
} as PopupWindowProps);
|
||||||
|
|||||||
Reference in New Issue
Block a user