Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/package/contents/ui/DashboardTabButton.qml
Show All 33 Lines | 25 | Item { | |||
---|---|---|---|---|---|
34 | Accessible.name: text | 34 | Accessible.name: text | ||
35 | Accessible.role: Accessible.PageTab | 35 | Accessible.role: Accessible.PageTab | ||
36 | 36 | | |||
37 | Rectangle { | 37 | Rectangle { | ||
38 | anchors.fill: parent | 38 | anchors.fill: parent | ||
39 | 39 | | |||
40 | color: tab.parent.focus ? theme.highlightColor : "black" | 40 | color: tab.parent.focus ? theme.highlightColor : "black" | ||
41 | 41 | | |||
42 | opacity: active ? 0.4 : 0.15 | 42 | opacity: tab.active ? 0.4 : 0.15 | ||
43 | Behavior on opacity { SmoothedAnimation { duration: units.shortDuration; velocity: 0.01 } } | 43 | Behavior on opacity { SmoothedAnimation { duration: units.shortDuration; velocity: 0.01 } } | ||
44 | } | 44 | } | ||
45 | 45 | | |||
46 | PlasmaExtras.Heading { | 46 | PlasmaExtras.Heading { | ||
47 | id: label | 47 | id: label | ||
48 | 48 | | |||
49 | x: units.largeSpacing | 49 | x: units.largeSpacing | ||
50 | 50 | | |||
51 | elide: Text.ElideNone | 51 | elide: Text.ElideNone | ||
52 | wrapMode: Text.NoWrap | 52 | wrapMode: Text.NoWrap | ||
53 | opacity: active ? 1.0 : 0.6 | 53 | opacity: tab.active ? 1.0 : 0.6 | ||
54 | Behavior on opacity { SmoothedAnimation { duration: units.shortDuration; velocity: 0.01 } } | 54 | Behavior on opacity { SmoothedAnimation { duration: units.shortDuration; velocity: 0.01 } } | ||
55 | 55 | | |||
56 | color: tab.parent.focus ? theme.highlightedTextColor : "white" | 56 | color: tab.parent.focus ? theme.highlightedTextColor : "white" | ||
57 | 57 | | |||
58 | level: 1 | 58 | level: 1 | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | MouseArea { | 61 | MouseArea { | ||
62 | anchors.fill: parent | 62 | anchors.fill: parent | ||
63 | 63 | | |||
64 | hoverEnabled: true | 64 | hoverEnabled: true | ||
65 | 65 | | |||
66 | onClicked: { | 66 | onClicked: { | ||
67 | tab.parent.activeTab = tab.index; | 67 | tab.parent.activeTab = tab.index; | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | onContainsMouseChanged: { | 70 | onContainsMouseChanged: { | ||
71 | tab.parent.containsMouseChanged(index, containsMouse); | 71 | tab.parent.containsMouseChanged(tab.index, containsMouse); | ||
72 | } | 72 | } | ||
73 | } | 73 | } | ||
74 | } | 74 | } |