blob: ff63ceccdb5033bc98e46509ff6791c0676d6a8f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*
* This file is part of Fluid.
*
* Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
*
* $BEGIN_LICENSE:MPL2$
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* $END_LICENSE$
*/
import QtQuick 2.0
import QtQuick.Templates 2.0 as T
/*!
\qmltype BodyLabel
\inqmlmodule Fluid.Controls
\ingroup fluidcontrols
\brief Text label with standard font and styling suitable to body text.
\code
BodyLabel {
text: qsTr("Body text")
}
\endcode
*/
T.Label {
/*!
\qmlproperty int level
This property holds the label level that controls
font style and size.
It can be either 1 or 2.
Default value is 1.
*/
property int level: 1
font.pixelSize: 14
color: "#26282a"
linkColor: "#45a7d7"
onLevelChanged: {
if (level < 1 || level > 2)
console.error("BodyLabel level must be either 1 or 2")
}
}
|