mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-08 06:25:37 -05:00
control center container width calculations
This commit is contained in:
@@ -47,10 +47,13 @@ Column {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
width: parent.parent.width - parent.anchors.leftMargin - Theme.spacingS - Theme.iconSize
|
||||
text: "Current: " + (root.currentSinkDisplayName || "None")
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.primary
|
||||
font.weight: Font.Medium
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,6 +76,8 @@ Column {
|
||||
Row {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Theme.spacingM
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Theme.spacingM
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.spacingM
|
||||
|
||||
@@ -93,17 +98,22 @@ Column {
|
||||
}
|
||||
|
||||
Column {
|
||||
width: parent.width - parent.spacing - Theme.iconSize
|
||||
spacing: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: AudioService.displayName(modelData)
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: modelData === AudioService.sink ? Theme.primary : Theme.surfaceText
|
||||
font.weight: modelData === AudioService.sink ? Font.Medium : Font.Normal
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: {
|
||||
if (AudioService.subtitle(modelData.name)
|
||||
&& AudioService.subtitle(
|
||||
@@ -118,6 +128,8 @@ Column {
|
||||
Theme.surfaceText.g,
|
||||
Theme.surfaceText.b, 0.7)
|
||||
visible: text !== ""
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,10 +47,13 @@ Column {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
width: parent.parent.width - parent.anchors.leftMargin - Theme.spacingS - Theme.iconSize
|
||||
text: "Current: " + (root.currentSourceDisplayName || "None")
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.primary
|
||||
font.weight: Font.Medium
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,6 +76,8 @@ Column {
|
||||
Row {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Theme.spacingM
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Theme.spacingM
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.spacingM
|
||||
|
||||
@@ -91,17 +96,22 @@ Column {
|
||||
}
|
||||
|
||||
Column {
|
||||
width: parent.width - parent.spacing - Theme.iconSize
|
||||
spacing: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: AudioService.displayName(modelData)
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: modelData === AudioService.source ? Theme.primary : Theme.surfaceText
|
||||
font.weight: modelData === AudioService.source ? Font.Medium : Font.Normal
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: {
|
||||
if (AudioService.subtitle(modelData.name)
|
||||
&& AudioService.subtitle(
|
||||
@@ -116,6 +126,8 @@ Column {
|
||||
Theme.surfaceText.g,
|
||||
Theme.surfaceText.b, 0.7)
|
||||
visible: text !== ""
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -13,6 +13,7 @@ Item {
|
||||
id: bluetoothTab
|
||||
|
||||
property alias bluetoothContextMenuWindow: bluetoothContextMenuWindow
|
||||
property alias contentHeight: mainColumn.height
|
||||
|
||||
DankFlickable {
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -712,6 +712,7 @@ DankPopout {
|
||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g,
|
||||
Theme.outline.b, 0.05)
|
||||
border.width: 1
|
||||
clip: true
|
||||
|
||||
Loader {
|
||||
id: tabContentLoader
|
||||
@@ -751,7 +752,7 @@ DankPopout {
|
||||
Component {
|
||||
id: bluetoothTabComponent
|
||||
BluetoothTab {
|
||||
implicitHeight: 400
|
||||
implicitHeight: Math.max(300, contentHeight + Theme.spacingL)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ Column {
|
||||
spacing: Theme.spacingS
|
||||
|
||||
StyledText {
|
||||
id: availableNetworksText
|
||||
text: "Available Networks"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
@@ -45,11 +46,12 @@ Column {
|
||||
}
|
||||
|
||||
Item {
|
||||
width: parent.width - 170
|
||||
width: parent.width - availableNetworksText.width - refreshButtonContainer.width - parent.spacing * 2
|
||||
height: 1
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: refreshButtonContainer
|
||||
width: 28
|
||||
height: 28
|
||||
radius: 14
|
||||
|
||||
Reference in New Issue
Block a user