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>
31 lines
907 B
QML
31 lines
907 B
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
|
|
|
|
Text {
|
|
id: root
|
|
|
|
property string icon: Icons.defaultIcon
|
|
property real pointSize: Style.fontSizeL
|
|
property bool applyUiScale: true
|
|
|
|
visible: (icon !== undefined) && (icon !== "")
|
|
text: {
|
|
if ((icon === undefined) || (icon === "")) {
|
|
return "";
|
|
}
|
|
if (Icons.get(icon) === undefined) {
|
|
Logger.w("Icon", `"${icon}"`, "doesn't exist in the icons font");
|
|
Logger.callStack();
|
|
return Icons.get(Icons.defaultIcon);
|
|
}
|
|
return Icons.get(icon);
|
|
}
|
|
font.family: Icons.fontFamily
|
|
font.pointSize: Math.max(1, applyUiScale ? root.pointSize * Style.uiScaleRatio : root.pointSize)
|
|
color: Color.mOnSurface
|
|
verticalAlignment: Text.AlignVCenter
|
|
horizontalAlignment: Text.AlignHCenter
|
|
}
|