In portrait mode the buttons in the control bar may span out of the window in portrait mode. The buttons should shrink to avoid this case. Reproducible: Always Steps to Reproduce: 1. Start GCompris 2. Resize the window width at the max possible Actual Results: The config button in the bar is cut Expected Results: The button in the control bar should be shrinked to accomodate the small width.
Created attachment 96646 [details] Fix for the Bug I added some variables and a function in order to compute the values needed to resize the buttons. It works both in home menu and in activities. Observation: in some activities, in portrait mode, the "sublevel count" overrides the "next level" button (i.e. "Algorithm"), but its drawn in every activity that uses sublevels, so i couldn't make any changes regarding it from the "bar.qml" file.
(In reply to Stefan Toncu from comment #1) > Created attachment 96646 [details] > Fix for the Bug > > I added some variables and a function in order to compute the values needed > to resize the buttons. Best next step would be to open a review request on https://git.reviewboard.kde.org/ for gcompris and assign it to group gcompris. Reviewing code is better done there. Anyway, some nitpicks on your diff: + * type: real + * Minimum size for BarZoom + */ + property real minWidth: (parent.width-20- 10 * ApplicationInfo.ratio)/totalWidth properties, that don't change should be readonly property and don't need to be documented (does no harm of course ;-) + totalWidth+=computeWidth(buttonList[def].bid) + noButtons++ You probably could use property binding for totalWidth (http://doc.qt.io/qt-5/qtqml-syntax-propertybinding.html) which is the recommended way to dynamically change such values. But well it works nicely, so fine for me to keep it as is. > It works both in home menu and in activities. Yeah looks nice! Two things I noticed: 1. The levelText is the only element in the bar that is not yet scaled together with the other buttons. We could probably either use pixelSize and scale that down, or keep fontSize (== pointSize) and use a scale value. 2. When the buttons are already downscaled and you go from level 9 to level 10 the bar expands to display the additional digit in levelText and pushes the rightmost button out of the visible area. > > Observation: in some activities, in portrait mode, the "sublevel count" > overrides the "next level" button (i.e. "Algorithm"), but its drawn in every > activity that uses sublevels, so i couldn't make any changes regarding it > from the "bar.qml" file. Ack, in these cases the Score element should be moved to another place (if necessary depending on orientation). Do you want to fix this also? ;-)
Hi! Thank you for your comment and for you advice. I will upload my patch on reviewBoard and try to make the changes you highlighted; Regarding the Score element, i would like to do it, but i don't have time right now because i have to study for my exams. If it's possible, i would still want to work at it after i finish with my exams.
commit aef8ab5