mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-02 10:37:50 +00:00
Renamed properties so its easier to understand
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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: ""
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
+16
-15
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user