[tabs] Make TabBar usable standalone
Bug #1246758 reported by
Albert Astals Cid
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Fix Released
|
High
|
Unassigned | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In the Unity8 Dash we want to use the TabBar component, this is now hard since TabBar is using
property Item tabsItem
where it gets all the interesting stuff from (model, currentindex)
What I'd like to see is an api so that you can do something like
TabBar {
id: tabbar
height: units.gu(7)
width: units.gu(40)
onSelectedT
tabs: someModel
}
ideally we'd also need a
property real currentButtonWidth: 0
in the TabBar or in the TabBarStyle with the width of the current text so we can use it in some calculations
Related branches
lp:~zsombi/ubuntu-ui-toolkit/tabs-independent-tabbar
- PS Jenkins bot: Approve (continuous-integration)
- Tim Peeters: Approve
-
Diff: 599 lines (+317/-37)8 files modifiedCHANGES (+2/-0)
components.api (+1/-0)
modules/Ubuntu/Components/TabBar.qml (+10/-5)
modules/Ubuntu/Components/Tabs.qml (+17/-10)
modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml (+6/-0)
modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml (+30/-22)
tests/resources/navigation/TabView.qml (+88/-0)
tests/unit_x11/tst_components/tst_tabbar.qml (+163/-0)
Changed in ubuntu-ui-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
can you give examples of the type of calculations that you would like to do with the currentButtonWidth?