1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

sizing changes

This commit is contained in:
bbedward
2025-07-22 23:35:48 -04:00
parent 54a7281fa3
commit 9c8c25711c
8 changed files with 56 additions and 70 deletions

View File

@@ -114,8 +114,8 @@ DankModal {
// DankModal configuration
visible: isVisible
width: 600
height: 500
width: 650
height: 550
keyboardFocus: "ondemand"
onVisibleChanged: {
@@ -132,8 +132,8 @@ DankModal {
content: Component {
Column {
anchors.fill: parent
anchors.margins: Theme.spacingL
spacing: Theme.spacingM
anchors.margins: Theme.spacingM
spacing: Theme.spacingS
// Header with search
Rectangle {
@@ -201,12 +201,10 @@ DankModal {
Connections {
target: clipboardHistory
function onShouldFocusSearchChanged() {
function onOpened() {
if (shouldFocusSearch) {
Qt.callLater(function() {
searchField.forceActiveFocus();
shouldFocusSearch = false;
});
searchField.forceActiveFocus()
shouldFocusSearch = false
}
}
}
@@ -315,7 +313,7 @@ DankModal {
id: clearConfirmDialog
visible: showClearConfirmation
width: 350
height: 180
height: 150
keyboardFocus: "ondemand"
onBackgroundClicked: {
@@ -328,8 +326,8 @@ DankModal {
Column {
anchors.centerIn: parent
width: parent.width - Theme.spacingL * 2
spacing: Theme.spacingL
width: parent.width - Theme.spacingM * 2
spacing: Theme.spacingM
Text {
text: "Clear All History?"

View File

@@ -36,16 +36,17 @@ DankModal {
}
visible: dialogVisible
width: 400
height: 250
keyboardFocus: "exclusive"
width: 380
height: 190
keyboardFocus: "ondemand"
onOpened: {
textInput.forceActiveFocus()
}
onVisibleChanged: {
if (visible) {
textInput.enabled = true;
Qt.callLater(function() {
textInput.forceActiveFocus();
});
} else {
textInput.enabled = false;
}
@@ -59,8 +60,8 @@ DankModal {
content: Component {
Column {
anchors.centerIn: parent
width: parent.width - Theme.spacingL * 2
spacing: Theme.spacingL
width: parent.width - Theme.spacingM * 2
spacing: Theme.spacingM
Text {
text: dialogTitle

View File

@@ -38,7 +38,7 @@ DankModal {
// DankModal configuration
visible: powerConfirmVisible
width: 350
height: 200
height: 160
keyboardFocus: "ondemand"
enableShadow: false
onBackgroundClicked: {
@@ -62,8 +62,8 @@ DankModal {
Column {
anchors.centerIn: parent
width: parent.width - Theme.spacingL * 2
spacing: Theme.spacingL
width: parent.width - Theme.spacingM * 2
spacing: Theme.spacingM
// Title
Text {
@@ -95,7 +95,7 @@ DankModal {
}
Item {
height: Theme.spacingL
height: Theme.spacingS
}
// Buttons

View File

@@ -21,8 +21,8 @@ DankModal {
// DankModal configuration
visible: settingsVisible
width: 700
height: 600
width: 650
height: 750
keyboardFocus: "ondemand"
enableShadow: true
@@ -33,8 +33,8 @@ DankModal {
content: Component {
Column {
anchors.fill: parent
anchors.margins: Theme.spacingL
spacing: Theme.spacingL
anchors.margins: Theme.spacingM
spacing: Theme.spacingS
// Header
Row {

View File

@@ -200,9 +200,9 @@ DankModal {
// DankModal configuration
visible: spotlightOpen
width: 600
height: 500
keyboardFocus: "exclusive"
width: 550
height: 600
keyboardFocus: "ondemand"
backgroundColor: Theme.popupBackground()
cornerRadius: Theme.cornerRadiusXLarge
borderColor: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08)
@@ -271,16 +271,6 @@ DankModal {
anchors.fill: parent
focus: true
Component.onCompleted: {
forceActiveFocus();
}
onVisibleChanged: {
if (visible) {
forceActiveFocus();
}
}
// Handle keyboard shortcuts
Keys.onPressed: function(event) {
if (event.key === Qt.Key_Escape) {
@@ -302,17 +292,16 @@ DankModal {
launchSelected();
event.accepted = true;
} else if (event.text && event.text.length > 0 && event.text.match(/[a-zA-Z0-9\\s]/)) {
// User started typing, focus search field and pass the character
searchField.forceActiveFocus();
searchField.text = event.text;
searchField.forceActiveFocus();
event.accepted = true;
}
}
Column {
anchors.fill: parent
anchors.margins: Theme.spacingXL
spacing: Theme.spacingL
anchors.margins: Theme.spacingM
spacing: Theme.spacingM
// Combined row for categories and view mode toggle
@@ -442,24 +431,15 @@ DankModal {
Connections {
target: spotlightLauncher
function onShouldFocusSearchChanged() {
function onOpened() {
if (shouldFocusSearch) {
Qt.callLater(function() {
searchField.forceActiveFocus();
searchField.selectAll();
shouldFocusSearch = false;
});
searchField.forceActiveFocus()
searchField.selectAll()
shouldFocusSearch = false
}
}
}
onActiveFocusChanged: {
if (!activeFocus && searchQuery.length === 0) {
// If search field loses focus and there's no search text, give focus back to main handler
parent.parent.forceActiveFocus();
}
}
Keys.onPressed: (event) => {
if (event.key === Qt.Key_Escape) {
hide();

View File

@@ -12,9 +12,13 @@ DankModal {
property string wifiPasswordInput: ""
visible: wifiPasswordDialogVisible
width: 450
height: 280
keyboardFocus: "exclusive"
width: 420
height: 230
keyboardFocus: "ondemand"
onOpened: {
passwordInput.forceActiveFocus()
}
onVisibleChanged: {
if (!visible) {
@@ -31,16 +35,11 @@ DankModal {
Item {
anchors.fill: parent
Component.onCompleted: {
Qt.callLater(function() {
passwordInput.forceActiveFocus();
});
}
Column {
anchors.centerIn: parent
width: parent.width - Theme.spacingL * 2
spacing: Theme.spacingL
width: parent.width - Theme.spacingM * 2
spacing: Theme.spacingM
// Header
Row {