diff options
-rw-r--r-- | framework/qml/Button.qml | 4 | ||||
-rw-r--r-- | framework/qml/Label.qml | 26 | ||||
-rw-r--r-- | framework/qml/PositiveButton.qml | 3 | ||||
-rw-r--r-- | framework/qml/TextField.qml | 4 | ||||
-rw-r--r-- | framework/qml/Units.qml | 1 | ||||
-rw-r--r-- | framework/qmldir | 1 |
6 files changed, 32 insertions, 7 deletions
diff --git a/framework/qml/Button.qml b/framework/qml/Button.qml index 181cf58b..6a3654cc 100644 --- a/framework/qml/Button.qml +++ b/framework/qml/Button.qml | |||
@@ -44,12 +44,10 @@ T.Button { | |||
44 | } | 44 | } |
45 | } | 45 | } |
46 | 46 | ||
47 | contentItem: Text { | 47 | contentItem: Label { |
48 | text: root.text | 48 | text: root.text |
49 | //TODO font | ||
50 | elide: Text.ElideRight | 49 | elide: Text.ElideRight |
51 | horizontalAlignment: Text.AlignHCenter | 50 | horizontalAlignment: Text.AlignHCenter |
52 | verticalAlignment: Text.AlignVCenter | 51 | verticalAlignment: Text.AlignVCenter |
53 | color: Colors.textColor | ||
54 | } | 52 | } |
55 | } | 53 | } |
diff --git a/framework/qml/Label.qml b/framework/qml/Label.qml new file mode 100644 index 00000000..c7a71faa --- /dev/null +++ b/framework/qml/Label.qml | |||
@@ -0,0 +1,26 @@ | |||
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 | |||
19 | import QtQuick 2.7 | ||
20 | import QtQuick.Templates 2.0 as T | ||
21 | import org.kube.framework 1.0 | ||
22 | |||
23 | T.Label { | ||
24 | color: Colors.textColor | ||
25 | font.family: "Noto Sans" | ||
26 | } | ||
diff --git a/framework/qml/PositiveButton.qml b/framework/qml/PositiveButton.qml index 7c00a212..fb8aab9b 100644 --- a/framework/qml/PositiveButton.qml +++ b/framework/qml/PositiveButton.qml | |||
@@ -44,9 +44,8 @@ T.Button { | |||
44 | } | 44 | } |
45 | } | 45 | } |
46 | 46 | ||
47 | contentItem: Text { | 47 | contentItem: Label { |
48 | text: root.text | 48 | text: root.text |
49 | //TODO font | ||
50 | elide: Text.ElideRight | 49 | elide: Text.ElideRight |
51 | horizontalAlignment: Text.AlignHCenter | 50 | horizontalAlignment: Text.AlignHCenter |
52 | verticalAlignment: Text.AlignVCenter | 51 | verticalAlignment: Text.AlignVCenter |
diff --git a/framework/qml/TextField.qml b/framework/qml/TextField.qml index 688d0f5f..dbf5dae7 100644 --- a/framework/qml/TextField.qml +++ b/framework/qml/TextField.qml | |||
@@ -29,8 +29,9 @@ T.TextField { | |||
29 | padding: Units.smallSpacing | 29 | padding: Units.smallSpacing |
30 | 30 | ||
31 | color: Colors.textColor | 31 | color: Colors.textColor |
32 | font.family: "Noto Sans" | ||
32 | 33 | ||
33 | Text { | 34 | Label { |
34 | id: placeholder | 35 | id: placeholder |
35 | x: root.leftPadding | 36 | x: root.leftPadding |
36 | y: root.topPadding | 37 | y: root.topPadding |
@@ -40,7 +41,6 @@ T.TextField { | |||
40 | 41 | ||
41 | visible: root.text == "" | 42 | visible: root.text == "" |
42 | text: root.placeholderText | 43 | text: root.placeholderText |
43 | //TODO font: | ||
44 | color: Colors.disabledTextColor | 44 | color: Colors.disabledTextColor |
45 | elide: Text.ElideRight | 45 | elide: Text.ElideRight |
46 | } | 46 | } |
diff --git a/framework/qml/Units.qml b/framework/qml/Units.qml index 96216f82..a8eddd8d 100644 --- a/framework/qml/Units.qml +++ b/framework/qml/Units.qml | |||
@@ -27,6 +27,7 @@ Item { | |||
27 | property int largeSpacing: gridUnit | 27 | property int largeSpacing: gridUnit |
28 | property variant fontMetrics: TextMetrics { | 28 | property variant fontMetrics: TextMetrics { |
29 | text: "M" | 29 | text: "M" |
30 | font.family: "Noto Sans" | ||
30 | } | 31 | } |
31 | } | 32 | } |
32 | 33 | ||
diff --git a/framework/qmldir b/framework/qmldir index 715f63dd..9f49a65f 100644 --- a/framework/qmldir +++ b/framework/qmldir | |||
@@ -18,6 +18,7 @@ Popup 1.0 Popup.qml | |||
18 | ComboBox 1.0 ComboBox.qml | 18 | ComboBox 1.0 ComboBox.qml |
19 | PositiveButton 1.0 PositiveButton.qml | 19 | PositiveButton 1.0 PositiveButton.qml |
20 | TextField 1.0 TextField.qml | 20 | TextField 1.0 TextField.qml |
21 | Label 1.0 Label.qml | ||
21 | singleton Colors 1.0 Colors.qml | 22 | singleton Colors 1.0 Colors.qml |
22 | singleton Icons 1.0 Icons.qml | 23 | singleton Icons 1.0 Icons.qml |
23 | singleton Units 1.0 Units.qml | 24 | singleton Units 1.0 Units.qml |