https://bugs.kde.org/show_bug.cgi?id=357901

Holger Kaelberer <holge...@elberer.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |holge...@elberer.de

--- Comment #2 from Holger Kaelberer <holge...@elberer.de> ---
(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? ;-)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to