mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
cc: bit of extra height for some detail items
This commit is contained in:
@@ -16,10 +16,18 @@ Item {
|
|||||||
property var widgetModel: null
|
property var widgetModel: null
|
||||||
property var collapseCallback: null
|
property var collapseCallback: null
|
||||||
|
|
||||||
|
function getDetailHeight(section) {
|
||||||
|
const maxAvailable = parent ? parent.height - Theme.spacingS : 9999
|
||||||
|
if (section === "wifi") return Math.min(350, maxAvailable)
|
||||||
|
if (section === "bluetooth") return Math.min(350, maxAvailable)
|
||||||
|
if (section.startsWith("brightnessSlider_")) return Math.min(400, maxAvailable)
|
||||||
|
return Math.min(250, maxAvailable)
|
||||||
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: pluginDetailLoader
|
id: pluginDetailLoader
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 250
|
height: parent.height - Theme.spacingS
|
||||||
y: Theme.spacingS
|
y: Theme.spacingS
|
||||||
active: false
|
active: false
|
||||||
sourceComponent: null
|
sourceComponent: null
|
||||||
@@ -28,7 +36,7 @@ Item {
|
|||||||
Loader {
|
Loader {
|
||||||
id: coreDetailLoader
|
id: coreDetailLoader
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 250
|
height: parent.height - Theme.spacingS
|
||||||
y: Theme.spacingS
|
y: Theme.spacingS
|
||||||
active: false
|
active: false
|
||||||
sourceComponent: null
|
sourceComponent: null
|
||||||
|
|||||||
@@ -160,8 +160,9 @@ Column {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DetailHost {
|
DetailHost {
|
||||||
|
id: detailHost
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: active ? (250 + Theme.spacingS) : 0
|
height: active ? (getDetailHeight(root.expandedSection) + Theme.spacingS) : 0
|
||||||
property bool active: {
|
property bool active: {
|
||||||
if (root.expandedSection === "")
|
if (root.expandedSection === "")
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -64,7 +64,12 @@ DankPopout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
popupWidth: 550
|
popupWidth: 550
|
||||||
popupHeight: Math.min((triggerScreen?.height ?? 1080) - 100, contentLoader.item && contentLoader.item.implicitHeight > 0 ? contentLoader.item.implicitHeight + 20 : 400)
|
popupHeight: {
|
||||||
|
const screenHeight = (triggerScreen?.height ?? 1080)
|
||||||
|
const maxHeight = screenHeight - 100
|
||||||
|
const contentHeight = contentLoader.item && contentLoader.item.implicitHeight > 0 ? contentLoader.item.implicitHeight + 20 : 400
|
||||||
|
return Math.min(maxHeight, contentHeight)
|
||||||
|
}
|
||||||
triggerX: (triggerScreen?.width ?? 1920) - 600 - Theme.spacingL
|
triggerX: (triggerScreen?.width ?? 1920) - 600 - Theme.spacingL
|
||||||
triggerY: Theme.barHeight - 4 + SettingsData.dankBarSpacing
|
triggerY: Theme.barHeight - 4 + SettingsData.dankBarSpacing
|
||||||
triggerWidth: 80
|
triggerWidth: 80
|
||||||
|
|||||||
@@ -180,7 +180,11 @@ Rectangle {
|
|||||||
|
|
||||||
Column {
|
Column {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: parent.parent.width - parent.parent.anchors.leftMargin - parent.spacing - Theme.iconSize - Theme.spacingM
|
width: {
|
||||||
|
const iconWidth = Theme.iconSize
|
||||||
|
const pinButtonWidth = pinInputRow.width + Theme.spacingS * 4 + Theme.spacingM
|
||||||
|
return parent.parent.width - iconWidth - parent.spacing - pinButtonWidth - Theme.spacingM * 2
|
||||||
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: AudioService.displayName(modelData)
|
text: AudioService.displayName(modelData)
|
||||||
|
|||||||
@@ -187,7 +187,11 @@ Rectangle {
|
|||||||
|
|
||||||
Column {
|
Column {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: parent.parent.width - parent.parent.anchors.leftMargin - parent.spacing - Theme.iconSize - Theme.spacingM
|
width: {
|
||||||
|
const iconWidth = Theme.iconSize
|
||||||
|
const pinButtonWidth = pinOutputRow.width + Theme.spacingS * 4 + Theme.spacingM
|
||||||
|
return parent.parent.width - iconWidth - parent.spacing - pinButtonWidth - Theme.spacingM * 2
|
||||||
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: AudioService.displayName(modelData)
|
text: AudioService.displayName(modelData)
|
||||||
|
|||||||
@@ -10,7 +10,12 @@ import qs.Modals
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
implicitHeight: BluetoothService.adapter && BluetoothService.adapter.enabled ? headerRow.height + bluetoothContent.height + Theme.spacingM : headerRow.height
|
implicitHeight: {
|
||||||
|
if (height > 0) {
|
||||||
|
return height
|
||||||
|
}
|
||||||
|
return BluetoothService.adapter && BluetoothService.adapter.enabled ? headerRow.height + bluetoothContent.height + Theme.spacingM : headerRow.height
|
||||||
|
}
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
||||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08)
|
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08)
|
||||||
|
|||||||
@@ -88,7 +88,12 @@ Rectangle {
|
|||||||
SettingsData.set("brightnessDevicePins", pins)
|
SettingsData.set("brightnessDevicePins", pins)
|
||||||
}
|
}
|
||||||
|
|
||||||
implicitHeight: brightnessContent.height + Theme.spacingM
|
implicitHeight: {
|
||||||
|
if (height > 0) {
|
||||||
|
return height
|
||||||
|
}
|
||||||
|
return brightnessContent.height + Theme.spacingM
|
||||||
|
}
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
||||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08)
|
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08)
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ Rectangle {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
implicitHeight: {
|
implicitHeight: {
|
||||||
|
if (height > 0) {
|
||||||
|
return height
|
||||||
|
}
|
||||||
if (NetworkService.wifiToggling) {
|
if (NetworkService.wifiToggling) {
|
||||||
return headerRow.height + wifiToggleContent.height + Theme.spacingM
|
return headerRow.height + wifiToggleContent.height + Theme.spacingM
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user