Warning, /plasma/plasma-sdk/themeexplorer/package/contents/ui/fakecontrols/LineEdit.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2015 Marco Martin <mart@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 2.3 0008 import Qt5Compat.GraphicalEffects 0009 import org.kde.kirigami 2.20 as Kirigami 0010 0011 Item { 0012 implicitWidth: parent.width/1.2 0013 implicitHeight: Kirigami.Units.gridUnit * 1.6 0014 0015 Rectangle { 0016 id: view 0017 anchors.fill: parent 0018 radius: Kirigami.Units.smallSpacing/2 0019 color: viewBackgroundColor 0020 MouseArea { 0021 id: viewMouse 0022 anchors.fill: parent 0023 hoverEnabled: true 0024 onClicked: input.focus = true 0025 } 0026 TextInput { 0027 id: input 0028 anchors { 0029 left: parent.left 0030 right: parent.right 0031 verticalCenter: parent.verticalCenter 0032 margins: Kirigami.Units.smallSpacing 0033 } 0034 text: i18n("Text input…") 0035 color: viewTextColor 0036 } 0037 Rectangle { 0038 anchors.fill: parent 0039 radius: Kirigami.Units.smallSpacing/2 0040 visible: viewMouse.containsMouse || input.focus 0041 color: "transparent" 0042 border { 0043 color: viewMouse.containsMouse ? viewHoverColor : viewFocusColor 0044 } 0045 } 0046 } 0047 InnerShadow { 0048 anchors.fill: view 0049 horizontalOffset: 0 0050 verticalOffset: Kirigami.Units.smallSpacing/4 0051 radius: Kirigami.Units.smallSpacing 0052 samples: 16 0053 color: viewMouse.pressed ? Qt.rgba(0, 0, 0, 0) : Qt.rgba(0, 0, 0, 0.5) 0054 source: view 0055 } 0056 }