p-connor / plasma-drawer

A customizable fullscreen launcher widget for KDE Plasma
84 stars 4 forks source link

[Bug] Drawer looks terrible when screen is rotated #26

Closed k4ever closed 1 year ago

k4ever commented 1 year ago

As the title suggests, when the screen is rotated on a tablet PC, the drawer doesn't resize properly for the new orientation. That's makes the drawer look "terrible" with icons half on and half off the screen. I've tested this on a Surface Pro 8.

p-connor commented 1 year ago

Hey there, can you provide screenshots of the issue? This will help determine where and how fixable the problem is. Does the issue only happen when the screen is rotated while the launcher is open, or just any time that the launcher is opened in portrait mode? Thanks

k4ever commented 1 year ago

Hi. Thanks for taking a look at this. This happens when the screen is rotated while the launcher is open and any time that the launcher is opened in portrait mode. My Surface Keyboard disables itself in portrait mode, so I had to take pictures of the screen with my phone. The pictures are attached: 20230123_114249 20230123_114301 20230123_114353 20230123_114410

k4ever commented 1 year ago

The first picture is obvious (the screen in landscape mode prior to opening the drawer). The second picture is the drawer in landscape mode (no issue). The third is the drawer kept open and the screen rotated to portrait mode. Notice the the folders don't rearrange themselves for the new orientation, which causes the left and right outer folders to be clipped. The fourth picture in the menu opened while the screen is in portrait mode. The results are the same as the third picture.

p-connor commented 1 year ago

Ah ok, yep that makes sense. The launcher was not designed to be configured for more than one screen width at a time. If you right click the widget icon, select “Configure Plasma Drawer”, and change the number of columns in grid to 3, does that fix the overlap in portrait mode?

k4ever commented 1 year ago

Ok, that does make sense. I changed the number of columns in the grid to 3. That worked, but had a lot of dead space in landscape and portrait mode. Changing the number of columns in the grid to 4 looks better in both modes. Ideally, it would be great if the drawer resized itself for the rotation, similar to what LaunchPad Plasma Dark does: https://github.com/adhec/launchpad-plasma (maybe Adhe might be able to help you implement it?)

However, I think your launcher looks a lot better. The only thing it's missing now, especially with the number of columns set to 4, is a better way to scroll with a touchscreen. That's keeping me from switching over to it as my main launcher.

20230123_141707 20230123_141739

p-connor commented 1 year ago

Yep, I think dynamic scaling is definitely the way to go in this case. I had first taken the approach that if it was configurable, it was fine since a user could configure the number of columns to match their specific screen size. However, in this case the screen size changes constantly, so a dynamic option is important.

I think I'll make the config option "Max columns" instead, which will let the launcher fill the screen width with columns by default up until the max number of columns is reached or the screen width is filled. This should resolve your issue while also keeping the grid customizable. I should be able to roll this out sometime this week with some other fixes, including a scrollbar for the apps grid which should help your scrolling issue (search results scrolling will probably come later unfortunately as it's more complex).

k4ever commented 1 year ago

Thank you very much! I will definitely be looking forward to your changes.

p-connor commented 1 year ago

Issue closed by b5f2f0bf250c60bcd9104563b498127d7404a8e7

p-connor commented 1 year ago

I've rolled out the fix in the latest version. Let me know if that fixes it for you!

k4ever commented 1 year ago

It's not working! I updated to the latest version. The scroll indicator is there, but the columns don't resize when the screen is rotated. Also, now I can't change the "Max columns in grid" setting. It's stuck on 5. I've entered 4 and 6, but it still shows 5 columns no matter what the setting is.

k4ever commented 1 year ago

Never mind! It's working fine. I had to restart Plasma/my tablet. Thank you!

p-connor commented 1 year ago

Whew, glad to hear