Files
glassMxrph/quickshell/compat/noctalia/Widgets/NRadioButton.qml
T
mxandClaude Opus 5.5 84c2385cfa Fix plugin colours on Qt 6.12
Qt 6.12's QtQuick exports a Color singleton, which hides the Omarchy and
Noctalia kits' Commons.Color: every Color.foreground read undefined, so
plugin buttons, toggles and text fell back to black. The kits now import
QtQuick 6.8, which predates it, and the installer pins the same version
in plugin files that use Color (reinstall plugins to pick it up).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:59:38 +01:00

54 lines
1.4 KiB
QML

import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Widgets
RadioButton {
id: root
property real pointSize: Style.fontSizeM
implicitWidth: outerCircle.implicitWidth + Style.marginS + contentItem.implicitWidth
indicator: Rectangle {
id: outerCircle
implicitWidth: Style.baseWidgetSize * 0.625 * pointSize / Style.fontSizeM
implicitHeight: Style.baseWidgetSize * 0.625 * pointSize / Style.fontSizeM
radius: Math.min(Style.iRadiusL, width / 2)
color: "transparent"
border.color: root.checked ? Color.mPrimary : Color.mOnSurface
border.width: Style.borderM
anchors.verticalCenter: parent.verticalCenter
Rectangle {
anchors.fill: parent
anchors.margins: parent.width * 0.3
radius: Math.min(Style.iRadiusL, width / 2)
color: Qt.alpha(Color.mPrimary, root.checked ? 1 : 0)
Behavior on color {
ColorAnimation {
duration: Style.animationFast
}
}
}
Behavior on border.color {
ColorAnimation {
duration: Style.animationFast
}
}
}
contentItem: NText {
text: root.text
pointSize: root.pointSize
anchors.verticalCenter: parent.verticalCenter
anchors.left: outerCircle.right
anchors.right: parent.right
anchors.leftMargin: Style.marginS
}
}