Skip to content

Fix style issues (Label.verticalAlignment and ScrollView.background)

Jack Hill requested to merge jackh/elisa:fix-text-alignment into master

Reason for the change

We were relying on non-standard behaviour in qqc2-desktop-style which caused issues with other styles.

  • The default text alignment in Qt is Text.AlignTop but qqc2-desktop-style used to centre-align labels with only 1 line of text.
  • Only qqc2-desktop-style has a ScrollView.background so we must check whether it is null before setting its visibility.

Test plan

Launch Elisa with qqc2-breeze-style or Material style

  • Previously the playlist track/disc number was aligned to the top, now it is aligned to the centre.

  • Previously opening the settings dialog would display a warning, and the music locations list items were mis-aligned. Now there is no warnings and the items are centre-aligned.

Screenshots or screen recordings

(Screenshots with Material style)

Before After
Before After
Edited by Jack Hill

Merge request reports