[header] Page content hidden behind Header

Bug #1160175 reported by Matthias Gehre
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
High
Tim Peeters
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Attached example code does
1. Not show the Button inside the Page
2. Shows a lot of extra space on top of the ListView

--- Irc log with greyback ---
<greyback> matge: hey, in that example code, the Button is under the header. But your example is showing strange things are happening - for instance notice the ListView has lots of extra space at the top - that should not be.
<matge> greyback: under the header? I thought parent references the page content (which is the area below the header). Where should I anchor the button's top to make it visible?
<greyback> matge: it appears the header draws itself on top (MainView is the source of the header). Flickables & ListViews are cleverly adjusted to compensate (you can see it's happening), but anything else doesn't appear to work well.
<greyback> matge: I don't see any obvious anchor point. I need to see how this stuff is working underneath
<matge> greyback: So any idea how to get the expected behavior?
<greyback> matge: not yet, sorry. I'm looking, will let you know when I've something
<matge> greyback: thanks a lot!
<greyback> matge: so not a very nice solution to the button position: to the Button add "topMargin: root.header.height + units.gu(2)"
<greyback> matge: so this: http://pastebin.ubuntu.com/5647679/
<matge> greyback: thanks, this seems to work!
<matge> greyback: should I fill a bug for that big space above the ListView?
<greyback> matge: do please
<greyback> matge: yours is a valid use-case, and right now we're not supporting it very well

Related branches

Revision history for this message
Matthias Gehre (m-gehre) wrote :
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
assignee: nobody → Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
Revision history for this message
Tim Peeters (tpeeters) wrote :

The Page automatically detects the ListView as its flickable and adapts the listview's contents margins accordingly. The button position is not affected and stays hidden behind the header.

Setting page.flickable: null and removing the anchors of the page should fix it for you.

However, the automatic behavior is not correct in this case, and I will try to fix it, and I will update the documentation of page.flickable.

Changed in ubuntu-ui-toolkit:
importance: Undecided → High
Tim Peeters (tpeeters)
summary: - Page content hidden behind Header
+ [header] Page content hidden behind Header
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: Confirmed → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-ui-toolkit at revision 567, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: In Progress → Fix Committed
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.7 KiB)

This bug was fixed in the package ubuntu-ui-toolkit - 0.1.46+13.10.20130703.1-0ubuntu1

---------------
ubuntu-ui-toolkit (0.1.46+13.10.20130703.1-0ubuntu1) saucy; urgency=low

  [ Zsombor Egri ]
  * Fix for re-parenting items that are anchor filled to an item in
    default layout.
  * TextField API extended with API left out from TextInput. wrapMode is
    not inlcuded as does not make sense to be used in single line input.
    (LP: #1183265)
  * Calculator example which turns from simple calculator (phone
    portrait mode) into scientific one (phone landscape mode) reflecting
    the use of Ubuntu.Layouts. .
  * Removing common.pri from Layouts.pro and Layouts\plugin.pro causing
    qmake warnings when Ubuntu UI toolkit project is opened in
    QtCreator.

  [ Leo Arias ]
  * Replaced the MainWindow emulator for autopilot tests with a MainView
    emulator that the uses the custom emulator features of autopilot.
  * Added the Toolbar Autopilot emulator. (LP: #1177341)

  [ Juhapekka Piiroinen ]
  * Fixed broken ubuntu-ui-toolkit-gallery.qmlproject file, which had an
    invalid value in mainFile field.

  [ tpeeters ]
  * Update header behavior: - Do not automatically hide the header when
    scrolling in a flickable that is not anchored to the top of the
    page. - Automatically show the header when flickable's contentHeight
    becomes less than flickable.height. - Update documentation for
    Page.flickable. (LP: #1156573, #1160175)

  [ Kaleo ]
  * Removed common.pri and coverage.pri files that were cluttering
    QtCreator making it harder to understand the real structure of the
    project. coverage.pri has been transformed into a feature file
    (coverage.prf) which works the same way as before.
  * Removed antiquated TextCustom class.
  * Removed unused old-style tabs delegate.
  * Removed UbuntuShape.qml and transferred code & documentation to
    shapeitem.cpp ShapeItem: renamed baseColor property into color.
  * UbuntuShape: simplified gradient implementation; gradientColor is
    now the same as color by default. .
  * Simplified theming infrastructure. There are no stylesheets anymore
    (.qmltheme file), only delegates remain. A theme is a QML module
    containing delegates whose names are standardized. The default theme
    is called 'Ambiance' and available from QML through 'import
    Ubuntu.Components.Themes.Ambiance 0.1'. The name of the current
    theme is set in ~/.config/ubuntu-ui-toolkit/theme.ini Writing a new
    theme is done by creating a QML module and adding it in the
    Ubuntu/Components/Themes folder. A theme inherits from another theme
    by containing a text file name 'parent_theme' whose first and only
    line is the name of the parent theme. * Moved themes/ directory to
    Ubuntu/Components/Themes so that themes are importable. * Simplified
    ThemeEngine and ThemeSettings class, removed the rest of the theming
    infrastructure (ItemStyle, Style, QmlThemeLoader, Selector,
    StyleCache). * Adapted all widgets to use the simplified theming
    technique: - new StyledItem class that has a 'style' Component
    property representing the delegate - all widgets that have delegates
    inherit fro...

Read more...

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