1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-13 00:42:49 -05:00

control center container width calculations

This commit is contained in:
bbedward
2025-08-28 10:46:42 -04:00
parent 77f40a7201
commit 29ee15e477
6 changed files with 33 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ Column {
spacing: Theme.spacingM
StyledText {
id: availableDevicesText
text: "Available Devices"
font.pixelSize: Theme.fontSizeLarge
color: Theme.surfaceText
@@ -28,15 +29,14 @@ Column {
}
Item {
width: parent.width - scanButton.width - parent.spacing
- 150 // Spacer to push button right
width: parent.width - availableDevicesText.width - scanButton.width - parent.spacing * 2
height: 1
}
Rectangle {
id: scanButton
width: Math.max(100, scanText.contentWidth + Theme.spacingL * 2)
width: Math.min(Math.max(100, scanText.contentWidth + Theme.spacingL * 2), parent.width * 0.3)
height: 32
radius: Theme.cornerRadius
color: scanArea.containsMouse ? Qt.rgba(Theme.primary.r,