Two pages in one Tabs - toolbar issue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Shorts App |
New
|
Undecided
|
Unassigned | ||
Ubuntu UI Toolkit |
Won't Fix
|
Wishlist
|
Tim Peeters |
Bug Description
In RSS Reader (Shorts) we use Tab component with two pages inside - for list and grid mode.
When both pages uses same toolbar, all is ok, but when they have different - sometimes I can't reveal toolbar, sometimes I can't see one of the, sometimes I can see wrong toolbar (from another page).
Here is an example (try to play with "tools" property):
import QtQuick 2.0
import Ubuntu.Components 0.1
import "ui"
/*!
\brief MainView with Tabs element.
First Tab has a single Label and
second Tab has a single ToolbarAction.
*/
MainView {
// objectName for functional testing purposes (autopilot-qt5)
objectName: "mainView"
// Note! applicationName needs to match the "name" field of the click manifest
application
width: units.gu(50)
height: units.gu(75)
Tabs {
id: tabstabs
Tab {
id: someTab
title: i18n.tr("..World!")
page: someTab.mode ? secondPage : firstPage
Page {
id: firstPage
}
}
}
Page {
id: secondPage
}
}
}
id: commonTools
}
}
}
}
}
Changed in ubuntu-ui-toolkit: | |
assignee: | nobody → Christian Dywan (kalikiana) |
status: | New → Triaged |
assignee: | Christian Dywan (kalikiana) → Tim Peeters (tpeeters) |
I tried another solution with dynamic page creation, but "tools" property can't be set without blinking of ToolBarItems in the middle of the page, try this code
import QtQuick 2.0
import Ubuntu.Components 0.1
import "ui"
/*!
\brief MainView with Tabs element.
First Tab has a single Label and
second Tab has a single ToolbarAction.
*/
MainView {
// objectName for functional testing purposes (autopilot-qt5)
objectName: "mainView"
// Note! applicationName needs to match the "name" field of the click manifest Name: "com.ubuntu. developer. mrqtros. ToolbarBug"
application
width: units.gu(50)
height: units.gu(75)
Tabs {
id: tabstabs
Tab {
id: someTab
title: i18n.tr("..World!")
page: mainLoader.item
Loader {
id: mainLoader
}
id: fstPageComp
}
}
id: firstTools
}
}
id: secPageComp
}
}
}
}
}