2
* Copyright 2014-2015 Canonical Ltd.
4
* This file is part of webbrowser-app.
6
* webbrowser-app is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* webbrowser-app is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
import Ubuntu.Components 1.1
23
property alias title: label.text
28
implicitHeight: units.gu(4)
35
objectName: "closeButton"
45
color: closeButton.pressed ? Qt.rgba(1.0, 1.0, 1.0, 0.9) : "white"
51
anchors.centerIn: parent
70
width: parent.width - closeButton.width
82
right: tabBackgroundCenter.left
84
source: "assets/tab-header-left.png"
85
fillMode: Image.TileHorizontally
89
id: tabBackgroundCenter
93
horizontalCenter: parent.horizontalCenter
95
source: "assets/tab-header-center.png"
99
id: tabBackgroundRight
102
bottom: parent.bottom
103
left: tabBackgroundCenter.right
106
source: "assets/tab-header-right.png"
107
fillMode: Image.TileHorizontally
113
fill: tabBackgroundLeft
114
leftMargin: units.gu(1)
116
verticalAlignment: Text.AlignVCenter
117
elide: Text.ElideRight
123
bottom: parent.bottom
126
// The activable part of the tab occupies its leftmost half
127
width: parent.width / 2
129
onClicked: selected()
138
bottom: parent.bottom