summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/kube/contents/ui/Kube.qml36
-rw-r--r--framework/qml/ToolTip.qml46
-rw-r--r--framework/qmldir1
3 files changed, 83 insertions, 0 deletions
diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml
index 095e51e1..504d45da 100644
--- a/components/kube/contents/ui/Kube.qml
+++ b/components/kube/contents/ui/Kube.qml
@@ -118,21 +118,42 @@ Controls2.ApplicationWindow {
118 Kube.IconButton { 118 Kube.IconButton {
119 iconName: Kube.Icons.search_inverted 119 iconName: Kube.Icons.search_inverted
120 onClicked: search.open() 120 onClicked: search.open()
121
122
123 Kube.ToolTip {
124 text: "hjfhd"
125 visible: parent.hovered
126 }
121 } 127 }
122 128
123 Kube.IconButton { 129 Kube.IconButton {
124 iconName: Kube.Icons.edit_inverted 130 iconName: Kube.Icons.edit_inverted
125 onClicked: kubeViews.openComposer(false) 131 onClicked: kubeViews.openComposer(false)
132
133 Kube.ToolTip {
134 text: "composer"
135 visible: parent.hovered
136 }
126 } 137 }
127 138
128 Kube.IconButton { 139 Kube.IconButton {
129 iconName: Kube.Icons.mail_inverted 140 iconName: Kube.Icons.mail_inverted
130 onClicked: kubeViews.setMailView() 141 onClicked: kubeViews.setMailView()
142
143 Kube.ToolTip {
144 text: "mails"
145 visible: parent.hovered
146 }
131 } 147 }
132 148
133 Kube.IconButton { 149 Kube.IconButton {
134 iconName: Kube.Icons.user_inverted 150 iconName: Kube.Icons.user_inverted
135 onClicked: kubeViews.setPeopleView() 151 onClicked: kubeViews.setPeopleView()
152
153 Kube.ToolTip {
154 text: "people"
155 visible: parent.hovered
156 }
136 } 157 }
137 } 158 }
138 Column { 159 Column {
@@ -146,16 +167,31 @@ Controls2.ApplicationWindow {
146 Kube.Outbox { 167 Kube.Outbox {
147 height: Kube.Units.gridUnit * 1.5 168 height: Kube.Units.gridUnit * 1.5
148 width: height 169 width: height
170
171 Kube.ToolTip {
172 text: "outbox"
173 visible: parent.hovered
174 }
149 } 175 }
150 176
151 Kube.IconButton { 177 Kube.IconButton {
152 iconName: Kube.Icons.error_inverted 178 iconName: Kube.Icons.error_inverted
153 onClicked: kubeViews.setLogView() 179 onClicked: kubeViews.setLogView()
180
181 Kube.ToolTip {
182 text: "logview"
183 visible: parent.hovered
184 }
154 } 185 }
155 186
156 Kube.IconButton { 187 Kube.IconButton {
157 iconName: Kube.Icons.menu_inverted 188 iconName: Kube.Icons.menu_inverted
158 onClicked: kubeViews.setAccountsView() 189 onClicked: kubeViews.setAccountsView()
190
191 Kube.ToolTip {
192 text: "settings"
193 visible: parent.hovered
194 }
159 } 195 }
160 } 196 }
161 } 197 }
diff --git a/framework/qml/ToolTip.qml b/framework/qml/ToolTip.qml
new file mode 100644
index 00000000..45f50e87
--- /dev/null
+++ b/framework/qml/ToolTip.qml
@@ -0,0 +1,46 @@
1/*
2 * Copyright (C) 2017 Michael Bohlender, <bohlender@kolabsys.com>
3 *
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; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19import QtQuick 2.7
20import QtQuick.Templates 2.0 as T
21import org.kube.framework 1.0 as Kube
22
23T.ToolTip {
24 id: root
25
26 x: parent ? (parent.width - implicitWidth) / 2 : 0
27 y: -implicitHeight - Kube.Units.smallSpacing
28
29 implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
30 implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
31
32 padding: Kube.Units.smallSpacing
33
34 closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
35
36 contentItem: Label {
37 color: Kube.Colors.viewBackgroundColor
38 text: root.text
39 }
40
41 background: Rectangle {
42 color: Kube.Colors.textColor
43 border.width: 1
44 border.color: Kube.Colors.viewBackgroundColor
45 }
46}
diff --git a/framework/qmldir b/framework/qmldir
index 874bdf78..1a888068 100644
--- a/framework/qmldir
+++ b/framework/qmldir
@@ -24,6 +24,7 @@ PositiveButton 1.0 PositiveButton.qml
24TextField 1.0 TextField.qml 24TextField 1.0 TextField.qml
25TextArea 1.0 TextArea.qml 25TextArea 1.0 TextArea.qml
26TextEditor 1.0 TextEditor.qml 26TextEditor 1.0 TextEditor.qml
27ToolTip 1.0 ToolTip.qml
27Label 1.0 Label.qml 28Label 1.0 Label.qml
28Heading 1.0 Heading.qml 29Heading 1.0 Heading.qml
29View 1.0 View.qml 30View 1.0 View.qml