[ListItem.SingleControl] Does not respect the default inner margins

Bug #1194844 reported by Sebastien Bacher
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-system-settings (Ubuntu)
Fix Released
Undecided
Unassigned
ubuntu-system-settings-online-accounts (Ubuntu)
Fix Released
Undecided
Unassigned
ubuntu-ui-toolkit (Ubuntu)
Won't Fix
Medium
Zsombor Egri

Bug Description

Some of system settings design use lists with buttons in the middle, those should use the same spacing as other list items.

The margins for ListItem.Standard text seems to be units.gu(2), which leads to code like that one to get the right result:

" ListItem.SingleControl {
            control: Button {
                anchors {
                    leftMargin: units.gu(2)
                    rightMargin: units.gu(2)
                    topMargin: units.gu(1)
                    bottomMargin: units.gu(1)
                    fill: parent
                }
                text: "Some button to click"
            }
        }"

It's a bit tedious to have to specify all the margins like that, it also feels wrong because it would break if the toolkit change ... is there a better way to do that?

Tags: listitems
Revision history for this message
Sebastien Bacher (seb128) wrote :

That screenshot show a list with different spacing, mpt said the correct one is 2 gu spaces horizontal and 1 gu vertical...

Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
Florian Boucault (fboucault) wrote :

Try:

ListItem.Base {
    Button {
        anchors {
            verticalCenter: parent.verticalCenter
            right: parent.right
            left: parent.left
        }
    }
}

summary: - [ListItem] should provide an easy way to add a button entry with
- adequate spacing
+ [ListItem.SingleControl] Does not respect the default inner margins
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-system-settings - 0.1+13.10.20130628-0ubuntu1

---------------
ubuntu-system-settings (0.1+13.10.20130628-0ubuntu1) saucy; urgency=low

  [ Sebastien Bacher ]
  * Use Base items for buttons, instead of SingleControl ones (until bug
    #1194844 is fixed in the ui toolkit). That should give us correct
    margins for those items. (LP: #1194844)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 73
 -- Ubuntu daily release <email address hidden> Fri, 28 Jun 2013 07:01:06 +0000

Changed in ubuntu-system-settings (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-system-settings-online-accounts - 0.2~+13.10.20130628-0ubuntu1

---------------
ubuntu-system-settings-online-accounts (0.2~+13.10.20130628-0ubuntu1) saucy; urgency=low

  [ Ken VanDine ]
  * Don't include the example provider and plugin in the installed
    package .

  [ Sebastien Bacher ]
  * Use Base items for buttons, instead of SingleControl ones (until bug
    #1194844 is fixed in the ui toolkit). That should give us correct
    margins for those items. Use the same spacing for the labels. (LP:
    #1194844)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 23
 -- Ubuntu daily release <email address hidden> Fri, 28 Jun 2013 07:01:01 +0000

Changed in ubuntu-system-settings-online-accounts (Ubuntu):
status: New → Fix Released
Changed in ubuntu-ui-toolkit:
assignee: nobody → Florian Boucault (fboucault)
Revision history for this message
Zsombor Egri (zsombi) wrote :

This will be handled by the new ListItemLayout component.

Changed in ubuntu-ui-toolkit:
assignee: Florian Boucault (fboucault) → nobody
status: Confirmed → In Progress
assignee: nobody → Zsombor Egri (zsombi)
tags: added: listitems
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Zsombor Egri (zsombi)
importance: Undecided → Medium
status: New → In Progress
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-ui-toolkit
Revision history for this message
Zsombor Egri (zsombi) wrote :

We decided that we will not make any common layouts for the ListItems. Every application will have to create their layouts or use some common components module to define layouts if needed, depending on the performance requirements.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Won't Fix
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.