wmww / gtk4-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol and GTK4
MIT License
128 stars 4 forks source link

setMargin and widget css magins interact poorly. #37

Open YellowOnion opened 3 months ago

YellowOnion commented 3 months ago

I have a simple application with:

* { margin: 3px 6px; }

and Haskell code:

  GLS.setAnchor win GLS.EdgeBottom True
  GLS.setMargin win GLS.EdgeTop 3
  GLS.setMargin win GLS.EdgeLeft 3
  GLS.setMargin win GLS.EdgeBottom 3

You'll notice that none of the margins match in this picture, the Top margin is 6px, the left margin is 12px, and the bottom is 0.

I would assume that the margins would set at 3px/6px via the css or the hard coded values in code, but this seems to create some strangle interaction between both methods of setting this, including overflowing to the southern border.

(GLS is the black/orange bar)

image