File: IconLabel.qml

package info (click to toggle)
dtkdeclarative 5.7.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 29,848 kB
  • sloc: cpp: 20,566; ansic: 66; makefile: 29; sh: 25
file content (35 lines) | stat: -rw-r--r-- 827 bytes parent folder | download
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
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later

import QtQuick 2.11
import org.deepin.dtk 1.0 as D

Rectangle {
    id: control

    width: 100; height: 100

    property QtObject icon: QtObject{
        property string name: "switch_button"
        property int width: 20
        property int height: 20
    }

    D.IconLabel {
        anchors.centerIn: parent
        width: 50; height: 50
        text: "test"
        font: D.DTK.fontManager.t5
        color: "red"
        display: D.IconLabel.IconBesideText
        spacing: 2
        mirrored: false
        alignment: Qt.AlignLeft
        topPadding: 1
        leftPadding: 1
        rightPadding: 1
        bottomPadding: 1
        icon: D.DTK.makeIcon(control.icon, control.D.DciIcon)
    }
}