| 1 |
/* |
| 2 |
* Copyright 2012 Canonical Ltd. |
| 3 |
* |
| 4 |
* This program is free software; you can redistribute it and/or modify |
| 5 |
* it under the terms of the GNU Lesser General Public License as published by |
| 6 |
* the Free Software Foundation; version 3. |
| 7 |
* |
| 8 |
* This program is distributed in the hope that it will be useful, |
| 9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 |
* GNU Lesser General Public License for more details. |
| 12 |
* |
| 13 |
* You should have received a copy of the GNU Lesser General Public License |
| 14 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 |
*/ |
| 16 |
|
| 17 |
import QtQuick 2.4 |
| 18 |
|
| 19 |
/*! |
| 20 |
\qmltype Label |
| 21 |
\inqmlmodule Lomiri.Components |
| 22 |
\ingroup lomiri |
| 23 |
\brief Text with Lomiri styling. |
| 24 |
|
| 25 |
Example: |
| 26 |
\qml |
| 27 |
Rectangle { |
| 28 |
color: LomiriColors.coolGrey |
| 29 |
width: units.gu(30) |
| 30 |
height: units.gu(30) |
| 31 |
|
| 32 |
Label { |
| 33 |
anchors.centerIn: parent |
| 34 |
text: "Hello, world!" |
| 35 |
fontSize: "large" |
| 36 |
} |
| 37 |
} |
| 38 |
\endqml |
| 39 |
*/ |
| 40 |
Text { |
| 41 |
id: label |
| 42 |
|
| 43 |
/*! |
| 44 |
The size of the text. One of the following strings (from smallest to largest): |
| 45 |
\list |
| 46 |
\li "xx-small" |
| 47 |
\li "x-small" |
| 48 |
\li "small" |
| 49 |
\li "medium" |
| 50 |
\li "large" |
| 51 |
\li "x-large" |
| 52 |
\endlist |
| 53 |
Default value is "medium". |
| 54 |
*/ |
| 55 |
property string fontSize: "medium" |
| 56 |
|
| 57 |
font.pixelSize: FontUtils.sizeToPixels(fontSize) |
| 58 |
color: Theme.palette.selected.backgroundText |
| 59 |
} |