PageHeadStyle should coordinate Page.head.contents and the ActionBar to not overlap, if possible

Bug #1493178 reported by Michael Terry
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Fix Released
High
Tim Peeters

Bug Description

In my app "Lone Wolf", I use Page.head.contents to add an interactive widget to the page header. It looks like this:
https://myapps.developer.ubuntu.com/site_media/appmedia/2015/09/screenshot20150803_125313389.png

In SDK 1.3, there are up to three action icons shown, instead of the one in SDK 1.2. This means the header is too crowded and Page.head.contents may overlap the action icons, depending on how long the page title is (and how wide the screen is of course).

Looking at PageHeadStyle.qml, there is no relationship between Page.head.contents.width and ActionBarStyle.width. But I think there should be.

I don't seem to have any control over ActionBarStyle.numberOfSlots myself. Or any control over how wide the ActionBar is.

In short, I can't figure out how to replicate my header behavior with SDK 1.3. Maybe the answer is I shouldn't stick widgets in the header? But otherwise, I'd consider this a bug.

Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Confirmed
assignee: nobody → Tim Peeters (tpeeters)
Revision history for this message
Tim Peeters (tpeeters) wrote :

More configurability of the header is coming up in the next month or so. That will include a way to configure the number of slots in the ActionBar. I will link this bug to a branch when I start working on it.

Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → High
Revision history for this message
Michael Terry (mterry) wrote :

Adjusting the number of slots in the ActionBar would let me do the math myself and make sure everything fits in the header, sure.

But ideally I wouldn't have to do the math myself and the Ambience PageHeadStyle.qml would:
1) Set "actionsContainer.anchors.left: contentsContainer.right"
2) Add logic to ActionBar that dynamically reduce the number of slots shown if ActionBar.width isn't enough to show the configured number of slots.

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

I am too facing same issue in calendar app,

http://people.canonical.com/~alan/screenshots/device-2015-11-10-110730.png

I would like to move one of icon to tray, it would be nice to have control over numberOfSlots.
related branch
https://code.launchpad.net/~pkunal-parmar/ubuntu-calendar-app/Uitk1_3/+merge/276338

Revision history for this message
Tim Peeters (tpeeters) wrote :

with the new header you have control over the number of slots. See the introduction here https://developer.ubuntu.com/en/blog/2016/02/24/pageheader-tutorial/ and use PageHeader.trailingActionBar.numberOfSlots.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → 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.