diff options
author | Daniel d'Andrada <daniel.dandrada@luxoft.com> | 2018-03-22 16:37:11 +0100 |
---|---|---|
committer | Lukáš Tinkl <ltinkl@luxoft.com> | 2018-03-26 09:49:25 +0000 |
commit | 9bfbf7d369b8c525188821fadb01504d72b10a91 (patch) | |
tree | 962241933467b777dd14c28152dede54235fbd61 | |
parent | 36f3c563369d81f9e8b365c2f9b14bf246be8dab (diff) |
[style] Make TabBar support any pixel density
Change-Id: Iaa0437eee97bd5130338186523cd1753b742482b
Reviewed-by: Lukáš Tinkl <ltinkl@luxoft.com>
-rw-r--r-- | styles/neptune/TabBar.qml | 5 | ||||
-rw-r--r-- | styles/neptune/TabButton.qml | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/styles/neptune/TabBar.qml b/styles/neptune/TabBar.qml index 611bd0ee..09831b9b 100644 --- a/styles/neptune/TabBar.qml +++ b/styles/neptune/TabBar.qml @@ -31,6 +31,7 @@ import QtQuick 2.10 import QtQuick.Templates 2.3 as T +import com.pelagicore.styles.neptune 3.0 T.TabBar { id: control @@ -54,7 +55,7 @@ T.TabBar { highlightMoveDuration: 0 highlightRangeMode: ListView.ApplyRange - preferredHighlightBegin: 40 - preferredHighlightEnd: width - 40 + preferredHighlightBegin: NeptuneStyle.dp(40) + preferredHighlightEnd: width - NeptuneStyle.dp(40) } } diff --git a/styles/neptune/TabButton.qml b/styles/neptune/TabButton.qml index b86ae278..8e56e62a 100644 --- a/styles/neptune/TabButton.qml +++ b/styles/neptune/TabButton.qml @@ -35,6 +35,7 @@ import QtQuick.Controls.impl 2.3 import QtQuick.Templates 2.3 as T import com.pelagicore.styles.neptune 3.0 +import controls 1.0 import utils 1.0 T.TabButton { @@ -71,7 +72,7 @@ T.TabButton { readonly property bool selected: TabBar.tabBar.currentIndex == TabBar.index - background: BorderImage { + background: ScalableBorderImage { id: borderImage anchors.fill: parent source: Style.gfx2("tabbar-bg-" + control.positionState, NeptuneStyle.theme) |