Aylur/ags

shadow bugs if element gets moved

biskyy opened this issue · 1 comments

hi! i'm using Abaan404 config files for ags and after messing around for a bit i managed to add shadows to his bar widgets. however when a revealer widget transitions it causes other elements that are pushed to lose their shadow and sort of bug out as seen in the attached video

2024-09-22.21-42-58.mp4

i've tried to force the workspace widget to redraw itself in hope it will also fix the shadow but it also doesnt seem to work:

const launcher_revealer = Widget.Revealer({
  transition: "slide_left",
  transitionDuration: 500,
  child: Widget.Label("Launcher"),
  css: "padding-left: 10px;", // add padding when shown
});

const BarWorkspaces = BarWidget({
  class_name: "workspaces",
  box: {
    spacing: 20,
    setup: (widget) => {
      launcher_revealer.on("draw", () => {
        console.log("hi");
        widget.queue_draw();
      });
	  // other code
	},
  },
});

I would be thankful for any clue.

p.s: also does anyone know why the shadow doesnt render on the right side of a widget?

  1. shadows don't render outside layershells, you have to add margins to the widgets to "give them space" to render shadows
  2. shadows might not render correctly outside the bounding box of a revealer.

do something like this

revealer > box {
  margin: 6px;
  box-shadow: 3px 3px 0 3px black;
}