Skip to content

Make HeaderBar resizeable

The original goal was to implement a way to hide the header bar, so other components would have more space. I decided the best way to implement this without breaking other features / UX was to make the header bar shrinkable to the point where only the media control bar remains visible.

I am mostly happy with the result, but there are a few problems on which I'd like some feedback.

Real:

  • The SplitterHandle..
    • .. is very narrow. Making it bigger looks a bit off.
    • .. now has the cursor changing to indicate that it can be dragged to resize it. However this does not work correctly. If I understand it right the cursor also changes when it's one pixel below the handle, at which point resizing does not work. As a result, actually resizing the header might need a few tries (bad UX). I don't know how to fix it yet.
  • When shrinking..
    • I change the layout for title/artist/album from vertical to horizontal. This looks a little weird..
    • When shrinking more, the text looses it's upper margin - I have no idea why
    • When the text is too small to be displayed, I hide it - at this point, collapsing the view would seem better, but I don't yet know how to do it in QML.

In summary I believe, the layouting weirdness is acceptable and the whole patch is still an improvement.. not perfect though..

Hypothetical:

  • I upgraded imported versions: QtQuick to 2.15 and QtQuick.Controls to 2.13.
  • running ElisaQmlTests::TestNavigationActionBar fails 3 times. Namely at test_filterState(), test_filterText() and test_showArtist(). When I manually try to do what I believe these should test for, I can't see any problems. I also don't know how my changes would affect this. Maybe this has something to do with my setup? Or are these tests broken?

Note: while I have long experience with other parts of Qt, this is my first time using QML - so any feedback on beginners mistakes is appreciated ;)

Merge request reports