Removed all creeping: readonly property real scaling: Scaling.scale(screen)
This commit is contained in:
parent
f67c48032f
commit
33bec01e98
31 changed files with 294 additions and 333 deletions
|
|
@ -15,6 +15,8 @@ NLoader {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property ShellScreen modelData
|
required property ShellScreen modelData
|
||||||
|
readonly property real scaling: Scaling.scale(screen)
|
||||||
|
screen: modelData
|
||||||
|
|
||||||
// Visible ring color
|
// Visible ring color
|
||||||
property color ringColor: Colors.mSurface
|
property color ringColor: Colors.mSurface
|
||||||
|
|
@ -25,7 +27,7 @@ NLoader {
|
||||||
property int innerRadius: 20
|
property int innerRadius: 20
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
screen: modelData
|
|
||||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||||
WlrLayershell.namespace: "quickshell-corner"
|
WlrLayershell.namespace: "quickshell-corner"
|
||||||
// Do not take keyboard focus and make the surface click-through
|
// Do not take keyboard focus and make the surface click-through
|
||||||
|
|
@ -39,7 +41,7 @@ NLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
margins {
|
margins {
|
||||||
top: Math.round(Style.barHeight * Scaling.scale(screen))
|
top: Math.floor(Style.barHeight * scaling)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Source we want to show only as a ring
|
// Source we want to show only as a ring
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,12 @@ Variants {
|
||||||
|
|
||||||
required property ShellScreen modelData
|
required property ShellScreen modelData
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
readonly property real scaling: Scaling.scale(screen)
|
||||||
|
|
||||||
screen: modelData
|
screen: modelData
|
||||||
|
|
||||||
implicitHeight: Style.barHeight * scaling
|
implicitHeight: Style.barHeight * scaling
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
// If no bar display activated in settings, then show them all
|
// If no bar activated in settings, then show them all
|
||||||
visible: modelData ? (Settings.data.bar.monitors.includes(modelData.name)
|
visible: modelData ? (Settings.data.bar.monitors.includes(modelData.name)
|
||||||
|| (Settings.data.bar.monitors.length === 0)) : false
|
|| (Settings.data.bar.monitors.length === 0)) : false
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import qs.Widgets
|
||||||
NIconButton {
|
NIconButton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
sizeMultiplier: 0.8
|
sizeMultiplier: 0.8
|
||||||
showBorder: false
|
showBorder: false
|
||||||
icon: "notifications"
|
icon: "notifications"
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import qs.Services
|
||||||
import qs.Widgets
|
import qs.Widgets
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
readonly property real itemSize: 24 * scaling
|
readonly property real itemSize: 24 * scaling
|
||||||
|
|
||||||
width: tray.width
|
width: tray.width
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import qs.Widgets
|
||||||
PopupWindow {
|
PopupWindow {
|
||||||
id: trayMenu
|
id: trayMenu
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
property QsMenuHandle menu
|
property QsMenuHandle menu
|
||||||
property var anchorItem: null
|
property var anchorItem: null
|
||||||
property real anchorX
|
property real anchorX
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import qs.Widgets
|
||||||
NIconButton {
|
NIconButton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
readonly property bool wifiEnabled: Settings.data.network.wifiEnabled
|
readonly property bool wifiEnabled: Settings.data.network.wifiEnabled
|
||||||
sizeMultiplier: 0.8
|
sizeMultiplier: 0.8
|
||||||
showBorder: false
|
showBorder: false
|
||||||
|
|
|
||||||
|
|
@ -12,16 +12,13 @@ Item {
|
||||||
property bool isDestroying: false
|
property bool isDestroying: false
|
||||||
property bool hovered: false
|
property bool hovered: false
|
||||||
|
|
||||||
// Unified scale
|
|
||||||
readonly property real s: Scaling.scale(screen)
|
|
||||||
|
|
||||||
property ListModel localWorkspaces: ListModel {}
|
property ListModel localWorkspaces: ListModel {}
|
||||||
property real masterProgress: 0.0
|
property real masterProgress: 0.0
|
||||||
property bool effectsActive: false
|
property bool effectsActive: false
|
||||||
property color effectColor: Colors.mPrimary
|
property color effectColor: Colors.mPrimary
|
||||||
|
|
||||||
property int horizontalPadding: Math.round(16 * s)
|
property int horizontalPadding: Math.round(16 * scaling)
|
||||||
property int spacingBetweenPills: Math.round(8 * s)
|
property int spacingBetweenPills: Math.round(8 * scaling)
|
||||||
|
|
||||||
signal workspaceChanged(int workspaceId, color accentColor)
|
signal workspaceChanged(int workspaceId, color accentColor)
|
||||||
|
|
||||||
|
|
@ -30,18 +27,18 @@ Item {
|
||||||
for (var i = 0; i < localWorkspaces.count; i++) {
|
for (var i = 0; i < localWorkspaces.count; i++) {
|
||||||
const ws = localWorkspaces.get(i)
|
const ws = localWorkspaces.get(i)
|
||||||
if (ws.isFocused)
|
if (ws.isFocused)
|
||||||
total += Math.round(44 * s)
|
total += Math.round(44 * scaling)
|
||||||
else if (ws.isActive)
|
else if (ws.isActive)
|
||||||
total += Math.round(28 * s)
|
total += Math.round(28 * scaling)
|
||||||
else
|
else
|
||||||
total += Math.round(16 * s)
|
total += Math.round(16 * scaling)
|
||||||
}
|
}
|
||||||
total += Math.max(localWorkspaces.count - 1, 0) * spacingBetweenPills
|
total += Math.max(localWorkspaces.count - 1, 0) * spacingBetweenPills
|
||||||
total += horizontalPadding * 2
|
total += horizontalPadding * 2
|
||||||
return total
|
return total
|
||||||
}
|
}
|
||||||
|
|
||||||
height: Math.round(36 * s)
|
height: Math.round(36 * scaling)
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
localWorkspaces.clear()
|
localWorkspaces.clear()
|
||||||
|
|
@ -116,14 +113,14 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: workspaceBackground
|
id: workspaceBackground
|
||||||
width: parent.width - Math.round(15 * s)
|
width: parent.width - Math.round(15 * scaling)
|
||||||
height: Math.round(26 * s)
|
height: Math.round(26 * scaling)
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
radius: Math.round(12 * s)
|
radius: Math.round(12 * scaling)
|
||||||
color: Colors.mSurfaceVariant
|
color: Colors.mSurfaceVariant
|
||||||
border.color: Colors.mOutlineVariant
|
border.color: Colors.mOutlineVariant
|
||||||
border.width: Math.max(1, Math.round(1 * s))
|
border.width: Math.max(1, Math.round(1 * scaling))
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: MultiEffect {
|
layer.effect: MultiEffect {
|
||||||
shadowColor: Colors.mShadow
|
shadowColor: Colors.mShadow
|
||||||
|
|
@ -144,14 +141,14 @@ Item {
|
||||||
model: localWorkspaces
|
model: localWorkspaces
|
||||||
Item {
|
Item {
|
||||||
id: workspacePillContainer
|
id: workspacePillContainer
|
||||||
height: Math.round(12 * s)
|
height: Math.round(12 * scaling)
|
||||||
width: {
|
width: {
|
||||||
if (model.isFocused)
|
if (model.isFocused)
|
||||||
return Math.round(44 * s)
|
return Math.round(44 * scaling)
|
||||||
else if (model.isActive)
|
else if (model.isActive)
|
||||||
return Math.round(28 * s)
|
return Math.round(28 * scaling)
|
||||||
else
|
else
|
||||||
return Math.round(16 * s)
|
return Math.round(16 * scaling)
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -159,10 +156,10 @@ Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: {
|
radius: {
|
||||||
if (model.isFocused)
|
if (model.isFocused)
|
||||||
return Math.round(12 * s)
|
return Math.round(12 * scaling)
|
||||||
else
|
else
|
||||||
// half of focused height (if you want to animate this too)
|
// half of focused height (if you want to animate this too)
|
||||||
return Math.round(6 * s)
|
return Math.round(6 * scaling)
|
||||||
}
|
}
|
||||||
color: {
|
color: {
|
||||||
if (model.isFocused)
|
if (model.isFocused)
|
||||||
|
|
@ -248,7 +245,7 @@ Item {
|
||||||
radius: width / 2
|
radius: width / 2
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
border.color: root.effectColor
|
border.color: root.effectColor
|
||||||
border.width: Math.max(1, Math.round((2 + 6 * (1.0 - root.masterProgress)) * s))
|
border.width: Math.max(1, Math.round((2 + 6 * (1.0 - root.masterProgress)) * scaling))
|
||||||
opacity: root.effectsActive && model.isFocused ? (1.0 - root.masterProgress) * 0.7 : 0
|
opacity: root.effectsActive && model.isFocused ? (1.0 - root.masterProgress) * 0.7 : 0
|
||||||
visible: root.effectsActive && model.isFocused
|
visible: root.effectsActive && model.isFocused
|
||||||
z: 1
|
z: 1
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,6 @@ NLoader {
|
||||||
NPanel {
|
NPanel {
|
||||||
id: calendarPanel
|
id: calendarPanel
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
|
|
||||||
// Override hide function to animate first
|
// Override hide function to animate first
|
||||||
function hide() {
|
function hide() {
|
||||||
// Start hide animation
|
// Start hide animation
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,6 @@ NLoader {
|
||||||
NPanel {
|
NPanel {
|
||||||
id: demoPanel
|
id: demoPanel
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
|
|
||||||
// Override hide function to animate first
|
// Override hide function to animate first
|
||||||
function hide() {
|
function hide() {
|
||||||
// Start hide animation
|
// Start hide animation
|
||||||
|
|
@ -73,7 +71,7 @@ NLoader {
|
||||||
border.color: Colors.mOutlineVariant
|
border.color: Colors.mOutlineVariant
|
||||||
border.width: Math.max(1, Style.borderThin * scaling)
|
border.width: Math.max(1, Style.borderThin * scaling)
|
||||||
width: 500 * scaling
|
width: 500 * scaling
|
||||||
height: 700 * scaling
|
height: 900 * scaling
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
// Animation properties
|
// Animation properties
|
||||||
|
|
@ -312,7 +310,7 @@ NLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: `Brightness: ${Math.round(Brightness.brightness)}%`
|
text: `Brightness: ${Math.round(BrightnessService.brightness)}%`
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -322,30 +320,30 @@ NLoader {
|
||||||
icon: "brightness_low"
|
icon: "brightness_low"
|
||||||
fontPointSize: Style.fontSizeLarge * scaling
|
fontPointSize: Style.fontSizeLarge * scaling
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Brightness.decreaseBrightness()
|
BrightnessService.decreaseBrightness()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NSlider {
|
NSlider {
|
||||||
from: 0
|
from: 0
|
||||||
to: 100
|
to: 100
|
||||||
stepSize: 1
|
stepSize: 1
|
||||||
value: Brightness.brightness
|
value: BrightnessService.brightness
|
||||||
implicitWidth: bgRect.width * 0.5
|
implicitWidth: bgRect.width * 0.5
|
||||||
onMoved: {
|
onMoved: {
|
||||||
Brightness.setBrightnessDebounced(value)
|
BrightnessService.setBrightnessDebounced(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "brightness_high"
|
icon: "brightness_high"
|
||||||
fontPointSize: Style.fontSizeLarge * scaling
|
fontPointSize: Style.fontSizeLarge * scaling
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Brightness.increaseBrightness()
|
BrightnessService.increaseBrightness()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: `Method: ${Brightness.currentMethod} | Available: ${Brightness.available}`
|
text: `Method: ${BrightnessService.currentMethod} | Available: ${BrightnessService.available}`
|
||||||
color: Colors.mOnSurfaceVariant
|
color: Colors.mOnSurfaceVariant
|
||||||
font.pointSize: Style.fontSizeSmall * scaling
|
font.pointSize: Style.fontSizeSmall * scaling
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,12 @@ NLoader {
|
||||||
Variants {
|
Variants {
|
||||||
model: Quickshell.screens
|
model: Quickshell.screens
|
||||||
|
|
||||||
Item {
|
PanelWindow {
|
||||||
property var modelData
|
id: dockWindow
|
||||||
readonly property real scaling: Scaling.scale(modelData)
|
|
||||||
|
required property ShellScreen modelData
|
||||||
|
readonly property real scaling: Scaling.scale(screen)
|
||||||
|
screen: modelData
|
||||||
|
|
||||||
// Auto-hide properties
|
// Auto-hide properties
|
||||||
property bool autoHide: Settings.data.dock.autoHide
|
property bool autoHide: Settings.data.dock.autoHide
|
||||||
|
|
@ -37,13 +40,9 @@ NLoader {
|
||||||
property var contextMenuTarget: null
|
property var contextMenuTarget: null
|
||||||
property var contextMenuToplevel: null
|
property var contextMenuToplevel: null
|
||||||
|
|
||||||
PanelWindow {
|
|
||||||
id: dockWindow
|
|
||||||
|
|
||||||
// Dock is only shown if explicitely toggled
|
// Dock is only shown if explicitely toggled
|
||||||
visible: modelData ? Settings.data.dock.monitors.includes(modelData.name) : false
|
visible: modelData ? Settings.data.dock.monitors.includes(modelData.name) : false
|
||||||
|
|
||||||
screen: modelData
|
|
||||||
exclusionMode: ExclusionMode.Ignore
|
exclusionMode: ExclusionMode.Ignore
|
||||||
anchors.bottom: true
|
anchors.bottom: true
|
||||||
anchors.left: true
|
anchors.left: true
|
||||||
|
|
@ -175,8 +174,7 @@ NLoader {
|
||||||
radius: 18
|
radius: 18
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
property bool isActive: ToplevelManager.activeToplevel
|
property bool isActive: ToplevelManager.activeToplevel && ToplevelManager.activeToplevel === modelData
|
||||||
&& ToplevelManager.activeToplevel === modelData
|
|
||||||
property bool hovered: appMouseArea.containsMouse
|
property bool hovered: appMouseArea.containsMouse
|
||||||
property string appId: modelData ? modelData.appId : ""
|
property string appId: modelData ? modelData.appId : ""
|
||||||
property string appTitle: modelData ? modelData.title : ""
|
property string appTitle: modelData ? modelData.title : ""
|
||||||
|
|
@ -358,4 +356,3 @@ NLoader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ Variants {
|
||||||
|
|
||||||
required property ShellScreen modelData
|
required property ShellScreen modelData
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
readonly property real scaling: Scaling.scale(screen)
|
||||||
|
screen: modelData
|
||||||
|
|
||||||
// Access the notification model from the service
|
// Access the notification model from the service
|
||||||
property ListModel notificationModel: NotificationService.notificationModel
|
property ListModel notificationModel: NotificationService.notificationModel
|
||||||
|
|
@ -23,7 +24,6 @@ Variants {
|
||||||
// Track notifications being removed for animation
|
// Track notifications being removed for animation
|
||||||
property var removingNotifications: ({})
|
property var removingNotifications: ({})
|
||||||
|
|
||||||
screen: modelData
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
// If no notification display activated in settings, then show them all
|
// If no notification display activated in settings, then show them all
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ NLoader {
|
||||||
NPanel {
|
NPanel {
|
||||||
id: panel
|
id: panel
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
property int currentTabIndex: 0
|
property int currentTabIndex: 0
|
||||||
|
|
||||||
// Override hide function to animate first
|
// Override hide function to animate first
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import qs.Widgets
|
||||||
NBox {
|
NBox {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
property string uptimeText: "--"
|
property string uptimeText: "--"
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@ import qs.Widgets
|
||||||
NBox {
|
NBox {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
|
|
||||||
Layout.preferredWidth: 84 * scaling
|
Layout.preferredWidth: 84 * scaling
|
||||||
implicitHeight: content.implicitHeight + Style.marginTiny * 2 * scaling
|
implicitHeight: content.implicitHeight + Style.marginTiny * 2 * scaling
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import qs.Widgets
|
||||||
NBox {
|
NBox {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
readonly property bool weatherReady: (Location.data.weather !== null)
|
readonly property bool weatherReady: (Location.data.weather !== null)
|
||||||
|
|
||||||
// TBC weatherReady is not turning to false when we reset weather...
|
// TBC weatherReady is not turning to false when we reset weather...
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ NLoader {
|
||||||
NPanel {
|
NPanel {
|
||||||
id: sidePanel
|
id: sidePanel
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
// Single source of truth for spacing between cards (both axes)
|
// Single source of truth for spacing between cards (both axes)
|
||||||
property real cardSpacing: Style.marginLarge * scaling
|
property real cardSpacing: Style.marginLarge * scaling
|
||||||
// X coordinate from the bar to align this panel under
|
// X coordinate from the bar to align this panel under
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ import qs.Services
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
|
|
||||||
implicitWidth: childrenRect.width
|
implicitWidth: childrenRect.width
|
||||||
implicitHeight: childrenRect.height
|
implicitHeight: childrenRect.height
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@ import qs.Services
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
|
|
||||||
property bool running: true
|
property bool running: true
|
||||||
property color color: Colors.mPrimary
|
property color color: Colors.mPrimary
|
||||||
property int size: Style.baseWidgetSize * scaling
|
property int size: Style.baseWidgetSize * scaling
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ import qs.Services
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
|
|
||||||
implicitWidth: childrenRect.width
|
implicitWidth: childrenRect.width
|
||||||
implicitHeight: childrenRect.height
|
implicitHeight: childrenRect.height
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import qs.Services
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
property real value: 0 // 0..100 (or any range visually mapped)
|
property real value: 0 // 0..100 (or any range visually mapped)
|
||||||
property string icon: ""
|
property string icon: ""
|
||||||
property string suffix: "%"
|
property string suffix: "%"
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ import qs.Widgets
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
|
|
||||||
signal entered
|
signal entered
|
||||||
signal exited
|
signal exited
|
||||||
signal clicked
|
signal clicked
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import qs.Widgets
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
readonly property real preferredHeight: Style.baseWidgetSize * 1.25 * scaling
|
readonly property real preferredHeight: Style.baseWidgetSize * 1.25 * scaling
|
||||||
|
|
||||||
property string label: ""
|
property string label: ""
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import qs.Services
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
// Multiplier to control how large the button container is relative to Style.baseWidgetSize
|
// Multiplier to control how large the button container is relative to Style.baseWidgetSize
|
||||||
property real sizeMultiplier: 1.0
|
property real sizeMultiplier: 1.0
|
||||||
property real size: Style.baseWidgetSize * sizeMultiplier * scaling
|
property real size: Style.baseWidgetSize * sizeMultiplier * scaling
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ Rectangle {
|
||||||
property real imageRadius: width * 0.5
|
property real imageRadius: width * 0.5
|
||||||
radius: imageRadius
|
radius: imageRadius
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
property string imagePath: ""
|
property string imagePath: ""
|
||||||
property string fallbackIcon: ""
|
property string fallbackIcon: ""
|
||||||
property color borderColor: "transparent"
|
property color borderColor: "transparent"
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ PanelWindow {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
readonly property real scaling: Scaling.scale(screen)
|
||||||
|
|
||||||
property bool showOverlay: Settings.data.general.dimDesktop
|
property bool showOverlay: Settings.data.general.dimDesktop
|
||||||
property int topMargin: Style.barHeight * scaling
|
property int topMargin: Style.barHeight * scaling
|
||||||
property color overlayColor: showOverlay ? Colors.applyOpacity(Colors.mShadow, "AA") : "transparent"
|
property color overlayColor: showOverlay ? Colors.applyOpacity(Colors.mShadow, "AA") : "transparent"
|
||||||
|
|
||||||
signal dismissed
|
signal dismissed
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
|
|
@ -37,7 +37,7 @@ PanelWindow {
|
||||||
color: visible ? overlayColor : "transparent"
|
color: visible ? overlayColor : "transparent"
|
||||||
visible: false
|
visible: false
|
||||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||||
screen: (typeof modelData !== 'undefined' ? modelData : null)
|
|
||||||
anchors.top: true
|
anchors.top: true
|
||||||
anchors.left: true
|
anchors.left: true
|
||||||
anchors.right: true
|
anchors.right: true
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ import qs.Services
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
|
|
||||||
property string icon: ""
|
property string icon: ""
|
||||||
property string text: ""
|
property string text: ""
|
||||||
property string tooltipText: ""
|
property string tooltipText: ""
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,12 @@ import qs.Services
|
||||||
Slider {
|
Slider {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
readonly property real knobDiameter: Style.baseWidgetSize * 0.75 * scaling
|
readonly property real knobDiameter: Style.baseWidgetSize * 0.75 * scaling
|
||||||
readonly property real trackHeight: knobDiameter * 0.5
|
readonly property real trackHeight: knobDiameter * 0.5
|
||||||
readonly property real cutoutExtra: Style.baseWidgetSize * 0.1 * scaling
|
readonly property real cutoutExtra: Style.baseWidgetSize * 0.1 * scaling
|
||||||
|
|
||||||
// Optional color to cut the track beneath the knob (should match surrounding background)
|
// Optional color to cut the track beneath the knob (should match surrounding background)
|
||||||
property var cutoutColor
|
property var cutoutColor
|
||||||
property var screen
|
|
||||||
property bool snapAlways: true
|
property bool snapAlways: true
|
||||||
|
|
||||||
snapMode: snapAlways ? Slider.SnapAlways : Slider.SnapOnRelease
|
snapMode: snapAlways ? Slider.SnapAlways : Slider.SnapOnRelease
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ import qs.Widgets
|
||||||
Text {
|
Text {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
|
|
||||||
font.family: Settings.data.ui.fontFamily
|
font.family: Settings.data.ui.fontFamily
|
||||||
font.pointSize: Style.fontSizeMedium * scaling
|
font.pointSize: Style.fontSizeMedium * scaling
|
||||||
font.weight: Style.fontWeightRegular
|
font.weight: Style.fontWeightRegular
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import qs.Services
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
property string label: ""
|
property string label: ""
|
||||||
property string description: ""
|
property string description: ""
|
||||||
property bool readOnly: false
|
property bool readOnly: false
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import qs.Services
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
property string label: ""
|
property string label: ""
|
||||||
property string description: ""
|
property string description: ""
|
||||||
property bool value: false
|
property bool value: false
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import qs.Services
|
||||||
Window {
|
Window {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
|
||||||
property bool isVisible: false
|
property bool isVisible: false
|
||||||
property string text: "Placeholder"
|
property string text: "Placeholder"
|
||||||
property Item target: null
|
property Item target: null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue