Warning, /network/neochat/src/qml/ThemeRadioButton.qml is written in an unsupported language. File is not indexed.
0001 // Copyright 2021 Marco Martin <mart@kde.org> 0002 // Copyright 2018 Furkan Tokac <furkantokac34@gmail.com> 0003 // Copyright 2019 Nate Graham <nate@kde.org> 0004 // SPDX-License-Identifier: GPL-2.0-or-later 0005 0006 import QtQuick 0007 import QtQuick.Controls as QQC2 0008 import QtQuick.Layouts 0009 import org.kde.kirigami as Kirigami 0010 0011 QQC2.RadioButton { 0012 id: root 0013 0014 implicitWidth: contentItem.implicitWidth 0015 implicitHeight: contentItem.implicitHeight 0016 0017 property alias innerObject: contentLayout.children 0018 property bool thin 0019 0020 contentItem: ColumnLayout { 0021 Kirigami.ShadowedRectangle { 0022 implicitWidth: implicitHeight * 1.6 0023 implicitHeight: root.thin ? Kirigami.Units.gridUnit * 5 : Kirigami.Units.gridUnit * 6 0024 radius: Kirigami.Units.smallSpacing 0025 Kirigami.Theme.inherit: false 0026 Kirigami.Theme.colorSet: Kirigami.Theme.View 0027 0028 shadow.xOffset: 0 0029 shadow.yOffset: 2 0030 shadow.size: 10 0031 shadow.color: Qt.rgba(0, 0, 0, 0.3) 0032 0033 color: { 0034 if (root.checked) { 0035 return Kirigami.Theme.highlightColor; 0036 } else if (root.hovered) { 0037 // Match appearance of hovered list items 0038 return Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.5); 0039 } else { 0040 return Kirigami.Theme.backgroundColor; 0041 } 0042 } 0043 ColumnLayout { 0044 id: contentLayout 0045 anchors.fill: parent 0046 anchors.margins: Kirigami.Units.smallSpacing 0047 clip: true 0048 } 0049 } 0050 0051 QQC2.Label { 0052 id: label 0053 Layout.fillWidth: true 0054 text: root.text 0055 horizontalAlignment: Text.AlignHCenter 0056 } 0057 } 0058 0059 indicator: Item {} 0060 background: Item {} 0061 }