In the "Settings" Tab, change the way to have a Switch to resolve an anckors-row conflict

Bug #1195553 reported by londumas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sudoku App
Fix Released
Undecided
Frédéric Delgado

Bug Description

Hello again,

In your "Settings" tab, you have a Switch to show/hide hints, you have coded that with a row and a Label and a Switch. This result on an error:
"file:///home/helion/DOC/sudoku-app/sudoku-app.qml:314:21: QML Row: Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row. Row will not function."
The solution is to use a "ListItem.Standard" and a "control" (see file:///usr/share/ubuntu-ui-toolkit/doc/html/qml-ubuntu-components-listitems0-standard.html)

Here what should be done according to me:

        ListItem.Standard {
            //TRANSLATORS: context here
            text: i18n.tr("label")
            control: Switch {
                id: switchId
                anchors.horizontalCenter: parent.horizontalCenter
                anchors.verticalCenter: parent.verticalCenter
                checked: true
                onCheckedChanged: {
                    print("Hello World!");
                }
            }
        }

This will resolve anckors-row issues.

Thanks again for your app.

londumas (helion331990)
description: updated
summary: - In the Settings Tab, change the way to have a Switch to resolve an
+ In the "Settings" Tab, change the way to have a Switch to resolve an
anckors-row conflict
Changed in sudoku-app:
assignee: nobody → Frédéric Delgado (fredoust)
Changed in sudoku-app:
status: New → Fix Committed
Revision history for this message
londumas (helion331990) wrote :

I have seen in your fix that you have let "//TRANSLATORS: context here". If you do that, I think that in the translations in Launchpad, a context will apear with "context here" written. You should ether delete this line or write something like "//TRANSLATORS: text of a ListItem.Standard with a control in it to toggle showing hints".

Thank to have take my bugs reports into account.

Revision history for this message
Frédéric Delgado (fredoust) wrote :

Oops... Done.

Thanks.

Changed in sudoku-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.