From 9bfbf7d369b8c525188821fadb01504d72b10a91 Mon Sep 17 00:00:00 2001 From: Daniel d'Andrada Date: Thu, 22 Mar 2018 16:37:11 +0100 Subject: [style] Make TabBar support any pixel density MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iaa0437eee97bd5130338186523cd1753b742482b Reviewed-by: Lukáš Tinkl --- styles/neptune/TabBar.qml | 5 +++-- 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) -- cgit v1.2.3