✨ ags(bar/apps): change style on apps-window state changed
This commit is contained in:
+4
-5
@@ -251,14 +251,13 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover > box,
|
||||||
& > box {
|
&.open > box {
|
||||||
background: colors.$bg-primary;
|
background: colors.$bg-primary;
|
||||||
|
}
|
||||||
|
|
||||||
& > icon {
|
&:hover > box > icon {
|
||||||
-gtk-icon-transform: scale(1.14);
|
-gtk-icon-transform: scale(1.14);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import { Gtk, Widget } from "astal/gtk3";
|
import { Gtk, Widget } from "astal/gtk3";
|
||||||
import { tr } from "../../i18n/intl";
|
import { tr } from "../../i18n/intl";
|
||||||
import { Windows } from "../../windows";
|
import { Windows } from "../../windows";
|
||||||
|
import { bind } from "astal";
|
||||||
|
|
||||||
export function Apps(): Gtk.Widget {
|
export function Apps(): Gtk.Widget {
|
||||||
return new Widget.EventBox({
|
return new Widget.EventBox({
|
||||||
onClickRelease: () => Windows.open("apps-window"),
|
onClickRelease: () => Windows.open("apps-window"),
|
||||||
className: "apps",
|
className: bind(Windows, "openWindows").as((openWindows) =>
|
||||||
|
Object.hasOwn(openWindows, "apps-window") ? "apps open" : "apps"),
|
||||||
child: new Widget.Box({
|
child: new Widget.Box({
|
||||||
child: new Widget.Icon({
|
child: new Widget.Icon({
|
||||||
tooltipText: tr("bar.apps.tooltip"),
|
tooltipText: tr("bar.apps.tooltip"),
|
||||||
|
|||||||
Reference in New Issue
Block a user