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 {
id: root
rWidth: 380 * scaling
rHeight: 500 * scaling
rAnchorRight: true
panelWidth: 380 * scaling
panelHeight: 500 * scaling
panelAnchorRight: true
panelContent: Rectangle {
color: Color.transparent

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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