Caption listitems left margin is different from normal items

Bug #1314672 reported by Matthew Paul Thomas on 2014-04-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-system-settings (Ubuntu)
Low
Andrea Bernabei
ubuntu-ui-toolkit (Ubuntu)
Undecided
Unassigned
Vivid
Undecided
Unassigned

Bug Description

Ubuntu 14.04 r2; Ubuntu 15.04 r6

1. Go to any control that has a caption. For example:
- "Automatic brightness" in the Brightness screen
- "Auto capitalization" and "Auto punctuation" in the Language & Text screen
- "Notifications and quick settings" in the Phone Locking screen.

What you see: The caption starts nearly at the left edge of the screen.

What you should see: The left edge of a caption should be lined up exactly with the left edge of the label above it.

This might be a toolkit problem.

Related branches

description: updated
Sebastien Bacher (seb128) wrote :

That's indeed a ListItem.Caption issue, reassigning to the toolkit

Changed in ubuntu-system-settings (Ubuntu):
importance: Undecided → Low
affects: ubuntu-system-settings (Ubuntu) → ubuntu-ui-toolkit (Ubuntu)
summary: - "Brightens and dims the display..." is misaligned
+ Caption listitems left margin is different from normal items
affects: ubuntu-ui-toolkit (Ubuntu) → ubuntu-ui-toolkit
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
assignee: nobody → Zsombor Egri (zsombi)
Zoltan Balogh (bzoltan) on 2014-11-24
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Zsombor Egri (zsombi)
importance: Undecided → Low
status: New → Confirmed
Zsombor Egri (zsombi) wrote :

The Caption aligns the text horizontally centered by design. The component has never been revisited by design and with the new ListItem it became deprecated in v1.2. Please use the new ListItem with a Label or if no divider is needed, a simple Item can do the job as well.

Also beware that the new ListItem has no layout on purpose, and it was a design decision not to have any layout for it.

no longer affects: ubuntu-ui-toolkit
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → Won't Fix
Matthew Paul Thomas (mpt) wrote :

Reproduced in Ubuntu 15.04 r6. Zsombor, if a bug should be fixed elsewhere, please move it to that component rather than marking it Won't Fix.

affects: ubuntu-ui-toolkit (Ubuntu) → ubuntu-system-settings (Ubuntu)
Changed in ubuntu-system-settings (Ubuntu):
status: Won't Fix → New
description: updated
Zsombor Egri (zsombi) wrote :

Mathew, the "won't fix" means doesn't fit into project plans. As the ListItems module got deprecated, and as we re focusing on convergence, we do not have the time/resources to fix this. However anyone having spare time can provide fox to it. This is an open source project, anyone needing a fix on a deprecated component can contribute. From our side this is won't fix.

Changed in ubuntu-system-settings (Ubuntu):
status: New → Won't Fix
Changed in ubuntu-system-settings (Ubuntu):
status: Won't Fix → New
Matthew Paul Thomas (mpt) wrote :

I'm the designer of System Settings. It is a bug in System Settings that the captions do not line up with the labels. Either this is a toolkit bug or it isn't. If it is, it shouldn't be Won't Fix because, as you say, "anyone needing a fix on a deprecated component can contribute". And if it isn't, why are you marking a bug as Won't Fix for a component that you aren't a developer for?

Changed in ubuntu-system-settings (Ubuntu):
status: New → In Progress
assignee: Zsombor Egri (zsombi) → Andrea Bernabei (faenil)
Tim Peeters (tpeeters) wrote :

The Caption is an Item with a Label inside. Wouldn't it in this case be better in system-settings to simply implement that?

Andrea Bernabei (faenil) wrote :

of course, moving everything to Captions would be better, but since that will take a while, we need a short term fix as well.

My proposal is fixing ListItem.Caption (the apps which used custom margins for captions will have to fix that, this is a backdraw, of course), and creating tasks to update all apps to use Captions instead of ListItem.Caption

Tim Peeters (tpeeters) wrote :

I meant to add a simple Caption component in system-settings because the component is very simple, and probably different apps will want different margins/fonts/...

If you do that, it will not affect other apps. I don't know which apps use ListItems.Caption now but if they exist, then we will get complaints for breaking those.

So is this a request from design to change the design of Caption in *all* apps? Or is it only specific for system-settings?

Andrea Bernabei (faenil) wrote :
Download full text (8.5 KiB)

Here's a vague reply to the questions, "how many core apps use ListItem.Caption?" "Will we break all the apps if we change the Caption element?"

Basically system-settings is the only core app using ListItem.Caption, it seems :)

phablet@ubuntu-phablet:~$ sudo grep --include=*.qml -rn '/' -e "Caption"
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:22: \qmltype Captions
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:44: Captions {
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:45: title.text: "Caption"
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:51: Captions {
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:52: captionStyle: Ubuntu.SummaryCaptionStyle
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:62: Captions {
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:63: title.text: "Caption"
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:80: \li \b Ubuntu.TitleCaptionStyle - (default) typical configuration for a left aligned
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:83: \li \b Ubuntu.SummaryCaptionStyle - configuration for a right-aligned twin label setup,
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:87: property int captionStyle: Ubuntu.TitleCaptionStyle
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:105: Layout.fillWidth: (captionStyle == Ubuntu.TitleCaptionStyle)
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:106: Layout.alignment: Qt.AlignVCenter | ((captionStyle == Ubuntu.SummaryCaptionStyle) ? Qt.AlignRight : Qt.AlignLeft)
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:108: Layout.maximumWidth: (captionStyle == Ubuntu.SummaryCaptionStyle) ? units.gu(6) : parent.width
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:109: Layout.preferredWidth: (captionStyle == Ubuntu.SummaryCaptionStyle) ? Layout.maximumWidth : 0
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:132: fontSize: (captionStyle == Ubuntu.SummaryCaptionStyle) ? "small" : "medium"
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:133: horizontalAlignment: (captionStyle == Ubuntu.SummaryCaptionStyle) ? Text.AlignRight : Text.AlignLeft
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:135: elide: (captionStyle == Ubuntu.TitleCaptionStyle) ? Text.ElideRight : Text.ElideNone
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:144: horizontalAlignment: (captionStyle == Ubuntu.SummaryCaptionStyle) ? Text.AlignRight : Text.AlignLeft
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:146: maximumLineCount: (captionStyle == Ubuntu.TitleCaptionStyle) ? 2 : 1
/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/1.2/Captions.qml:147: wrapMode: (captionStyle == Ubuntu.TitleCaptionStyle) ? Text.Wrap : Text.NoWrap
/usr...

Read more...

Andrea Bernabei (faenil) wrote :

The final decision was to modify ListItem.Caption :)

I created an MR with the fix, and it's been approved, so this should land soon :)

Tim Peeters (tpeeters) on 2015-05-27
Changed in ubuntu-system-settings (Ubuntu):
status: In Progress → Fix Committed
Zsombor Egri (zsombi) on 2015-07-14
Changed in ubuntu-system-settings (Ubuntu):
status: Fix Committed → Fix Released
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers