mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
Compare commits
3 Commits
80ce6aa19c
...
1f2e231386
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f2e231386 | ||
|
|
0e7f628c4a | ||
|
|
553f5257b3 |
@@ -15,5 +15,5 @@ Singleton {
|
|||||||
readonly property int viewportBuffer: 100
|
readonly property int viewportBuffer: 100
|
||||||
readonly property int extendedBuffer: 200
|
readonly property int extendedBuffer: 200
|
||||||
readonly property int keyboardHintsHeight: 80
|
readonly property int keyboardHintsHeight: 80
|
||||||
readonly property int headerHeight: 40
|
readonly property int headerHeight: 32
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ Item {
|
|||||||
|
|
||||||
Column {
|
Column {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Theme.spacingL
|
anchors.margins: Theme.spacingM
|
||||||
spacing: Theme.spacingL
|
spacing: Theme.spacingM
|
||||||
focus: false
|
focus: false
|
||||||
|
|
||||||
ClipboardHeader {
|
ClipboardHeader {
|
||||||
@@ -195,7 +195,7 @@ Item {
|
|||||||
Item {
|
Item {
|
||||||
id: keyboardHintsContainer
|
id: keyboardHintsContainer
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: modal.showKeyboardHints ? ClipboardConstants.keyboardHintsHeight + Theme.spacingL : 0
|
height: modal.showKeyboardHints ? ClipboardConstants.keyboardHintsHeight + Theme.spacingM : 0
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
@@ -210,7 +210,7 @@ Item {
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: Theme.spacingL
|
anchors.margins: Theme.spacingM
|
||||||
visible: modal.showKeyboardHints
|
visible: modal.showKeyboardHints
|
||||||
wtypeAvailable: modal.wtypeAvailable
|
wtypeAvailable: modal.wtypeAvailable
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ Item {
|
|||||||
|
|
||||||
property string searchQuery: ""
|
property string searchQuery: ""
|
||||||
property string searchMode: "all"
|
property string searchMode: "all"
|
||||||
|
property string previousSearchMode: "all"
|
||||||
|
property bool autoSwitchedToFiles: false
|
||||||
|
property bool isFileSearching: false
|
||||||
property var sections: []
|
property var sections: []
|
||||||
property var flatModel: []
|
property var flatModel: []
|
||||||
property int selectedFlatIndex: 0
|
property int selectedFlatIndex: 0
|
||||||
@@ -198,9 +201,15 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setMode(mode) {
|
function setMode(mode, isAutoSwitch) {
|
||||||
if (searchMode === mode)
|
if (searchMode === mode)
|
||||||
return;
|
return;
|
||||||
|
if (isAutoSwitch) {
|
||||||
|
previousSearchMode = searchMode;
|
||||||
|
autoSwitchedToFiles = true;
|
||||||
|
} else {
|
||||||
|
autoSwitchedToFiles = false;
|
||||||
|
}
|
||||||
searchMode = mode;
|
searchMode = mode;
|
||||||
modeChanged(mode);
|
modeChanged(mode);
|
||||||
performSearch();
|
performSearch();
|
||||||
@@ -209,6 +218,15 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function restorePreviousMode() {
|
||||||
|
if (!autoSwitchedToFiles)
|
||||||
|
return;
|
||||||
|
autoSwitchedToFiles = false;
|
||||||
|
searchMode = previousSearchMode;
|
||||||
|
modeChanged(previousSearchMode);
|
||||||
|
performSearch();
|
||||||
|
}
|
||||||
|
|
||||||
function cycleMode() {
|
function cycleMode() {
|
||||||
var modes = ["all", "apps", "files", "plugins"];
|
var modes = ["all", "apps", "files", "plugins"];
|
||||||
var currentIndex = modes.indexOf(searchMode);
|
var currentIndex = modes.indexOf(searchMode);
|
||||||
@@ -219,6 +237,9 @@ Item {
|
|||||||
function reset() {
|
function reset() {
|
||||||
searchQuery = "";
|
searchQuery = "";
|
||||||
searchMode = "all";
|
searchMode = "all";
|
||||||
|
previousSearchMode = "all";
|
||||||
|
autoSwitchedToFiles = false;
|
||||||
|
isFileSearching = false;
|
||||||
sections = [];
|
sections = [];
|
||||||
flatModel = [];
|
flatModel = [];
|
||||||
selectedFlatIndex = 0;
|
selectedFlatIndex = 0;
|
||||||
@@ -307,6 +328,8 @@ Item {
|
|||||||
clearActivePluginViewPreference();
|
clearActivePluginViewPreference();
|
||||||
|
|
||||||
if (searchMode === "files") {
|
if (searchMode === "files") {
|
||||||
|
var fileQuery = searchQuery.startsWith("/") ? searchQuery.substring(1).trim() : searchQuery.trim();
|
||||||
|
isFileSearching = fileQuery.length >= 2 && DSearchService.dsearchAvailable;
|
||||||
sections = [];
|
sections = [];
|
||||||
flatModel = [];
|
flatModel = [];
|
||||||
selectedFlatIndex = 0;
|
selectedFlatIndex = 0;
|
||||||
@@ -482,8 +505,12 @@ Item {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fileQuery.length < 2)
|
if (fileQuery.length < 2) {
|
||||||
|
isFileSearching = false;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
isFileSearching = true;
|
||||||
var params = {
|
var params = {
|
||||||
limit: 20,
|
limit: 20,
|
||||||
fuzzy: true,
|
fuzzy: true,
|
||||||
@@ -492,6 +519,7 @@ Item {
|
|||||||
};
|
};
|
||||||
|
|
||||||
DSearchService.search(fileQuery, params, function (response) {
|
DSearchService.search(fileQuery, params, function (response) {
|
||||||
|
isFileSearching = false;
|
||||||
if (response.error)
|
if (response.error)
|
||||||
return;
|
return;
|
||||||
var fileItems = [];
|
var fileItems = [];
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import qs.Widgets
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
visible: false
|
||||||
|
|
||||||
property bool spotlightOpen: false
|
property bool spotlightOpen: false
|
||||||
property bool keyboardActive: false
|
property bool keyboardActive: false
|
||||||
property bool contentVisible: false
|
property bool contentVisible: false
|
||||||
@@ -22,8 +24,8 @@ Item {
|
|||||||
readonly property real screenHeight: effectiveScreen?.height ?? 1080
|
readonly property real screenHeight: effectiveScreen?.height ?? 1080
|
||||||
readonly property real dpr: effectiveScreen ? CompositorService.getScreenScale(effectiveScreen) : 1
|
readonly property real dpr: effectiveScreen ? CompositorService.getScreenScale(effectiveScreen) : 1
|
||||||
|
|
||||||
readonly property int baseWidth: SettingsData.dankLauncherV2Size === "medium" ? 600 : SettingsData.dankLauncherV2Size === "large" ? 720 : 500
|
readonly property int baseWidth: SettingsData.dankLauncherV2Size === "medium" ? 720 : SettingsData.dankLauncherV2Size === "large" ? 860 : 620
|
||||||
readonly property int baseHeight: SettingsData.dankLauncherV2Size === "medium" ? 680 : SettingsData.dankLauncherV2Size === "large" ? 820 : 560
|
readonly property int baseHeight: SettingsData.dankLauncherV2Size === "medium" ? 720 : SettingsData.dankLauncherV2Size === "large" ? 860 : 600
|
||||||
readonly property int modalWidth: Math.min(baseWidth, screenWidth - 100)
|
readonly property int modalWidth: Math.min(baseWidth, screenWidth - 100)
|
||||||
readonly property int modalHeight: Math.min(baseHeight, screenHeight - 100)
|
readonly property int modalHeight: Math.min(baseHeight, screenHeight - 100)
|
||||||
readonly property real modalX: (screenWidth - modalWidth) / 2
|
readonly property real modalX: (screenWidth - modalWidth) / 2
|
||||||
@@ -165,6 +167,27 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: Quickshell
|
||||||
|
function onScreensChanged() {
|
||||||
|
if (!launcherWindow.screen)
|
||||||
|
return;
|
||||||
|
const currentScreenName = launcherWindow.screen.name;
|
||||||
|
let screenStillExists = false;
|
||||||
|
for (let i = 0; i < Quickshell.screens.length; i++) {
|
||||||
|
if (Quickshell.screens[i].name === currentScreenName) {
|
||||||
|
screenStillExists = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (screenStillExists)
|
||||||
|
return;
|
||||||
|
const newScreen = CompositorService.getFocusedScreen();
|
||||||
|
if (newScreen)
|
||||||
|
launcherWindow.screen = newScreen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: launcherWindow
|
id: launcherWindow
|
||||||
visible: true
|
visible: true
|
||||||
|
|||||||
@@ -134,8 +134,14 @@ FocusScope {
|
|||||||
root.parentModal.hide();
|
root.parentModal.hide();
|
||||||
return;
|
return;
|
||||||
case Qt.Key_Backspace:
|
case Qt.Key_Backspace:
|
||||||
if (searchField.text.length === 0 && controller.clearPluginFilter())
|
if (searchField.text.length === 0) {
|
||||||
return;
|
if (controller.clearPluginFilter())
|
||||||
|
return;
|
||||||
|
if (controller.autoSwitchedToFiles) {
|
||||||
|
controller.restorePreviousMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
event.accepted = false;
|
event.accepted = false;
|
||||||
return;
|
return;
|
||||||
case Qt.Key_Down:
|
case Qt.Key_Down:
|
||||||
@@ -247,7 +253,7 @@ FocusScope {
|
|||||||
return;
|
return;
|
||||||
case Qt.Key_Slash:
|
case Qt.Key_Slash:
|
||||||
if (event.modifiers === Qt.NoModifier && searchField.text.length === 0) {
|
if (event.modifiers === Qt.NoModifier && searchField.text.length === 0) {
|
||||||
controller.setMode("files");
|
controller.setMode("files", true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event.accepted = false;
|
event.accepted = false;
|
||||||
@@ -282,26 +288,22 @@ FocusScope {
|
|||||||
{
|
{
|
||||||
id: "all",
|
id: "all",
|
||||||
label: I18n.tr("All"),
|
label: I18n.tr("All"),
|
||||||
icon: "search",
|
icon: "search"
|
||||||
shortcut: "⌃1"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "apps",
|
id: "apps",
|
||||||
label: I18n.tr("Apps"),
|
label: I18n.tr("Apps"),
|
||||||
icon: "apps",
|
icon: "apps"
|
||||||
shortcut: "⌃2"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "files",
|
id: "files",
|
||||||
label: I18n.tr("Files"),
|
label: I18n.tr("Files"),
|
||||||
icon: "folder",
|
icon: "folder"
|
||||||
shortcut: "⌃3"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "plugins",
|
id: "plugins",
|
||||||
label: I18n.tr("Plugins"),
|
label: I18n.tr("Plugins"),
|
||||||
icon: "extension",
|
icon: "extension"
|
||||||
shortcut: "⌃4"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -309,7 +311,7 @@ FocusScope {
|
|||||||
required property var modelData
|
required property var modelData
|
||||||
required property int index
|
required property int index
|
||||||
|
|
||||||
width: modeButtonMetrics.width + Theme.spacingM * 2
|
width: modeButtonMetrics.width + 14 + Theme.spacingXS + Theme.spacingM * 2 + Theme.spacingS
|
||||||
height: footerBar.height - 4
|
height: footerBar.height - 4
|
||||||
radius: Theme.cornerRadius - 2
|
radius: Theme.cornerRadius - 2
|
||||||
color: controller.searchMode === modelData.id || modeArea.containsMouse ? Theme.primaryContainer : "transparent"
|
color: controller.searchMode === modelData.id || modeArea.containsMouse ? Theme.primaryContainer : "transparent"
|
||||||
@@ -317,7 +319,7 @@ FocusScope {
|
|||||||
TextMetrics {
|
TextMetrics {
|
||||||
id: modeButtonMetrics
|
id: modeButtonMetrics
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
text: modelData.label + " " + modelData.shortcut
|
text: modelData.label
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
@@ -335,12 +337,6 @@ FocusScope {
|
|||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: controller.searchMode === modelData.id ? Theme.primary : Theme.surfaceText
|
color: controller.searchMode === modelData.id ? Theme.primary : Theme.surfaceText
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
|
||||||
text: modelData.shortcut
|
|
||||||
font.pixelSize: Theme.fontSizeSmall - 2
|
|
||||||
color: Theme.surfaceVariantText
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -395,15 +391,13 @@ FocusScope {
|
|||||||
|
|
||||||
Row {
|
Row {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 56
|
|
||||||
spacing: Theme.spacingS
|
spacing: Theme.spacingS
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: pluginBadge
|
id: pluginBadge
|
||||||
visible: controller.activePluginName.length > 0
|
visible: controller.activePluginName.length > 0
|
||||||
width: visible ? pluginBadgeContent.implicitWidth + Theme.spacingM : 0
|
width: visible ? pluginBadgeContent.implicitWidth + Theme.spacingM : 0
|
||||||
height: 32
|
height: searchField.height
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
radius: 16
|
radius: 16
|
||||||
color: Theme.primary
|
color: Theme.primary
|
||||||
|
|
||||||
@@ -439,7 +433,6 @@ FocusScope {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: searchField
|
id: searchField
|
||||||
width: parent.width - (pluginBadge.visible ? pluginBadge.width + Theme.spacingS : 0)
|
width: parent.width - (pluginBadge.visible ? pluginBadge.width + Theme.spacingS : 0)
|
||||||
height: 56
|
|
||||||
cornerRadius: Theme.cornerRadius
|
cornerRadius: Theme.cornerRadius
|
||||||
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
||||||
normalBorderColor: Theme.outlineMedium
|
normalBorderColor: Theme.outlineMedium
|
||||||
@@ -459,6 +452,9 @@ FocusScope {
|
|||||||
|
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
controller.setSearchQuery(text);
|
controller.setSearchQuery(text);
|
||||||
|
if (text.length === 0) {
|
||||||
|
controller.restorePreviousMode();
|
||||||
|
}
|
||||||
if (actionPanel.expanded) {
|
if (actionPanel.expanded) {
|
||||||
actionPanel.hide();
|
actionPanel.hide();
|
||||||
}
|
}
|
||||||
@@ -484,7 +480,7 @@ FocusScope {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height - 56 - actionPanel.height - Theme.spacingM - Theme.spacingXS
|
height: parent.height - searchField.height - actionPanel.height - Theme.spacingXS * 2
|
||||||
opacity: root.parentModal?.isClosing ? 0 : 1
|
opacity: root.parentModal?.isClosing ? 0 : 1
|
||||||
|
|
||||||
ResultsList {
|
ResultsList {
|
||||||
@@ -635,7 +631,6 @@ FocusScope {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editNameField
|
id: editNameField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: editingApp?.name || ""
|
placeholderText: editingApp?.name || ""
|
||||||
keyNavigationTab: editIconField
|
keyNavigationTab: editIconField
|
||||||
keyNavigationBacktab: editExtraFlagsField
|
keyNavigationBacktab: editExtraFlagsField
|
||||||
@@ -656,7 +651,6 @@ FocusScope {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editIconField
|
id: editIconField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: editingApp?.icon || ""
|
placeholderText: editingApp?.icon || ""
|
||||||
keyNavigationTab: editCommentField
|
keyNavigationTab: editCommentField
|
||||||
keyNavigationBacktab: editNameField
|
keyNavigationBacktab: editNameField
|
||||||
@@ -677,7 +671,6 @@ FocusScope {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editCommentField
|
id: editCommentField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: editingApp?.comment || ""
|
placeholderText: editingApp?.comment || ""
|
||||||
keyNavigationTab: editEnvVarsField
|
keyNavigationTab: editEnvVarsField
|
||||||
keyNavigationBacktab: editIconField
|
keyNavigationBacktab: editIconField
|
||||||
@@ -704,7 +697,6 @@ FocusScope {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editEnvVarsField
|
id: editEnvVarsField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: "VAR=value"
|
placeholderText: "VAR=value"
|
||||||
keyNavigationTab: editExtraFlagsField
|
keyNavigationTab: editExtraFlagsField
|
||||||
keyNavigationBacktab: editCommentField
|
keyNavigationBacktab: editCommentField
|
||||||
@@ -725,7 +717,6 @@ FocusScope {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editExtraFlagsField
|
id: editExtraFlagsField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: "--flag --option=value"
|
placeholderText: "--flag --option=value"
|
||||||
keyNavigationTab: editNameField
|
keyNavigationTab: editNameField
|
||||||
keyNavigationBacktab: editEnvVarsField
|
keyNavigationBacktab: editEnvVarsField
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ Item {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
visible: !root.controller?.sections || root.controller.sections.length === 0
|
visible: (!root.controller?.sections || root.controller.sections.length === 0) && !root.controller?.isFileSearching
|
||||||
width: emptyColumn.implicitWidth
|
width: emptyColumn.implicitWidth
|
||||||
height: emptyColumn.implicitHeight
|
height: emptyColumn.implicitHeight
|
||||||
|
|
||||||
@@ -437,15 +437,16 @@ Item {
|
|||||||
|
|
||||||
function getEmptyIcon() {
|
function getEmptyIcon() {
|
||||||
var mode = root.controller?.searchMode ?? "all";
|
var mode = root.controller?.searchMode ?? "all";
|
||||||
if (mode === "files")
|
switch (mode) {
|
||||||
|
case "files":
|
||||||
return "folder_open";
|
return "folder_open";
|
||||||
if (mode === "plugins")
|
case "plugins":
|
||||||
return "extension";
|
return "extension";
|
||||||
if (mode === "apps")
|
case "apps":
|
||||||
return "apps";
|
return "apps";
|
||||||
if (root.controller?.searchQuery?.length > 0)
|
default:
|
||||||
return "search_off";
|
return root.controller?.searchQuery?.length > 0 ? "search_off" : "search";
|
||||||
return "search";
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -460,7 +461,8 @@ Item {
|
|||||||
var mode = root.controller?.searchMode ?? "all";
|
var mode = root.controller?.searchMode ?? "all";
|
||||||
var hasQuery = root.controller?.searchQuery?.length > 0;
|
var hasQuery = root.controller?.searchQuery?.length > 0;
|
||||||
|
|
||||||
if (mode === "files") {
|
switch (mode) {
|
||||||
|
case "files":
|
||||||
if (!DSearchService.dsearchAvailable)
|
if (!DSearchService.dsearchAvailable)
|
||||||
return I18n.tr("File search requires dsearch\nInstall from github.com/morelazers/dsearch");
|
return I18n.tr("File search requires dsearch\nInstall from github.com/morelazers/dsearch");
|
||||||
if (!hasQuery)
|
if (!hasQuery)
|
||||||
@@ -468,20 +470,13 @@ Item {
|
|||||||
if (root.controller.searchQuery.length < 2)
|
if (root.controller.searchQuery.length < 2)
|
||||||
return I18n.tr("Type at least 2 characters");
|
return I18n.tr("Type at least 2 characters");
|
||||||
return I18n.tr("No files found");
|
return I18n.tr("No files found");
|
||||||
|
case "plugins":
|
||||||
|
return hasQuery ? I18n.tr("No plugin results") : I18n.tr("Browse or search plugins");
|
||||||
|
case "apps":
|
||||||
|
return hasQuery ? I18n.tr("No apps found") : I18n.tr("Type to search apps");
|
||||||
|
default:
|
||||||
|
return hasQuery ? I18n.tr("No results found") : I18n.tr("Type to search");
|
||||||
}
|
}
|
||||||
if (mode === "plugins") {
|
|
||||||
if (!hasQuery)
|
|
||||||
return I18n.tr("Browse or search plugins");
|
|
||||||
return I18n.tr("No plugin results");
|
|
||||||
}
|
|
||||||
if (mode === "apps") {
|
|
||||||
if (!hasQuery)
|
|
||||||
return I18n.tr("Type to search apps");
|
|
||||||
return I18n.tr("No apps found");
|
|
||||||
}
|
|
||||||
if (hasQuery)
|
|
||||||
return I18n.tr("No results found");
|
|
||||||
return I18n.tr("Type to search");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Rectangle {
|
|||||||
Row {
|
Row {
|
||||||
id: leftContent
|
id: leftContent
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: Theme.spacingS
|
anchors.leftMargin: Theme.spacingXS
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: Theme.spacingS
|
spacing: Theme.spacingS
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ Rectangle {
|
|||||||
Row {
|
Row {
|
||||||
id: rightContent
|
id: rightContent
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: Theme.spacingS
|
anchors.rightMargin: Theme.spacingXS
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: Theme.spacingS
|
spacing: Theme.spacingS
|
||||||
|
|
||||||
|
|||||||
@@ -539,7 +539,7 @@ Rectangle {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: parent.width - parent.leftPadding - parent.rightPadding
|
width: parent.width - parent.leftPadding - parent.rightPadding
|
||||||
height: Theme.spacingS
|
height: Theme.spacingXS
|
||||||
}
|
}
|
||||||
|
|
||||||
DankTextField {
|
DankTextField {
|
||||||
@@ -717,7 +717,7 @@ Rectangle {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: parent.width - parent.leftPadding - parent.rightPadding
|
width: parent.width - parent.leftPadding - parent.rightPadding
|
||||||
height: Theme.spacingS
|
height: Theme.spacingXS
|
||||||
visible: !root.searchActive
|
visible: !root.searchActive
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -324,7 +324,6 @@ Item {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: buttonsContainer.left
|
anchors.right: buttonsContainer.left
|
||||||
anchors.rightMargin: Theme.spacingM
|
anchors.rightMargin: Theme.spacingM
|
||||||
height: 56
|
|
||||||
cornerRadius: Theme.cornerRadius
|
cornerRadius: Theme.cornerRadius
|
||||||
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
||||||
normalBorderColor: Theme.outlineMedium
|
normalBorderColor: Theme.outlineMedium
|
||||||
@@ -670,7 +669,6 @@ Item {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editNameField
|
id: editNameField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: editingApp?.name || ""
|
placeholderText: editingApp?.name || ""
|
||||||
keyNavigationTab: editIconField
|
keyNavigationTab: editIconField
|
||||||
keyNavigationBacktab: editExtraFlagsField
|
keyNavigationBacktab: editExtraFlagsField
|
||||||
@@ -691,7 +689,6 @@ Item {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editIconField
|
id: editIconField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: editingApp?.icon || ""
|
placeholderText: editingApp?.icon || ""
|
||||||
keyNavigationTab: editCommentField
|
keyNavigationTab: editCommentField
|
||||||
keyNavigationBacktab: editNameField
|
keyNavigationBacktab: editNameField
|
||||||
@@ -712,7 +709,6 @@ Item {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editCommentField
|
id: editCommentField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: editingApp?.comment || ""
|
placeholderText: editingApp?.comment || ""
|
||||||
keyNavigationTab: editEnvVarsField
|
keyNavigationTab: editEnvVarsField
|
||||||
keyNavigationBacktab: editIconField
|
keyNavigationBacktab: editIconField
|
||||||
@@ -739,7 +735,6 @@ Item {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editEnvVarsField
|
id: editEnvVarsField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: "VAR=value"
|
placeholderText: "VAR=value"
|
||||||
keyNavigationTab: editExtraFlagsField
|
keyNavigationTab: editExtraFlagsField
|
||||||
keyNavigationBacktab: editCommentField
|
keyNavigationBacktab: editCommentField
|
||||||
@@ -760,7 +755,6 @@ Item {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editExtraFlagsField
|
id: editExtraFlagsField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: "--flag --option=value"
|
placeholderText: "--flag --option=value"
|
||||||
keyNavigationTab: editNameField
|
keyNavigationTab: editNameField
|
||||||
keyNavigationBacktab: editEnvVarsField
|
keyNavigationBacktab: editEnvVarsField
|
||||||
|
|||||||
@@ -398,7 +398,6 @@ DankPopout {
|
|||||||
|
|
||||||
width: parent.width - Theme.spacingS * 2
|
width: parent.width - Theme.spacingS * 2
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
height: 52
|
|
||||||
cornerRadius: Theme.cornerRadius
|
cornerRadius: Theme.cornerRadius
|
||||||
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency)
|
||||||
normalBorderColor: Theme.outlineMedium
|
normalBorderColor: Theme.outlineMedium
|
||||||
@@ -531,7 +530,7 @@ DankPopout {
|
|||||||
x: searchField.x
|
x: searchField.x
|
||||||
height: {
|
height: {
|
||||||
let usedHeight = 40 + Theme.spacingS;
|
let usedHeight = 40 + Theme.spacingS;
|
||||||
usedHeight += 52 + Theme.spacingS;
|
usedHeight += searchField.height + Theme.spacingS;
|
||||||
usedHeight += appDrawerPopout.searchMode === "apps" ? 40 : 0;
|
usedHeight += appDrawerPopout.searchMode === "apps" ? 40 : 0;
|
||||||
return parent.height - usedHeight;
|
return parent.height - usedHeight;
|
||||||
}
|
}
|
||||||
@@ -839,7 +838,6 @@ DankPopout {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editNameField
|
id: editNameField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
focus: true
|
focus: true
|
||||||
placeholderText: appDrawerPopout.editingApp?.name || ""
|
placeholderText: appDrawerPopout.editingApp?.name || ""
|
||||||
keyNavigationTab: editIconField
|
keyNavigationTab: editIconField
|
||||||
@@ -861,7 +859,6 @@ DankPopout {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editIconField
|
id: editIconField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: appDrawerPopout.editingApp?.icon || ""
|
placeholderText: appDrawerPopout.editingApp?.icon || ""
|
||||||
keyNavigationTab: editCommentField
|
keyNavigationTab: editCommentField
|
||||||
keyNavigationBacktab: editNameField
|
keyNavigationBacktab: editNameField
|
||||||
@@ -882,7 +879,6 @@ DankPopout {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editCommentField
|
id: editCommentField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: appDrawerPopout.editingApp?.comment || ""
|
placeholderText: appDrawerPopout.editingApp?.comment || ""
|
||||||
keyNavigationTab: editEnvVarsField
|
keyNavigationTab: editEnvVarsField
|
||||||
keyNavigationBacktab: editIconField
|
keyNavigationBacktab: editIconField
|
||||||
@@ -909,7 +905,6 @@ DankPopout {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editEnvVarsField
|
id: editEnvVarsField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: "VAR=value"
|
placeholderText: "VAR=value"
|
||||||
keyNavigationTab: editExtraFlagsField
|
keyNavigationTab: editExtraFlagsField
|
||||||
keyNavigationBacktab: editCommentField
|
keyNavigationBacktab: editCommentField
|
||||||
@@ -930,7 +925,6 @@ DankPopout {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: editExtraFlagsField
|
id: editExtraFlagsField
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 44
|
|
||||||
placeholderText: "--flag --option=value"
|
placeholderText: "--flag --option=value"
|
||||||
keyNavigationTab: editNameField
|
keyNavigationTab: editNameField
|
||||||
keyNavigationBacktab: editEnvVarsField
|
keyNavigationBacktab: editEnvVarsField
|
||||||
|
|||||||
@@ -236,7 +236,6 @@ Item {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: searchField
|
id: searchField
|
||||||
width: parent.width - addButton.width - Theme.spacingM
|
width: parent.width - addButton.width - Theme.spacingM
|
||||||
height: Math.round(Theme.fontSizeMedium * 3)
|
|
||||||
placeholderText: I18n.tr("Search keybinds...")
|
placeholderText: I18n.tr("Search keybinds...")
|
||||||
leftIconName: "search"
|
leftIconName: "search"
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
|
|||||||
@@ -554,7 +554,6 @@ Item {
|
|||||||
|
|
||||||
DankTextField {
|
DankTextField {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 48
|
|
||||||
placeholderText: modelData.placeholder
|
placeholderText: modelData.placeholder
|
||||||
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHighest, Theme.popupTransparency)
|
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHighest, Theme.popupTransparency)
|
||||||
normalBorderColor: Theme.outlineMedium
|
normalBorderColor: Theme.outlineMedium
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ Item {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: updaterCustomCommand
|
id: updaterCustomCommand
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 48
|
|
||||||
placeholderText: "myPkgMngr --sysupdate"
|
placeholderText: "myPkgMngr --sysupdate"
|
||||||
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHighest, Theme.popupTransparency)
|
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHighest, Theme.popupTransparency)
|
||||||
normalBorderColor: Theme.outlineMedium
|
normalBorderColor: Theme.outlineMedium
|
||||||
@@ -114,7 +113,6 @@ Item {
|
|||||||
DankTextField {
|
DankTextField {
|
||||||
id: updaterTerminalCustomClass
|
id: updaterTerminalCustomClass
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 48
|
|
||||||
placeholderText: "-T udpClass"
|
placeholderText: "-T udpClass"
|
||||||
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHighest, Theme.popupTransparency)
|
backgroundColor: Theme.withAlpha(Theme.surfaceContainerHighest, Theme.popupTransparency)
|
||||||
normalBorderColor: Theme.outlineMedium
|
normalBorderColor: Theme.outlineMedium
|
||||||
|
|||||||
@@ -35,15 +35,15 @@ StyledRect {
|
|||||||
property real cornerRadius: Theme.cornerRadius
|
property real cornerRadius: Theme.cornerRadius
|
||||||
readonly property real leftPadding: Theme.spacingM + (leftIconName ? leftIconSize + Theme.spacingM : 0)
|
readonly property real leftPadding: Theme.spacingM + (leftIconName ? leftIconSize + Theme.spacingM : 0)
|
||||||
readonly property real rightPadding: {
|
readonly property real rightPadding: {
|
||||||
let p = Theme.spacingM;
|
let p = Theme.spacingS;
|
||||||
if (showPasswordToggle)
|
if (showPasswordToggle)
|
||||||
p += 24 + Theme.spacingS;
|
p += 20 + Theme.spacingXS;
|
||||||
if (showClearButton && text.length > 0)
|
if (showClearButton && text.length > 0)
|
||||||
p += 24 + Theme.spacingS;
|
p += 20 + Theme.spacingXS;
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
property real topPadding: Theme.spacingM
|
property real topPadding: Theme.spacingS
|
||||||
property real bottomPadding: Theme.spacingM
|
property real bottomPadding: Theme.spacingS
|
||||||
property bool ignoreLeftRightKeys: false
|
property bool ignoreLeftRightKeys: false
|
||||||
property bool ignoreUpDownKeys: false
|
property bool ignoreUpDownKeys: false
|
||||||
property bool ignoreTabKeys: false
|
property bool ignoreTabKeys: false
|
||||||
@@ -76,7 +76,7 @@ StyledRect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
width: 200
|
width: 200
|
||||||
height: Math.round(Theme.fontSizeMedium * 3.4)
|
height: Math.round(Theme.fontSizeMedium * 3)
|
||||||
radius: cornerRadius
|
radius: cornerRadius
|
||||||
color: backgroundColor
|
color: backgroundColor
|
||||||
border.color: textInput.activeFocus ? focusedBorderColor : normalBorderColor
|
border.color: textInput.activeFocus ? focusedBorderColor : normalBorderColor
|
||||||
@@ -164,7 +164,7 @@ StyledRect {
|
|||||||
id: rightButtonsRow
|
id: rightButtonsRow
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: Theme.spacingM
|
anchors.rightMargin: Theme.spacingS
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: Theme.spacingXS
|
spacing: Theme.spacingXS
|
||||||
visible: showPasswordToggle || (showClearButton && text.length > 0)
|
visible: showPasswordToggle || (showClearButton && text.length > 0)
|
||||||
@@ -172,16 +172,16 @@ StyledRect {
|
|||||||
StyledRect {
|
StyledRect {
|
||||||
id: passwordToggleButton
|
id: passwordToggleButton
|
||||||
|
|
||||||
width: 24
|
width: 20
|
||||||
height: 24
|
height: 20
|
||||||
radius: 12
|
radius: 10
|
||||||
color: passwordToggleArea.containsMouse ? Theme.outlineStrong : "transparent"
|
color: passwordToggleArea.containsMouse ? Theme.outlineStrong : "transparent"
|
||||||
visible: showPasswordToggle
|
visible: showPasswordToggle
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
name: passwordVisible ? "visibility_off" : "visibility"
|
name: passwordVisible ? "visibility_off" : "visibility"
|
||||||
size: 16
|
size: 14
|
||||||
color: passwordToggleArea.containsMouse ? Theme.outline : Theme.surfaceVariantText
|
color: passwordToggleArea.containsMouse ? Theme.outline : Theme.surfaceVariantText
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,16 +198,16 @@ StyledRect {
|
|||||||
StyledRect {
|
StyledRect {
|
||||||
id: clearButton
|
id: clearButton
|
||||||
|
|
||||||
width: 24
|
width: 20
|
||||||
height: 24
|
height: 20
|
||||||
radius: 12
|
radius: 10
|
||||||
color: clearArea.containsMouse ? Theme.outlineStrong : "transparent"
|
color: clearArea.containsMouse ? Theme.outlineStrong : "transparent"
|
||||||
visible: showClearButton && text.length > 0
|
visible: showClearButton && text.length > 0
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
name: "close"
|
name: "close"
|
||||||
size: 16
|
size: 14
|
||||||
color: clearArea.containsMouse ? Theme.outline : Theme.surfaceVariantText
|
color: clearArea.containsMouse ? Theme.outline : Theme.surfaceVariantText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user