Warning, /frameworks/qqc2-desktop-style/org.kde.desktop/CheckIndicator.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2017 Marco Martin <mart@kde.org> 0003 SPDX-FileCopyrightText: 2017 The Qt Company Ltd. 0004 SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk> 0005 0006 SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-or-later 0007 */ 0008 0009 0010 import QtQuick 2.6 0011 import QtQuick.Templates 2.15 as T 0012 import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate 0013 import org.kde.kirigami 2.4 as Kirigami 0014 0015 StylePrivate.StyleItem { 0016 id: styleitem 0017 0018 property bool drawIcon: true 0019 0020 // Fallback heuristic for MenuItem which can mimic either of those. 0021 elementType: (control.autoExclusive 0022 || (control.action !== null && control.action.T.ActionGroup.group !== null && control.action.T.ActionGroup.group.exclusive) 0023 || (control.T.ButtonGroup.group !== null && control.T.ButtonGroup.group.exclusive)) 0024 ? "radiobutton" : "checkbox" 0025 0026 sunken: control.pressed 0027 on: control.checked 0028 hover: control.hovered 0029 enabled: control.enabled 0030 properties: { 0031 "icon": styleitem.drawIcon && control.display !== T.AbstractButton.TextOnly 0032 ? (control.icon.name !== "" ? control.icon.name : control.icon.source) : null, 0033 "iconColor": Qt.colorEqual(control.icon.color, "transparent") ? Kirigami.Theme.textColor : control.icon.color, 0034 "iconWidth": control.icon.width, 0035 "iconHeight": control.icon.height, 0036 0037 "partiallyChecked": control.checkState === Qt.PartiallyChecked 0038 } 0039 }