diff options
Diffstat (limited to 'prototype_2016/third_party/fluid/controls/DisplayLabel.qml')
-rw-r--r-- | prototype_2016/third_party/fluid/controls/DisplayLabel.qml | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/prototype_2016/third_party/fluid/controls/DisplayLabel.qml b/prototype_2016/third_party/fluid/controls/DisplayLabel.qml deleted file mode 100644 index 0070419..0000000 --- a/prototype_2016/third_party/fluid/controls/DisplayLabel.qml +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2016 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Templates 2.0 as T | ||
17 | |||
18 | /*! | ||
19 | \qmltype DisplayLabel | ||
20 | \inqmlmodule Fluid.Controls | ||
21 | \ingroup fluidcontrols | ||
22 | |||
23 | \brief Text label with standard font and styling suitable to display text. | ||
24 | |||
25 | \code | ||
26 | DisplayLabel { | ||
27 | text: qsTr("Display text") | ||
28 | } | ||
29 | \endcode | ||
30 | */ | ||
31 | T.Label { | ||
32 | /*! | ||
33 | \qmlproperty int level | ||
34 | |||
35 | This property holds the label level that controls | ||
36 | font style and size. | ||
37 | |||
38 | Only values between 1 and 4 are allowed. | ||
39 | |||
40 | Default value is 1. | ||
41 | */ | ||
42 | property int level: 1 | ||
43 | |||
44 | font.pixelSize: { | ||
45 | if (level <= 1) | ||
46 | return 30 | ||
47 | else if (level == 2) | ||
48 | return 40 | ||
49 | else if (level == 3) | ||
50 | return 50 | ||
51 | return 100 | ||
52 | } | ||
53 | color: "#26282a" | ||
54 | linkColor: "#45a7d7" | ||
55 | onLevelChanged: { | ||
56 | if (level < 1 || level > 4) | ||
57 | console.error("DisplayLabel level must be between 1 and 4") | ||
58 | } | ||
59 | } | ||