mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-27 06:52:50 -05:00
Allow removing force-padding on monitor widgets + plugin load fixes
This commit is contained in:
@@ -827,6 +827,7 @@ Item {
|
||||
return processListPopoutLoader.item
|
||||
}
|
||||
parentScreen: barWindow.screen
|
||||
widgetData: parent.widgetData
|
||||
toggleProcessList: () => {
|
||||
processListPopoutLoader.active = true
|
||||
return processListPopoutLoader.item?.toggle()
|
||||
@@ -846,6 +847,7 @@ Item {
|
||||
return processListPopoutLoader.item
|
||||
}
|
||||
parentScreen: barWindow.screen
|
||||
widgetData: parent.widgetData
|
||||
toggleProcessList: () => {
|
||||
processListPopoutLoader.active = true
|
||||
return processListPopoutLoader.item?.toggle()
|
||||
@@ -875,6 +877,7 @@ Item {
|
||||
return processListPopoutLoader.item
|
||||
}
|
||||
parentScreen: barWindow.screen
|
||||
widgetData: parent.widgetData
|
||||
toggleProcessList: () => {
|
||||
processListPopoutLoader.active = true
|
||||
return processListPopoutLoader.item?.toggle()
|
||||
|
||||
@@ -65,6 +65,14 @@ Loader {
|
||||
restoreMode: Binding.RestoreNone
|
||||
}
|
||||
|
||||
Binding {
|
||||
target: root.item
|
||||
when: root.item && "widgetData" in root.item
|
||||
property: "widgetData"
|
||||
value: root.widgetData
|
||||
restoreMode: Binding.RestoreNone
|
||||
}
|
||||
|
||||
onLoaded: {
|
||||
if (item) {
|
||||
contentItemReady(item)
|
||||
|
||||
@@ -17,6 +17,8 @@ Rectangle {
|
||||
property var parentScreen: null
|
||||
property real barThickness: 48
|
||||
property real widgetThickness: 30
|
||||
property var widgetData: null
|
||||
property bool minimumWidth: (widgetData && widgetData.minimumWidth !== undefined) ? widgetData.minimumWidth : true
|
||||
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetThickness / 30))
|
||||
|
||||
width: isVertical ? widgetThickness : (cpuContent.implicitWidth + horizontalPadding * 2)
|
||||
@@ -141,7 +143,7 @@ Rectangle {
|
||||
text: "100%"
|
||||
}
|
||||
|
||||
width: Math.max(cpuBaseline.width, paintedWidth)
|
||||
width: root.minimumWidth ? Math.max(cpuBaseline.width, paintedWidth) : paintedWidth
|
||||
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
|
||||
@@ -17,6 +17,8 @@ Rectangle {
|
||||
property var parentScreen: null
|
||||
property real barThickness: 48
|
||||
property real widgetThickness: 30
|
||||
property var widgetData: null
|
||||
property bool minimumWidth: (widgetData && widgetData.minimumWidth !== undefined) ? widgetData.minimumWidth : true
|
||||
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetThickness / 30))
|
||||
|
||||
width: isVertical ? widgetThickness : (cpuTempContent.implicitWidth + horizontalPadding * 2)
|
||||
@@ -141,7 +143,7 @@ Rectangle {
|
||||
text: "100°"
|
||||
}
|
||||
|
||||
width: Math.max(tempBaseline.width, paintedWidth)
|
||||
width: root.minimumWidth ? Math.max(tempBaseline.width, paintedWidth) : paintedWidth
|
||||
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
|
||||
@@ -19,6 +19,7 @@ Rectangle {
|
||||
property real barThickness: 48
|
||||
property real widgetThickness: 30
|
||||
property int selectedGpuIndex: (widgetData && widgetData.selectedGpuIndex !== undefined) ? widgetData.selectedGpuIndex : 0
|
||||
property bool minimumWidth: (widgetData && widgetData.minimumWidth !== undefined) ? widgetData.minimumWidth : true
|
||||
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetThickness / 30))
|
||||
property real displayTemp: {
|
||||
if (!DgopService.availableGpus || DgopService.availableGpus.length === 0) {
|
||||
@@ -209,7 +210,7 @@ Rectangle {
|
||||
text: "100°"
|
||||
}
|
||||
|
||||
width: Math.max(gpuTempBaseline.width, paintedWidth)
|
||||
width: root.minimumWidth ? Math.max(gpuTempBaseline.width, paintedWidth) : paintedWidth
|
||||
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
|
||||
@@ -17,6 +17,8 @@ Rectangle {
|
||||
property var parentScreen: null
|
||||
property real barThickness: 48
|
||||
property real widgetThickness: 30
|
||||
property var widgetData: null
|
||||
property bool minimumWidth: (widgetData && widgetData.minimumWidth !== undefined) ? widgetData.minimumWidth : true
|
||||
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetThickness / 30))
|
||||
|
||||
width: isVertical ? widgetThickness : (ramContent.implicitWidth + horizontalPadding * 2)
|
||||
@@ -30,6 +32,7 @@ Rectangle {
|
||||
const baseColor = ramArea.containsMouse ? Theme.widgetBaseHoverColor : Theme.widgetBaseBackgroundColor;
|
||||
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * Theme.widgetTransparency);
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
DgopService.addRef(["memory"]);
|
||||
}
|
||||
@@ -141,7 +144,7 @@ Rectangle {
|
||||
text: "100%"
|
||||
}
|
||||
|
||||
width: Math.max(ramBaseline.width, paintedWidth)
|
||||
width: root.minimumWidth ? Math.max(ramBaseline.width, paintedWidth) : paintedWidth
|
||||
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
|
||||
Reference in New Issue
Block a user