mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-03 02:52:07 -04:00
Compare commits
8 Commits
v1.4.0
...
d084114149
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d084114149 | ||
|
|
f6d99eca0d | ||
|
|
722eb3289e | ||
|
|
b7f2bdcb2d | ||
|
|
11c20db6e6 | ||
|
|
8a4e3f8bb1 | ||
|
|
bc8fe97c13 | ||
|
|
47262155aa |
6
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
6
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -45,9 +45,9 @@ body:
|
||||
- type: textarea
|
||||
id: dms_doctor
|
||||
attributes:
|
||||
label: dms doctor -v
|
||||
description: Output of `dms doctor -v` command
|
||||
placeholder: Paste the output of `dms doctor -v` here
|
||||
label: dms doctor -vC
|
||||
description: Output of `dms doctor -vC` command
|
||||
placeholder: Paste the output of `dms doctor -vC` here
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
||||
6
.github/ISSUE_TEMPLATE/support_request.yml
vendored
6
.github/ISSUE_TEMPLATE/support_request.yml
vendored
@@ -30,9 +30,9 @@ body:
|
||||
- type: textarea
|
||||
id: dms_doctor
|
||||
attributes:
|
||||
label: dms doctor -v
|
||||
description: Output of `dms doctor -v` command
|
||||
placeholder: Paste the output of `dms doctor -v` here
|
||||
label: dms doctor -vC
|
||||
description: Output of `dms doctor -vC` command
|
||||
placeholder: Paste the output of `dms doctor -vC` here
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
|
||||
@@ -649,40 +649,73 @@ func checkI2CAvailability() checkResult {
|
||||
return checkResult{catOptionalFeatures, "I2C/DDC", statusOK, fmt.Sprintf("%d monitor(s) detected", len(devices)), "External monitor brightness control", doctorDocsURL + "#optional-features"}
|
||||
}
|
||||
|
||||
func checkKImageFormats() checkResult {
|
||||
func checkImageFormatPlugins() []checkResult {
|
||||
url := doctorDocsURL + "#optional-features"
|
||||
desc := "Extra image format support (AVIF, HEIF, JXL)"
|
||||
|
||||
pluginDir := findQtPluginDir()
|
||||
if pluginDir == "" {
|
||||
return checkResult{catOptionalFeatures, "kimageformats", statusInfo, "Cannot detect (qtpaths not found)", desc, url}
|
||||
}
|
||||
|
||||
imageFormatsDir := filepath.Join(pluginDir, "imageformats")
|
||||
keyPlugins := []struct{ file, format string }{
|
||||
{"kimg_avif.so", "AVIF"},
|
||||
{"kimg_heif.so", "HEIF"},
|
||||
{"kimg_jxl.so", "JXL"},
|
||||
{"kimg_exr.so", "EXR"},
|
||||
}
|
||||
|
||||
var found []string
|
||||
for _, p := range keyPlugins {
|
||||
if _, err := os.Stat(filepath.Join(imageFormatsDir, p.file)); err == nil {
|
||||
found = append(found, p.format)
|
||||
return []checkResult{
|
||||
{catOptionalFeatures, "qt6-imageformats", statusInfo, "Cannot detect (plugin dir not found)", "WebP, TIFF, JP2 support", url},
|
||||
{catOptionalFeatures, "kimageformats", statusInfo, "Cannot detect (plugin dir not found)", "AVIF, HEIF, JXL support", url},
|
||||
}
|
||||
}
|
||||
|
||||
if len(found) == 0 {
|
||||
return checkResult{catOptionalFeatures, "kimageformats", statusWarn, "Not installed", desc, url}
|
||||
imageFormatsDir := filepath.Join(pluginDir, "imageformats")
|
||||
|
||||
type pluginCheck struct {
|
||||
name string
|
||||
desc string
|
||||
plugins []struct{ file, format string }
|
||||
}
|
||||
|
||||
details := ""
|
||||
if doctorVerbose {
|
||||
details = fmt.Sprintf("Formats: %s (%s)", strings.Join(found, ", "), imageFormatsDir)
|
||||
checks := []pluginCheck{
|
||||
{
|
||||
name: "qt6-imageformats",
|
||||
desc: "WebP, TIFF, GIF, JP2 support",
|
||||
plugins: []struct{ file, format string }{
|
||||
{"libqwebp.so", "WebP"},
|
||||
{"libqtiff.so", "TIFF"},
|
||||
{"libqgif.so", "GIF"},
|
||||
{"libqjp2.so", "JP2"},
|
||||
{"libqicns.so", "ICNS"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "kimageformats",
|
||||
desc: "AVIF, HEIF, JXL support",
|
||||
plugins: []struct{ file, format string }{
|
||||
{"kimg_avif.so", "AVIF"},
|
||||
{"kimg_heif.so", "HEIF"},
|
||||
{"kimg_jxl.so", "JXL"},
|
||||
{"kimg_exr.so", "EXR"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return checkResult{catOptionalFeatures, "kimageformats", statusOK, fmt.Sprintf("Installed (%d formats)", len(found)), details, url}
|
||||
var results []checkResult
|
||||
for _, c := range checks {
|
||||
var found []string
|
||||
for _, p := range c.plugins {
|
||||
if _, err := os.Stat(filepath.Join(imageFormatsDir, p.file)); err == nil {
|
||||
found = append(found, p.format)
|
||||
}
|
||||
}
|
||||
|
||||
var result checkResult
|
||||
switch {
|
||||
case len(found) == 0:
|
||||
result = checkResult{catOptionalFeatures, c.name, statusWarn, "Not installed", c.desc, url}
|
||||
default:
|
||||
details := ""
|
||||
if doctorVerbose {
|
||||
details = fmt.Sprintf("Formats: %s (%s)", strings.Join(found, ", "), imageFormatsDir)
|
||||
}
|
||||
result = checkResult{catOptionalFeatures, c.name, statusOK, fmt.Sprintf("Installed (%d formats)", len(found)), details, url}
|
||||
}
|
||||
results = append(results, result)
|
||||
}
|
||||
|
||||
return results
|
||||
}
|
||||
|
||||
func findQtPluginDir() string {
|
||||
@@ -773,7 +806,7 @@ func checkOptionalDependencies() []checkResult {
|
||||
results = append(results, checkResult{catOptionalFeatures, "cups-pk-helper", cupsPkStatus, cupsPkMsg, "Printer management", optionalFeaturesURL})
|
||||
|
||||
results = append(results, checkI2CAvailability())
|
||||
results = append(results, checkKImageFormats())
|
||||
results = append(results, checkImageFormatPlugins()...)
|
||||
|
||||
terminals := []string{"ghostty", "kitty", "alacritty", "foot", "wezterm"}
|
||||
if idx := slices.IndexFunc(terminals, utils.CommandExists); idx >= 0 {
|
||||
|
||||
@@ -111,6 +111,7 @@ windowrule = float on, match:class ^(zoom)$
|
||||
# windowrule = float on, match:class ^(org.quickshell)$
|
||||
|
||||
layerrule = no_anim on, match:namespace ^(quickshell)$
|
||||
layerrule = no_anim on, match:namespace ^dms:.*
|
||||
|
||||
source = ./dms/colors.conf
|
||||
source = ./dms/outputs.conf
|
||||
|
||||
@@ -81,6 +81,12 @@ function calculateNextIndex(flatModel, selectedFlatIndex, sectionId, viewMode, g
|
||||
return bounds.start + newPosInSection;
|
||||
}
|
||||
|
||||
var currentRow = Math.floor(posInSection / cols);
|
||||
var lastRow = Math.floor((bounds.count - 1) / cols);
|
||||
if (currentRow < lastRow) {
|
||||
return bounds.start + bounds.count - 1;
|
||||
}
|
||||
|
||||
var nextSection = findNextNonHeaderIndex(flatModel, bounds.end + 1);
|
||||
return nextSection !== -1 ? nextSection : selectedFlatIndex;
|
||||
}
|
||||
|
||||
@@ -130,24 +130,17 @@ Item {
|
||||
if (!entry || entry.isHeader)
|
||||
return;
|
||||
var rowIndex = _flatIndexToRowMap[index];
|
||||
if (rowIndex === undefined || rowIndex >= _cumulativeHeights.length)
|
||||
return;
|
||||
var row = _visualRows[rowIndex];
|
||||
if (!row)
|
||||
if (rowIndex === undefined)
|
||||
return;
|
||||
|
||||
var rowY = _cumulativeHeights[rowIndex];
|
||||
var rowHeight = row.height;
|
||||
var scrollY = mainListView.contentY - mainListView.originY;
|
||||
var viewHeight = mainListView.height;
|
||||
var headerH = stickyHeader.height;
|
||||
mainListView.positionViewAtIndex(rowIndex, ListView.Contain);
|
||||
|
||||
if (rowY < scrollY + headerH) {
|
||||
mainListView.contentY = Math.max(mainListView.originY, rowY - headerH + mainListView.originY);
|
||||
return;
|
||||
}
|
||||
if (rowY + rowHeight > scrollY + viewHeight) {
|
||||
mainListView.contentY = rowY + rowHeight - viewHeight + mainListView.originY;
|
||||
if (stickyHeader.visible && rowIndex < _cumulativeHeights.length) {
|
||||
var rowY = _cumulativeHeights[rowIndex];
|
||||
var scrollY = mainListView.contentY - mainListView.originY;
|
||||
if (rowY < scrollY + stickyHeader.height) {
|
||||
mainListView.contentY = Math.max(mainListView.originY, rowY - stickyHeader.height + mainListView.originY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -945,22 +945,31 @@ Column {
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
Qt.callLater(() => {
|
||||
const pluginComponent = PluginService.pluginWidgetComponents[pluginId];
|
||||
if (pluginComponent) {
|
||||
const instance = pluginComponent.createObject(null, {
|
||||
"pluginId": pluginId,
|
||||
"pluginService": PluginService,
|
||||
"visible": false,
|
||||
"width": 0,
|
||||
"height": 0
|
||||
});
|
||||
if (instance) {
|
||||
pluginInstance = instance;
|
||||
}
|
||||
function tryCreatePluginInstance() {
|
||||
const pluginComponent = PluginService.pluginWidgetComponents[pluginId];
|
||||
if (!pluginComponent)
|
||||
return false;
|
||||
try {
|
||||
const instance = pluginComponent.createObject(null, {
|
||||
"pluginId": pluginId,
|
||||
"pluginService": PluginService,
|
||||
"visible": false,
|
||||
"width": 0,
|
||||
"height": 0
|
||||
});
|
||||
if (instance) {
|
||||
pluginInstance = instance;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn("DragDropGrid: stale plugin component for", pluginId, "- reloading");
|
||||
PluginService.reloadPlugin(pluginId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
Qt.callLater(() => tryCreatePluginInstance());
|
||||
}
|
||||
|
||||
Connections {
|
||||
@@ -970,6 +979,11 @@ Column {
|
||||
pluginInstance.loadPluginData();
|
||||
}
|
||||
}
|
||||
function onPluginLoaded(loadedPluginId) {
|
||||
if (loadedPluginId !== pluginId || pluginInstance)
|
||||
return;
|
||||
Qt.callLater(() => tryCreatePluginInstance());
|
||||
}
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
|
||||
@@ -13,8 +13,8 @@ Row {
|
||||
property Item popoutContent: null
|
||||
|
||||
signal addWidget(string widgetId)
|
||||
signal resetToDefault()
|
||||
signal clearAll()
|
||||
signal resetToDefault
|
||||
signal clearAll
|
||||
|
||||
height: 48
|
||||
spacing: Theme.spacingS
|
||||
@@ -28,7 +28,7 @@ Row {
|
||||
y: parent ? Math.round((parent.height - height) / 2) : 0
|
||||
width: 400
|
||||
height: 300
|
||||
modal: true
|
||||
modal: false
|
||||
focus: true
|
||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||
|
||||
@@ -133,7 +133,7 @@ Row {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
root.addWidget(modelData.id)
|
||||
root.addWidget(modelData.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ DankPopout {
|
||||
id: root
|
||||
|
||||
layerNamespace: "dms:control-center"
|
||||
fullHeightSurface: true
|
||||
|
||||
property string expandedSection: ""
|
||||
property var triggerScreen: null
|
||||
|
||||
@@ -216,14 +216,18 @@ QtObject {
|
||||
}
|
||||
|
||||
const pluginComponent = PluginService.pluginWidgetComponents[plugin.id];
|
||||
if (!pluginComponent || typeof pluginComponent.createObject !== 'function') {
|
||||
if (!pluginComponent)
|
||||
continue;
|
||||
}
|
||||
|
||||
const tempInstance = pluginComponent.createObject(null);
|
||||
if (!tempInstance) {
|
||||
let tempInstance;
|
||||
try {
|
||||
tempInstance = pluginComponent.createObject(null);
|
||||
} catch (e) {
|
||||
PluginService.reloadPlugin(plugin.id);
|
||||
continue;
|
||||
}
|
||||
if (!tempInstance)
|
||||
continue;
|
||||
|
||||
const hasCCWidget = tempInstance.ccWidgetIcon && tempInstance.ccWidgetIcon.length > 0;
|
||||
tempInstance.destroy();
|
||||
|
||||
@@ -10,6 +10,45 @@ BasePill {
|
||||
property bool isActive: false
|
||||
readonly property bool hasUpdates: SystemUpdateService.updateCount > 0
|
||||
readonly property bool isChecking: SystemUpdateService.isChecking
|
||||
readonly property bool shouldHide: SettingsData.updaterHideWidget && !hasUpdates && !isChecking && !SystemUpdateService.hasError
|
||||
|
||||
opacity: shouldHide ? 0 : 1
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hidden_horizontal"
|
||||
when: root.shouldHide && !isVerticalOrientation
|
||||
PropertyChanges {
|
||||
target: root
|
||||
width: 0
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "hidden_vertical"
|
||||
when: root.shouldHide && isVerticalOrientation
|
||||
PropertyChanges {
|
||||
target: root
|
||||
height: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
NumberAnimation {
|
||||
properties: "width,height"
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
|
||||
Ref {
|
||||
service: SystemUpdateService
|
||||
|
||||
@@ -924,8 +924,13 @@ Item {
|
||||
return loadedIsUrgent;
|
||||
return false;
|
||||
}
|
||||
property var loadedIconData: null
|
||||
property bool loadedHasIcon: false
|
||||
readonly property var loadedIconData: {
|
||||
if (isPlaceholder) return null;
|
||||
const name = modelData?.name;
|
||||
if (!name) return null;
|
||||
return SettingsData.getWorkspaceNameIcon(name);
|
||||
}
|
||||
readonly property bool loadedHasIcon: loadedIconData !== null
|
||||
property var loadedIcons: []
|
||||
|
||||
readonly property int stableIconCount: {
|
||||
@@ -986,8 +991,8 @@ Item {
|
||||
readonly property real baseHeight: root.isVertical ? (isActive ? root.widgetHeight * 1.05 : root.widgetHeight * 0.7) : (SettingsData.showWorkspaceApps ? Math.max(widgetHeight * 0.7, root.appIconSize + Theme.spacingXS * 2) : widgetHeight * 0.5)
|
||||
readonly property bool hasWorkspaceName: SettingsData.showWorkspaceName && modelData?.name && modelData.name !== ""
|
||||
readonly property bool workspaceNamesEnabled: SettingsData.showWorkspaceName && (CompositorService.isNiri || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle)
|
||||
readonly property real contentImplicitWidth: (hasWorkspaceName || loadedHasIcon) ? (appIconsLoader.item?.contentWidth ?? 0) : 0
|
||||
readonly property real contentImplicitHeight: (workspaceNamesEnabled || loadedHasIcon) ? (appIconsLoader.item?.contentHeight ?? 0) : 0
|
||||
readonly property real contentImplicitWidth: hasWorkspaceName ? (appIconsLoader.item?.contentWidth ?? 0) : 0
|
||||
readonly property real contentImplicitHeight: workspaceNamesEnabled ? (appIconsLoader.item?.contentHeight ?? 0) : 0
|
||||
|
||||
readonly property real iconsExtraWidth: {
|
||||
if (!root.isVertical && SettingsData.showWorkspaceApps && stableIconCount > 0) {
|
||||
@@ -1222,8 +1227,6 @@ Item {
|
||||
onTriggered: {
|
||||
if (isPlaceholder) {
|
||||
delegateRoot.loadedWorkspaceData = null;
|
||||
delegateRoot.loadedIconData = null;
|
||||
delegateRoot.loadedHasIcon = false;
|
||||
delegateRoot.loadedIcons = [];
|
||||
delegateRoot.loadedIsUrgent = false;
|
||||
return;
|
||||
@@ -1249,13 +1252,6 @@ Item {
|
||||
delegateRoot.loadedIsUrgent = wsData?.urgent ?? false;
|
||||
}
|
||||
|
||||
var icData = null;
|
||||
if (wsData?.name) {
|
||||
icData = SettingsData.getWorkspaceNameIcon(wsData.name);
|
||||
}
|
||||
delegateRoot.loadedIconData = icData;
|
||||
delegateRoot.loadedHasIcon = icData !== null;
|
||||
|
||||
if (SettingsData.showWorkspaceApps) {
|
||||
if (CompositorService.isDwl || CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
delegateRoot.loadedIcons = root.getWorkspaceIcons(modelData);
|
||||
@@ -1420,7 +1416,7 @@ Item {
|
||||
|
||||
Item {
|
||||
visible: loadedHasIcon && loadedIconData?.type === "icon"
|
||||
width: wsIcon.width + (isActive && loadedIcons.length > 0 ? 4 : 0)
|
||||
width: wsIcon.width
|
||||
height: root.appIconSize
|
||||
|
||||
DankIcon {
|
||||
@@ -1435,7 +1431,7 @@ Item {
|
||||
|
||||
Item {
|
||||
visible: loadedHasIcon && loadedIconData?.type === "text"
|
||||
width: wsText.implicitWidth + (isActive && loadedIcons.length > 0 ? 4 : 0)
|
||||
width: wsText.implicitWidth
|
||||
height: root.appIconSize
|
||||
|
||||
StyledText {
|
||||
@@ -1449,14 +1445,14 @@ Item {
|
||||
}
|
||||
|
||||
Item {
|
||||
visible: (SettingsData.showWorkspaceIndex || SettingsData.showWorkspaceName) && !loadedHasIcon
|
||||
width: wsIndexText.implicitWidth + (isActive && loadedIcons.length > 0 ? 4 : 0)
|
||||
visible: ((SettingsData.showWorkspaceIndex || SettingsData.showWorkspaceName) && !loadedHasIcon) || (loadedHasIcon && SettingsData.showWorkspaceName && hasWorkspaceName)
|
||||
width: wsIndexText.implicitWidth
|
||||
height: root.appIconSize
|
||||
|
||||
StyledText {
|
||||
id: wsIndexText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: root.getWorkspaceIndex(modelData, index)
|
||||
text: loadedHasIcon ? (modelData?.name ?? "") : root.getWorkspaceIndex(modelData, index)
|
||||
color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
||||
@@ -1574,9 +1570,9 @@ Item {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
visible: (SettingsData.showWorkspaceIndex || SettingsData.showWorkspaceName) && !loadedHasIcon
|
||||
visible: ((SettingsData.showWorkspaceIndex || SettingsData.showWorkspaceName) && !loadedHasIcon) || (loadedHasIcon && SettingsData.showWorkspaceName && hasWorkspaceName)
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: root.getWorkspaceIndex(modelData, index)
|
||||
text: loadedHasIcon ? (root.isVertical ? (modelData?.name ?? "").charAt(0) : (modelData?.name ?? "")) : root.getWorkspaceIndex(modelData, index)
|
||||
color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
||||
@@ -1670,55 +1666,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
// Loader for Custom Name Icon
|
||||
Loader {
|
||||
id: customIconLoader
|
||||
anchors.fill: parent
|
||||
active: !isPlaceholder && loadedHasIcon && loadedIconData.type === "icon" && !SettingsData.showWorkspaceApps
|
||||
sourceComponent: Item {
|
||||
DankIcon {
|
||||
anchors.centerIn: parent
|
||||
name: loadedIconData ? loadedIconData.value : "" // NULL CHECK
|
||||
size: Theme.fontSizeSmall
|
||||
color: isActive ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : Theme.surfaceTextMedium
|
||||
weight: isActive && !isPlaceholder ? 500 : 400
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Loader for Custom Name Text
|
||||
Loader {
|
||||
id: customTextLoader
|
||||
anchors.fill: parent
|
||||
active: !isPlaceholder && loadedHasIcon && loadedIconData.type === "text" && !SettingsData.showWorkspaceApps
|
||||
sourceComponent: Item {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: loadedIconData ? loadedIconData.value : "" // NULL CHECK
|
||||
color: isActive ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : Theme.surfaceTextMedium
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Loader for Workspace Index
|
||||
Loader {
|
||||
id: indexLoader
|
||||
anchors.fill: parent
|
||||
active: (SettingsData.showWorkspaceIndex || SettingsData.showWorkspaceName) && !loadedHasIcon && !SettingsData.showWorkspaceApps
|
||||
sourceComponent: Item {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: {
|
||||
return root.getWorkspaceIndex(modelData, index);
|
||||
}
|
||||
color: (isActive || isUrgent) ? Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) : isPlaceholder ? Theme.surfaceTextAlpha : Theme.surfaceTextMedium
|
||||
font.pixelSize: Theme.barTextSize(barThickness, barConfig?.fontScale)
|
||||
font.weight: (isActive && !isPlaceholder) ? Font.DemiBold : Font.Normal
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: updateAllData()
|
||||
|
||||
@@ -7,6 +7,7 @@ DankPopout {
|
||||
id: root
|
||||
|
||||
layerNamespace: "dms:notification-center-popout"
|
||||
fullHeightSurface: true
|
||||
|
||||
property bool notificationHistoryVisible: false
|
||||
property var triggerScreen: null
|
||||
|
||||
@@ -1 +1 @@
|
||||
v1.4.0
|
||||
v1.4.1
|
||||
|
||||
@@ -30,7 +30,10 @@ Item {
|
||||
property var customKeyboardFocus: null
|
||||
property bool backgroundInteractive: true
|
||||
property bool contentHandlesKeys: false
|
||||
property bool fullHeightSurface: false
|
||||
property bool _resizeActive: false
|
||||
property real _surfaceMarginLeft: 0
|
||||
property real _surfaceW: 0
|
||||
|
||||
property real storedBarThickness: Theme.barHeight - 4
|
||||
property real storedBarSpacing: 4
|
||||
@@ -125,6 +128,10 @@ Item {
|
||||
_lastOpenedScreen = screen;
|
||||
|
||||
shouldBeVisible = true;
|
||||
if (useBackgroundWindow) {
|
||||
_surfaceMarginLeft = alignedX - shadowBuffer;
|
||||
_surfaceW = alignedWidth + shadowBuffer * 2;
|
||||
}
|
||||
Qt.callLater(() => {
|
||||
if (shouldBeVisible && screen) {
|
||||
if (useBackgroundWindow)
|
||||
@@ -360,20 +367,38 @@ Item {
|
||||
return WlrKeyboardFocus.Exclusive;
|
||||
}
|
||||
|
||||
readonly property bool _fullHeight: useBackgroundWindow && root.fullHeightSurface
|
||||
|
||||
anchors {
|
||||
left: true
|
||||
top: true
|
||||
right: !useBackgroundWindow
|
||||
bottom: !useBackgroundWindow
|
||||
bottom: _fullHeight || !useBackgroundWindow
|
||||
}
|
||||
|
||||
WlrLayershell.margins {
|
||||
left: useBackgroundWindow ? (root.alignedX - shadowBuffer) : 0
|
||||
top: useBackgroundWindow ? (root.alignedY - shadowBuffer) : 0
|
||||
left: useBackgroundWindow ? root._surfaceMarginLeft : 0
|
||||
top: (useBackgroundWindow && !_fullHeight) ? (root.alignedY - shadowBuffer) : 0
|
||||
}
|
||||
|
||||
implicitWidth: useBackgroundWindow ? (root.alignedWidth + (shadowBuffer * 2)) : 0
|
||||
implicitHeight: useBackgroundWindow ? (root.alignedHeight + (shadowBuffer * 2)) : 0
|
||||
implicitWidth: useBackgroundWindow ? root._surfaceW : 0
|
||||
implicitHeight: (useBackgroundWindow && !_fullHeight) ? (root.alignedHeight + shadowBuffer * 2) : 0
|
||||
|
||||
mask: (useBackgroundWindow && _fullHeight) ? contentInputMask : null
|
||||
|
||||
Region {
|
||||
id: contentInputMask
|
||||
item: contentMaskRect
|
||||
}
|
||||
|
||||
Item {
|
||||
id: contentMaskRect
|
||||
visible: false
|
||||
x: contentContainer.x - root.shadowBuffer
|
||||
y: contentContainer.y - root.shadowBuffer
|
||||
width: root.alignedWidth + root.shadowBuffer * 2
|
||||
height: root.alignedHeight + root.shadowBuffer * 2
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
@@ -393,7 +418,7 @@ Item {
|
||||
Item {
|
||||
id: contentContainer
|
||||
x: useBackgroundWindow ? shadowBuffer : root.alignedX
|
||||
y: useBackgroundWindow ? shadowBuffer : root.alignedY
|
||||
y: (useBackgroundWindow && !contentWindow._fullHeight) ? shadowBuffer : root.alignedY
|
||||
width: root.alignedWidth
|
||||
height: root.alignedHeight
|
||||
|
||||
|
||||
Reference in New Issue
Block a user