Fix NPill scaling
This commit is contained in:
parent
934d4cc933
commit
a127696f35
2 changed files with 23 additions and 9 deletions
|
|
@ -16,16 +16,19 @@ NLoader {
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
readonly property real scaling: Scaling.scale(screen)
|
||||||
|
|
||||||
// Ensure panel shows itself once created
|
// Ensure panel shows itself once created
|
||||||
Component.onCompleted: show()
|
Component.onCompleted: {
|
||||||
|
console.log("[DemoPanel] Component completed, showing panel...")
|
||||||
|
show()
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: bgRect
|
id: bgRect
|
||||||
color: Colors.backgroundPrimary
|
color: Colors.backgroundPrimary
|
||||||
radius: Style.radiusMedium * scaling
|
radius: Style.radiusMedium * scaling
|
||||||
border.color: Colors.backgroundTertiary
|
border.color: Colors.accentPrimary
|
||||||
border.width: Math.max(1, Style.borderMedium * scaling)
|
border.width: 2
|
||||||
width: 600 * scaling
|
width: 500 * scaling
|
||||||
height: 600 * scaling
|
height: 700 * scaling
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
// Prevent closing when clicking in the panel bg
|
// Prevent closing when clicking in the panel bg
|
||||||
|
|
@ -33,10 +36,21 @@ NLoader {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Debug: Add a simple text to see if content is visible
|
||||||
|
NText {
|
||||||
|
text: "DemoPanel is working!"
|
||||||
|
color: Colors.accentPrimary
|
||||||
|
font.pointSize: Style.fontSizeLarge * scaling
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.topMargin: 20 * scaling
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Style.marginXL * scaling
|
anchors.margins: Style.marginMedium * scaling
|
||||||
spacing: Style.marginSmall * scaling
|
anchors.topMargin: (Style.marginMedium + 40) * scaling
|
||||||
|
spacing: Style.marginMedium * scaling
|
||||||
|
|
||||||
// NSlider
|
// NSlider
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ Item {
|
||||||
id: textItem
|
id: textItem
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: root.text
|
text: root.text
|
||||||
font.pointSize: Colors.fontSizeSmall * scaling
|
font.pointSize: Style.fontSizeSmall * scaling
|
||||||
font.weight: Style.fontWeightBold
|
font.weight: Style.fontWeightBold
|
||||||
color: textColor
|
color: textColor
|
||||||
visible: showPill
|
visible: showPill
|
||||||
|
|
@ -97,7 +97,7 @@ Item {
|
||||||
Text {
|
Text {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
font.family: showPill ? "Material Symbols Rounded" : "Material Symbols Outlined"
|
font.family: showPill ? "Material Symbols Rounded" : "Material Symbols Outlined"
|
||||||
font.pointSize: Colors.fontSizeSmall * scaling
|
font.pointSize: Style.fontSizeMedium * scaling
|
||||||
text: root.icon
|
text: root.icon
|
||||||
color: showPill ? iconTextColor : collapsedIconColor
|
color: showPill ? iconTextColor : collapsedIconColor
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue