Commit bad236c9 authored by Aleksi Suomalainen's avatar Aleksi Suomalainen Committed by GitHub

Merge pull request #50 from neochapay/tabstyle

Add TabViewStyle
parents 21e4efa0 da51984d
/*
* Copyright (C) 2013 Andrea Bernabei <and.bernabei@gmail.com>
* Copyright (C) 2017 Chupligin Sergey <neochapay@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -18,8 +19,45 @@
*/
import QtQuick 2.6
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles 1.0
import QtQuick.Controls.Styles.Nemo 1.0
TabViewStyle {
TabViewStyle {
tabsAlignment: Qt.AlignVCenter
tabOverlap: 0
frame: Item { }
tab: Item {
implicitWidth: control.width/control.count
implicitHeight: Theme.itemHeightMedium
BorderImage {
anchors.fill: parent
border.bottom: size.dp(8)
border.top: size.dp(8)
Text {
anchors.centerIn: parent
color: (styleData.selected) ? Theme.accentColor : Theme.textColor
text: styleData.title.toUpperCase()
font.pixelSize: Theme.fontSizeSmall
}
Rectangle {
visible: index > 0
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.margins: size.dp(10)
width:1
color: "#3a3a3a"
}
Rectangle{
visible: styleData.selected
width: parent.width
height: 1
color: Theme.accentColor
anchors{
bottom: parent.bottom
}
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment