ItemStyle.path is (null) on start, gets reevaluated on theme change

Bug #1081038 reported by Michał Sawicz
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Zsombor Egri
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Won't Fix

Bug Description

ItemStyle.path is (null) on start, gets reevaluated on theme change, which means that the theme isn't applied until the theme is changed/touched.

Tags: theming

Related branches

Revision history for this message
Zsombor Egri (zsombi) wrote :

As we spoke, we need to "link" the styled items so we can apply the styling properly.

Changed in tavastia:
status: Confirmed → Triaged
Revision history for this message
Zsombor Egri (zsombi) wrote :

This happens when a non-styled item is reparented (when items under a Repeater, positioner, or a delegate are styled), therefore the need of re-evaluating styling is not detected. When the theme is changed (or theme change is detected) the item hierarchy is already set, therefore the styling will be properly done. Another problem is that currently the style is applied only on one level of child items. If none of those are styled, broadcasting the re-styling downwards in the hierarchy is stopped.

1. We connect all the parents' changes between two styled items to the underlying one so we get notification about changes of those parents. We also need to link the ItemStyleAttached objects so we can apply proper styling.

2. We extend each QML element grabbing parent property. This operation requires using all QtQuick privates, and some of those force us to link with the QtQuick plugins (i.e. positioners like QQuickColumn, QQuickRow, etc). If we succeed in this, we can detect parent changes in every item, therefore we can detect eventual style changes too.

3. Introduce a "bridge" styling, which would be used on those items we don't style, and help us on detecting parent changes. This helps us linking the styled items in between them so the style appliance is easier. However, it is pretty annoying to put styling information on those elements where we don't even style. Therefore this solution is not really recommended.

information type: Proprietary → Public
affects: tavastia → ubuntu-ui-toolkit
tags: added: theming
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
status: Triaged → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-ui-toolkit at revision 572, 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 and Layouts\ causing
    qmake warnings when Ubuntu UI toolkit project is opened in

  [ 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...


Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

raring has seen the end of its life and is no longer receiving any updates. Marking the raring task for this ticket as "Won't Fix".

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