← Back to team overview

touch-packages team mailing list archive

[Bug 1478839] Re: Adding iconName to Button screw its automatic sizing

 

** Attachment added: "withicons.png"
   https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1478839/+attachment/4435006/+files/withicons.png

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1478839

Title:
  Adding iconName to Button screw its automatic sizing

Status in ubuntu-ui-toolkit package in Ubuntu:
  Confirmed

Bug description:
  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
          }
      }
  }

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


References