2 * Copyright (C) 2014 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 import Ubuntu.Components 0.1
23 property int currentTab: 0
28 width: parent.width / 2
31 color: root.currentTab == 0 && root.enabled ? "white" : "transparent"
35 anchors.centerIn: parent
36 text: i18n.tr("Favorites")
37 color: root.currentTab == 0 && root.enabled ? "black" : "white"
39 onClicked: root.currentTab = 0
43 objectName: "scopesOverviewAllTabButton"
46 width: parent.width / 2
49 color: root.currentTab == 1 && root.enabled ? "white" : "transparent"
53 anchors.centerIn: parent
55 color: root.currentTab == 1 && root.enabled ? "black" : "white"
57 onClicked: root.currentTab = 1
61 width: root.enabled ? units.dp(10) : units.dp(1)
64 x: root.currentTab == 1 ? tab2.x : tab2.x - width
71 border.color: centerPiece.color
72 border.width: units.dp(1)