Renamed properties so its easier to understand

This commit is contained in:
quadbyte 2025-08-20 10:36:45 -04:00
parent 1658c53393
commit 50e1de1dc1
7 changed files with 34 additions and 33 deletions

View file

@ -11,9 +11,9 @@ import qs.Widgets
NPanel { NPanel {
id: root id: root
rWidth: 380 * scaling panelWidth: 380 * scaling
rHeight: 500 * scaling panelHeight: 500 * scaling
rAnchorRight: true panelAnchorRight: true
panelContent: Rectangle { panelContent: Rectangle {
color: Color.transparent color: Color.transparent

View file

@ -10,9 +10,9 @@ import qs.Widgets
NPanel { NPanel {
id: root id: root
rWidth: 340 * scaling panelWidth: 380 * scaling
rHeight: 500 * scaling panelHeight: 500 * scaling
rAnchorRight: true panelAnchorRight: true
property string passwordPromptSsid: "" property string passwordPromptSsid: ""
property string passwordInput: "" property string passwordInput: ""

View file

@ -10,9 +10,9 @@ import qs.Widgets
NPanel { NPanel {
id: root id: root
rWidth: 340 * scaling panelWidth: 340 * scaling
rHeight: 320 * scaling panelHeight: 320 * scaling
rAnchorRight: true panelAnchorRight: true
// Main Column // Main Column
panelContent: ColumnLayout { panelContent: ColumnLayout {

View file

@ -12,9 +12,9 @@ import qs.Widgets
NPanel { NPanel {
id: root id: root
rWidth: 400 * scaling panelWidth: 380 * scaling
rHeight: 500 * scaling panelHeight: 500 * scaling
rAnchorRight: true panelAnchorRight: true
panelContent: Rectangle { panelContent: Rectangle {
id: notificationRect id: notificationRect

View file

@ -11,9 +11,9 @@ import qs.Widgets
NPanel { NPanel {
id: root id: root
rWidth: Math.max(screen?.width * 0.5, 1280) * scaling panelWidth: Math.max(screen?.width * 0.5, 1280) * scaling
rHeight: Math.max(screen?.height * 0.5, 720) * scaling panelHeight: Math.max(screen?.height * 0.5, 720) * scaling
rAnchorCentered: true panelAnchorCentered: true
// Tabs enumeration, order is NOT relevant // Tabs enumeration, order is NOT relevant
enum Tab { enum Tab {

View file

@ -10,9 +10,9 @@ import qs.Widgets
NPanel { NPanel {
id: panel id: panel
rWidth: 460 * scaling panelWidth: 460 * scaling
rHeight: 700 * scaling panelHeight: 700 * scaling
rAnchorRight: true panelAnchorRight: true
panelContent: Item { panelContent: Item {
id: content id: content

View file

@ -14,11 +14,11 @@ Loader {
property ShellScreen screen property ShellScreen screen
property Component panelContent: null property Component panelContent: null
property int rWidth: 1500 property int panelWidth: 1500
property int rHeight: 400 property int panelHeight: 400
property bool rAnchorCentered: false property bool panelAnchorCentered: false
property bool rAnchorLeft: false property bool panelAnchorLeft: false
property bool rAnchorRight: false property bool panelAnchorRight: false
// Animation properties // Animation properties
readonly property real originalScale: 0.7 readonly property real originalScale: 0.7
@ -125,21 +125,22 @@ Loader {
border.color: Color.mOutline border.color: Color.mOutline
border.width: Math.max(1, Style.borderS * scaling) border.width: Math.max(1, Style.borderS * scaling)
layer.enabled: true layer.enabled: true
width: rWidth width: panelWidth
height: rHeight height: panelHeight
anchors { anchors {
centerIn: rAnchorCentered ? parent : null centerIn: panelAnchorCentered ? parent : null
left: !rAnchorCentered && rAnchorLeft ? parent.left : parent.center left: !panelAnchorCentered && panelAnchorLeft ? parent.left : parent.center
right: !rAnchorCentered && rAnchorRight ? parent.right : parent.center right: !panelAnchorCentered && panelAnchorRight ? parent.right : parent.center
top: !rAnchorCentered && (Settings.data.bar.position === "top") ? parent.top : undefined top: !panelAnchorCentered && (Settings.data.bar.position === "top") ? parent.top : undefined
bottom: !rAnchorCentered && (Settings.data.bar.position === "bottom") ? parent.bottom : undefined bottom: !panelAnchorCentered && (Settings.data.bar.position === "bottom") ? parent.bottom : undefined
// margins // margins
topMargin: !rAnchorCentered && (Settings.data.bar.position === "top") ? Style.marginS * scaling : undefined topMargin: !panelAnchorCentered
bottomMargin: !rAnchorCentered && (Settings.data.bar.position === "top") ? Style.marginS * scaling : undefined
bottomMargin: !panelAnchorCentered
&& (Settings.data.bar.position === "bottom") ? Style.marginS * scaling : undefined && (Settings.data.bar.position === "bottom") ? Style.marginS * scaling : undefined
rightMargin: !rAnchorCentered && rAnchorRight ? Style.marginS * scaling : undefined rightMargin: !panelAnchorCentered && panelAnchorRight ? Style.marginS * scaling : undefined
} }
scale: root.scaleValue scale: root.scaleValue