1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-26 06:22:50 -05:00

feat: Add Notepad search function

This commit is contained in:
purian23
2025-10-04 02:25:42 -04:00
parent d213045168
commit 5ada12f989
3 changed files with 308 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ Item {
property bool fontsEnumerated: false
signal settingsRequested()
signal findRequested()
function enumerateFonts() {
var fonts = ["Default"]
@@ -155,6 +156,51 @@ Item {
}
}
Rectangle {
width: parent.width
height: 48
color: findMouseArea.containsMouse ? Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.05) : "transparent"
MouseArea {
id: findMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.findRequested()
}
Row {
anchors.left: parent.left
anchors.leftMargin: -Theme.spacingM
anchors.verticalCenter: parent.verticalCenter
spacing: Theme.spacingM
DankActionButton {
iconName: "search"
iconSize: Theme.iconSize - 2
iconColor: Theme.primary
onClicked: root.findRequested()
}
Column {
anchors.verticalCenter: parent.verticalCenter
spacing: Theme.spacingXS
StyledText {
text: "Find in Text"
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
}
StyledText {
text: "Open search bar to find text"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceTextMedium
}
}
}
}
Rectangle {
width: parent.width
height: visible ? (fontDropdown.height + Theme.spacingS) : 0