← Back to team overview

ubuntu-sdk-bugs team mailing list archive

[Bug 1555797] Re: Theme loads MainViewStyle 1.2 when MainView has a dark backgroundColor set.

 

** Also affects: canonical-devices-system-image
   Importance: Undecided
       Status: New

** Changed in: canonical-devices-system-image
     Assignee: (unassigned) => Zoltan Balogh (bzoltan)

** Changed in: canonical-devices-system-image
    Milestone: None => 11

** Changed in: canonical-devices-system-image
   Importance: Undecided => High

** Changed in: canonical-devices-system-image
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to ubuntu-ui-toolkit in Ubuntu.
https://bugs.launchpad.net/bugs/1555797

Title:
  Theme loads MainViewStyle 1.2 when MainView has a dark backgroundColor
  set.

Status in Canonical System Image:
  In Progress
Status in ubuntu-ui-toolkit package in Ubuntu:
  Fix Committed
Status in ubuntu-ui-toolkit package in Ubuntu RTM:
  Fix Committed

Bug description:
  I applied this patch .cpp in order to see which theme files are
  loaded:

  === modified file 'src/Ubuntu/Components/plugin/uctheme.cpp'
  --- src/Ubuntu/Components/plugin/uctheme.cpp	2016-03-07 15:51:52 +0000
  +++ src/Ubuntu/Components/plugin/uctheme.cpp	2016-03-10 20:02:57 +0000
  @@ -26,6 +26,8 @@
   #include "ucstyleditembase_p.h"
   #include "ucthemingextension.h"
   
  +#include <QDebug>
  +
   #include <QtQml/qqml.h>
   #include <QtQml/qqmlinfo.h>
   #include <QtQml/QQmlEngine>
  @@ -705,6 +707,7 @@
           bool fallback = false;
           QUrl url = styleUrl(styleName, version, &fallback);
           if (url.isValid()) {
  +            qDebug()<<"creating style component from "<<url;
               if (fallback) {
                   qmlInfo(parent) << QStringLiteral("Theme '%1' has no '%2' style for version %3.%4, fall back to version %5.%6.")
                                      .arg(name()).arg(styleName).arg(MAJOR_VERSION(version)).arg(MINOR_VERSION(version))

  ==========

  
  Now, I run this program with qmlscene:

  import QtQuick 2.4
  import Ubuntu.Components 1.3

  MainView {
  	width: units.gu(100)
  	height: units.gu(80)
      backgroundColor: "orange"
  }

  
  the output is:
  creating style component from  QUrl("file:///home/tim/dev/ubuntu-ui-toolkit/staging/qml/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml")
  creating style component from  QUrl("file:///home/tim/dev/ubuntu-ui-toolkit/staging/qml/Ubuntu/Components/Themes/Ambiance/1.3/ActionBarStyle.qml")
  creating style component from  QUrl("file:///home/tim/dev/ubuntu-ui-toolkit/staging/qml/Ubuntu/Components/Themes/Ambiance/1.3/SectionsForPageHeadStyle.qml")
  creating style component from  QUrl("file:///home/tim/dev/ubuntu-ui-toolkit/staging/qml/Ubuntu/Components/Themes/SuruDark/1.2/MainViewStyle.qml")

  
  obviously, the wrong MainViewStyle.qml is loaded. If there is no MainViewStyle in SuruDark 1.3, then it should fallback to the MainViewStyle of Ambiance 1.3, not that of SuruDark 1.2.

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1555797/+subscriptions


References