Files
glassMxrph/quickshell/compat/noctalia/Widgets/NInputAction.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

53 lines
1.2 KiB
QML

import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Widgets
// Input and button row
RowLayout {
id: root
// Public properties
property string label: ""
property string description: ""
property string placeholderText: ""
property string text: ""
property string actionButtonText: I18n.tr("common.test")
property string actionButtonIcon: "media-play"
property bool actionButtonEnabled: text !== ""
// Signals
signal editingFinished
signal actionClicked
// Internal properties
spacing: Style.marginM
NTextInput {
id: textInput
label: root.label
description: root.description
placeholderText: root.placeholderText
text: root.text
onTextChanged: root.text = text
onEditingFinished: root.editingFinished()
Layout.fillWidth: true
}
NButton {
Layout.fillWidth: false
Layout.alignment: Qt.AlignBottom
text: root.actionButtonText
icon: root.actionButtonIcon
backgroundColor: Color.mSecondary
textColor: Color.mOnSecondary
hoverColor: Color.mHover
enabled: root.actionButtonEnabled
onClicked: {
root.actionClicked();
}
}
}