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>
42 lines
1.2 KiB
QML
42 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
|
|
|
|
Text {
|
|
id: root
|
|
|
|
property bool richTextEnabled: false
|
|
property bool markdownTextEnabled: false
|
|
property string family: Settings.data.ui.fontDefault
|
|
property real pointSize: Style.fontSizeM
|
|
property bool applyUiScale: true
|
|
property real fontScale: {
|
|
const fontScale = (root.family === Settings.data.ui.fontDefault ? Settings.data.ui.fontDefaultScale : Settings.data.ui.fontFixedScale);
|
|
if (applyUiScale) {
|
|
return fontScale * Style.uiScaleRatio;
|
|
}
|
|
return fontScale;
|
|
}
|
|
property var features: ({})
|
|
|
|
opacity: enabled ? 1.0 : 0.6
|
|
font.family: root.family
|
|
font.weight: Style.fontWeightMedium
|
|
font.pointSize: Math.max(1, root.pointSize * fontScale)
|
|
font.features: root.features
|
|
color: Color.mOnSurface
|
|
elide: Text.ElideRight
|
|
wrapMode: Text.NoWrap
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
textFormat: {
|
|
if (root.richTextEnabled) {
|
|
return Text.RichText;
|
|
} else if (root.markdownTextEnabled) {
|
|
return Text.MarkdownText;
|
|
}
|
|
return Text.PlainText;
|
|
}
|
|
}
|