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, 0039 Kirigami.Theme.highlightColor.g, 0040 Kirigami.Theme.highlightColor.b, 0041 0.5); 0042 } else { 0043 return Kirigami.Theme.backgroundColor; 0044 } 0045 } 0046 ColumnLayout { 0047 id: contentLayout 0048 anchors.fill: parent 0049 anchors.margins: Kirigami.Units.smallSpacing 0050 clip: true 0051 } 0052 } 0053 0054 QQC2.Label { 0055 id: label 0056 Layout.fillWidth: true 0057 text: root.text 0058 horizontalAlignment: Text.AlignHCenter 0059 } 0060 } 0061 0062 indicator: Item {} 0063 background: Item {} 0064 } 0065 0066