Public bug reported:

If you add an iconName to a button without a set width anchored to one
side only, the sizing isn't correct.

Please find attached 2  screenshots demonstrating this issue: there are 2 
buttons, one anchored to the left, the other anchored to the right.
If you set the iconName to anything, the right button will expand way beyond 
its needed width.


Minimal reproducer:

import QtQuick 2.4
import Ubuntu.Components 1.2

MainView {
    id: mainview
    objectName: "mainView"
    applicationName: "splitthebill.didrocks"

    width: units.gu(40)
    height: units.gu(75)


    Page {

        Button {
            text: "Reset"
            color: UbuntuColors.red
            anchors.left: parent.left
        }

        Button {
            iconName: "add"
            text: "Archive"
            color: UbuntuColors.green
            anchors.right: parent.right
        }
    }
}

** Affects: ubuntu-ui-toolkit (Ubuntu)
     Importance: High
         Status: Confirmed


** Tags: devexp

** Attachment added: "withouticons.png"
   
https://bugs.launchpad.net/bugs/1478839/+attachment/4434996/+files/withouticons.png

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1478839

Title:
  Adding iconName to Button screw its automatic sizing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1478839/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to