Fix PC3.GroupBox.color
SystemPaletteSingleton was a QQC1.Private import. Not sure why it's in a QQC2 theme. Nothing in Plasma uses this GroupBox so it makes sense why it wasn't noticed before.
Note: I am not sure if import "." as PC3
is the proper way to import PC3.Label
in a QQC2 style.
This fixes this error:
file:///usr/lib/qt/qml/org/kde/plasma/components.3/GroupBox.qml:30: ReferenceError: SystemPaletteSingleton is not defined
Code was written 4 years ago. Since it's "SystemPallete", it probably displays the App/Config text color, not the panel color. It currently draws a black text on grey bg with breeze-dark
.
- https://github.com/qt/qtquickcontrols/blob/dev/src/controls/Private/SystemPaletteSingleton.qml
- https://invent.kde.org/frameworks/plasma-framework/-/blame/master/src/declarativeimports/plasmacomponents3/GroupBox.qml
To test, just edit: /usr/lib/qt/qml/org/kde/plasma/components.3/GroupBox.qml
Then create a simple helloworld widget with metadata.desktop
from the wiki and this contents/ui/main.qml
.
// contents/ui/main.qml
import QtQuick 2.0
import QtQuick.Controls 2.0 as QQC2
import QtQuick.Layouts 1.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.plasmoid 2.0
Item {
Plasmoid.fullRepresentation: ColumnLayout {
QQC2.GroupBox {
title: i18n("Enabled")
Item { implicitWidth: 480 }
}
PlasmaComponents3.GroupBox {
title: i18n("Enabled")
Item { implicitWidth: 480 }
}
PlasmaComponents3.GroupBox {
id: groupBox1
title: i18n("Enabled")
label: PlasmaComponents3.Label {
x: groupBox2.leftPadding
text: groupBox1.title
enabled: groupBox1.enabled
color: PlasmaCore.Theme.textColor
}
Item { implicitWidth: 480 }
}
QQC2.GroupBox {
enabled: false
title: i18n("Disabled")
Item { implicitWidth: 480 }
}
PlasmaComponents3.GroupBox {
enabled: false
title: i18n("Disabled")
Item { implicitWidth: 480 }
}
PlasmaComponents3.GroupBox {
id: groupBox2
enabled: false
title: i18n("Disabled")
label: PlasmaComponents3.Label {
x: groupBox2.leftPadding
text: groupBox2.title
enabled: groupBox2.enabled
color: PlasmaCore.Theme.textColor
}
Item { implicitWidth: 480 }
}
}
}