Aylur / astal

Building blocks for creating custom desktop shells
https://aylur.github.io/astal/
GNU Lesser General Public License v2.1
279 stars 35 forks source link

Fix black srceen error in applauncher example (issue #98) #112

Open ReStranger opened 1 week ago

ReStranger commented 1 week ago
Aylur commented 6 days ago

please don't change the styling

ReStranger commented 6 days ago

sorry, it's my formater

Aylur commented 6 days ago

It is 4000 thousand because in my experience it can be any number and will still work as expected so I just chose a very high number so that it works on wide monitors too. But if it can cause issue it should be calculated from the width of the monitor instead, or drop the this approach and just make it fullscreen. The reason the window itself is only anchored to the top and bottom instead of all corners (making it fullscreen) is because on a fullscreen widget labels will span across the full width of the widget and you'd have to set wrap maxWidthChars={/*number*/} in order to wrap them, while with this current approach it setting a min-width on the window will essentially work as man-width that labels will obey and wrap automaically.

What compositor are you running on where it results in a black screen?

calebstewart commented 1 day ago

I am also seeing this behavior (commenting here in lieu of the closed issue). I'm using Hyprland. I have three 4K monitors connected w/ resolutions of 3840x2160 with 1.25x fractional scaling enabled. Hyprland version output, if it's helpful:

❯ Hyprland --version
Hyprland 0.45.0 built from branch main at commit a425fbebe4cf4238e48a42f724ef2208959d66cf  (version: bump to 0.45.0).
Date: 2024-11-09
Tag: v0.45.0, commits: a425fbebe4cf4238e48a42f724ef2208959d66cf
built against aquamarine 0.4.4

flags set:
debug

Changing the widthRequest to 400 does make the example work for me as well.