Skip to content

Main: Adjustments to 'playericon' positioning, wrapping for 'playerModeText'

Eamonn Rea requested to merge eamonnrea/kanagram:changemode-text-wrap into master

This MR fixes some text wrapping problems with the playerModeText at higher resolutions. Since the text grows in proportion with the window width, it can get cut off. Prior to this MR which added more padding to the button, this could happen if the window was simply maximized, but now takes more effort to reproduce with the padding changes.

The playericon was also set to a fixed width and height of 60. Again when at higher window sizes or maximized on 16:9 1080p displays or above, the icon stays at this size and so looks small in particular compared to the powerButton icon. This MR addresses this by making the styling and positioning for playericon mirror that of the powerButton icon, with changes in leftMargin and sizing to accommodate the difference in raw image size.

Before (master)

Note that in the first screenshot, the icons look fine and so does the text. But in the second screenshot, the playericons fixed sizing becomes more obvious, and the text under the icon is cut off. To reproduce this the window only needs to be maximized on a 1080p 16:9 display.

image.png

image.png

After (This MR)

In the first screenshot, both the playericon and powerButton should appear similarly even like in the first screenshot on master. In the second screenshot, with the altered positioning for the playericon, the text no longer gets cut off just by being fullscreen, and the icons should appear more symmetrical. To reproduce the text being cut off, I attached a third screenshot with a very wide window width to showcase that the text now wraps.

image.png

image.png

image.png


This MR continues to use the pattern of raw values instead of something like Kirigami Units. Let me know if it would be preferred to use a different approach. On a similar note, the changes made in this MR were made for reasons outlined above, but they are still subjective reasons, though with the hope of helping improve the user interface. All feedback is welcome on these changes. The primary goal I set out with was to fix the cut-off "Change Mode" text (I originally forked Kanagram to fix this, but couldn't figure out how until after working on !32 (merged)).

Thanks!

Merge request reports