new look for the search applet

This commit is contained in:
Marco Martin 2020-07-23 15:26:26 +02:00
parent dd315d81e0
commit e18f7b4560
2 changed files with 30 additions and 6 deletions

View file

@ -25,22 +25,46 @@ import QtQuick.Layouts 1.1
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.milou 0.1 as Milou import org.kde.milou 0.1 as Milou
import org.kde.kirigami 2.10 as Kirigami import org.kde.kirigami 2.14 as Kirigami
Item { Item {
PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.NormalColorGroup PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.NormalColorGroup
Plasmoid.backgroundHints: PlasmaCore.Types.ShadowBackground | PlasmaCore.Types.ConfigurableBackground Plasmoid.backgroundHints: PlasmaCore.Types.ShadowBackground | PlasmaCore.Types.ConfigurableBackground
Layout.minimumWidth: Math.min(plasmoid.availableScreenRect.width, plasmoid.availableScreenRect.height) - Kirigami.Units.gridUnit * 2 Layout.minimumWidth: Math.min(plasmoid.availableScreenRect.width, plasmoid.availableScreenRect.height) - Kirigami.Units.gridUnit * 2
PlasmaComponents.TextField { Rectangle {
id: bigClock id: background
anchors { anchors {
fill: parent left: parent.left
right: parent.right
verticalCenter: parent.verticalCenter
margins: units.gridUnit margins: units.gridUnit
} }
radius: height/2
height: layout.implicitHeight + radius
color: Qt.rgba(1,1,1, 0.3)
RowLayout {
id: layout
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
margins: background.radius/2
}
Kirigami.Icon {
source: "search"
Layout.fillHeight: true
Layout.preferredWidth: height
color: "white"
}
PlasmaExtras.Heading {
level: 2
text: i18n("Search...") text: i18n("Search...")
}
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: window.showMaximized() onClicked: window.showMaximized()

View file

@ -56,7 +56,7 @@ Comment[x-test]=xxSearch and run Applications and servicesxx
Comment[zh_CN]= Comment[zh_CN]=
Comment[zh_TW]= Comment[zh_TW]=
Icon=preferences-system-time Icon=search
Type=Service Type=Service
X-KDE-ParentApp= X-KDE-ParentApp=
X-KDE-PluginInfo-Author=Marco Martin X-KDE-PluginInfo-Author=Marco Martin