Skip to content

PinePhone improvements

Joshua Goins requested to merge (removed):pinephone into master

Hello it's me again! :-) This time I have some improvements to help run this on a PinePhone, but this generally applies to any small form factor screen. Kirigami handles most of this for us, so why not read licenses on the go?

untitled

(Note: the "Show License" button only shows up on mobile devices. The desktop interface looks identical under my testing.)

The root of the issue was caused by LicensePanel being a OverlayDrawer, despite it being forced into the contextDrawer slot. I fixed this up by changing it to a proper ContextDrawer, but carefully replicating the current desktop behavior. This way, Kirigami handles the mobile ContextDrawer and we don't have to. Originally I saw you tried to place this drawer on the bottom edge, but during my testing Kirigami really did not like this. Also, if we placed it at the bottom, we would have to shrink the main license text and all of that gubbins, which would've been way more complex than simply leaving it on the side.

There's also smaller changes done, like adjusting the license panel width to just one unit shorter (to about 20, seems to be the "standard" in Kirigami) which perfectly fits this screen.

Just a quick note though, I hate this line:

    minimumWidth: !Kirigami.Settings.isMobile ? Kirigami.Units.gridUnit * 50 : 0
    minimumHeight: !Kirigami.Settings.isMobile ? Kirigami.Units.gridUnit * 20 : 0

I'm not really sure how to best set the "default" value. It works just fine, but I'm not really happy with this solution or anything else surrounding the default width/height and how to properly set it between desktop/mobile devices.

Merge request reports