mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-13 00:42:49 -05:00
launcher: re-create grid on open
This commit is contained in:
@@ -61,7 +61,6 @@ PanelWindow {
|
||||
}
|
||||
|
||||
function close() {
|
||||
console.log("DankModal.close() called on:", layerNamespace, "Stack trace:", new Error().stack)
|
||||
shouldBeVisible = false
|
||||
shouldHaveFocus = false
|
||||
closeTimer.restart()
|
||||
|
||||
@@ -139,7 +139,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: UserInfoService.hostname || "Linux"
|
||||
text: DgopService.hostname || "DMS"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceVariantText
|
||||
elide: Text.ElideRight
|
||||
|
||||
@@ -12,7 +12,9 @@ Rectangle {
|
||||
|
||||
function resetScroll() {
|
||||
resultsList.contentY = 0
|
||||
resultsGrid.contentY = 0
|
||||
if (gridLoader.item) {
|
||||
gridLoader.item.contentY = 0
|
||||
}
|
||||
}
|
||||
|
||||
radius: Theme.cornerRadius
|
||||
@@ -92,6 +94,25 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: gridLoader
|
||||
|
||||
property real _lastWidth: 0
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Theme.spacingS
|
||||
visible: appLauncher && appLauncher.viewMode === "grid"
|
||||
active: appLauncher && appLauncher.viewMode === "grid"
|
||||
onWidthChanged: {
|
||||
if (visible && Math.abs(width - _lastWidth) > 1) {
|
||||
_lastWidth = width
|
||||
active = false
|
||||
Qt.callLater(() => {
|
||||
active = true
|
||||
})
|
||||
}
|
||||
}
|
||||
sourceComponent: Component {
|
||||
DankGridView {
|
||||
id: resultsGrid
|
||||
|
||||
@@ -127,9 +148,6 @@ Rectangle {
|
||||
contentY = itemBottom - height
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Theme.spacingS
|
||||
visible: appLauncher && appLauncher.viewMode === "grid"
|
||||
model: appLauncher ? appLauncher.model : null
|
||||
clip: true
|
||||
cellWidth: baseCellWidth
|
||||
@@ -177,3 +195,5 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -765,7 +765,7 @@
|
||||
"Enter password for ": "パスワードを入力"
|
||||
},
|
||||
"Enter this passkey on ": {
|
||||
"Enter this passkey on ": ""
|
||||
"Enter this passkey on ": "ここでパスキーを入力してください "
|
||||
},
|
||||
"Error": {
|
||||
"Error": "エラー"
|
||||
|
||||
@@ -765,7 +765,7 @@
|
||||
"Enter password for ": "输入密码"
|
||||
},
|
||||
"Enter this passkey on ": {
|
||||
"Enter this passkey on ": ""
|
||||
"Enter this passkey on ": "在该处输入此通行密钥 "
|
||||
},
|
||||
"Error": {
|
||||
"Error": "错误"
|
||||
|
||||
Reference in New Issue
Block a user