1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-16 17:22:45 -04:00

text: change default rendering back to Qt

This commit is contained in:
bbedward
2026-05-15 09:45:10 -04:00
parent 0a892a4a9e
commit 1c1ab1c7d5
50 changed files with 520 additions and 496 deletions
@@ -13,7 +13,7 @@ Row {
property bool pathEditMode: false
property bool pathInputHasFocus: false
signal navigateUp()
signal navigateUp
signal navigateTo(string path)
signal pathInputFocusChanged(bool hasFocus)
@@ -80,9 +80,9 @@ Row {
anchors.fill: parent
cursorShape: Qt.IBeamCursor
onClicked: {
pathEditMode = true
pathInput.text = currentPath.replace("file://", "")
Qt.callLater(() => pathInput.forceActiveFocus())
pathEditMode = true;
pathInput.text = currentPath.replace("file://", "");
Qt.callLater(() => pathInput.forceActiveFocus());
}
}
}
@@ -94,22 +94,22 @@ Row {
topPadding: Theme.spacingXS
bottomPadding: Theme.spacingXS
onAccepted: {
const newPath = text.trim()
const newPath = text.trim();
if (newPath !== "") {
navigation.navigateTo(newPath)
navigation.navigateTo(newPath);
}
pathEditMode = false
pathEditMode = false;
}
Keys.onEscapePressed: {
pathEditMode = false
pathEditMode = false;
}
Keys.onDownPressed: {
pathEditMode = false
pathEditMode = false;
}
onActiveFocusChanged: {
navigation.pathInputFocusChanged(activeFocus)
navigation.pathInputFocusChanged(activeFocus);
if (!activeFocus && pathEditMode) {
pathEditMode = false
pathEditMode = false;
}
}
}
@@ -9,17 +9,17 @@ Item {
property string pendingFilePath: ""
signal confirmed(string filePath)
signal cancelled()
signal cancelled
visible: showDialog
focus: showDialog
Keys.onEscapePressed: {
cancelled()
cancelled();
}
Keys.onReturnPressed: {
confirmed(pendingFilePath)
confirmed(pendingFilePath);
}
Rectangle {
@@ -30,7 +30,7 @@ Item {
MouseArea {
anchors.fill: parent
onClicked: {
cancelled()
cancelled();
}
}
}
@@ -92,7 +92,7 @@ Item {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
cancelled()
cancelled();
}
}
}
@@ -117,7 +117,7 @@ Item {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
confirmed(pendingFilePath)
confirmed(pendingFilePath);
}
}
}
@@ -29,15 +29,15 @@ Row {
Component.onCompleted: {
if (saveMode)
Qt.callLater(() => {
forceActiveFocus()
})
forceActiveFocus();
});
}
onAccepted: {
if (text.trim() !== "") {
var basePath = currentPath.replace(/^file:\/\//, '')
var fullPath = basePath + "/" + text.trim()
fullPath = fullPath.replace(/\/+/g, '/')
saveRequested(fullPath)
var basePath = currentPath.replace(/^file:\/\//, '');
var fullPath = basePath + "/" + text.trim();
fullPath = fullPath.replace(/\/+/g, '/');
saveRequested(fullPath);
}
}
}
@@ -63,10 +63,10 @@ Row {
enabled: fileNameInput.text.trim() !== ""
onClicked: {
if (fileNameInput.text.trim() !== "") {
var basePath = currentPath.replace(/^file:\/\//, '')
var fullPath = basePath + "/" + fileNameInput.text.trim()
fullPath = fullPath.replace(/\/+/g, '/')
saveRequested(fullPath)
var basePath = currentPath.replace(/^file:\/\//, '');
var fullPath = basePath + "/" + fileNameInput.text.trim();
fullPath = fullPath.replace(/\/+/g, '/');
saveRequested(fullPath);
}
}
}
@@ -36,19 +36,24 @@ StyledRect {
}
Repeater {
model: [{
model: [
{
"name": "Name",
"value": "name"
}, {
},
{
"name": "Size",
"value": "size"
}, {
},
{
"name": "Modified",
"value": "modified"
}, {
},
{
"name": "Type",
"value": "type"
}]
}
]
StyledRect {
width: sortColumn?.width ?? 0
@@ -83,8 +88,8 @@ StyledRect {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
sortMenu.sortBySelected(modelData?.value ?? "name")
sortMenu.visible = false
sortMenu.sortBySelected(modelData?.value ?? "name");
sortMenu.visible = false;
}
}
}
@@ -136,8 +141,8 @@ StyledRect {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
sortMenu.sortOrderSelected(true)
sortMenu.visible = false
sortMenu.sortOrderSelected(true);
sortMenu.visible = false;
}
}
}
@@ -174,8 +179,8 @@ StyledRect {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
sortMenu.sortOrderSelected(false)
sortMenu.visible = false
sortMenu.sortOrderSelected(false);
sortMenu.visible = false;
}
}
}