Libplasma

ButtonFocus.qml
1/*
2 * SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com>
3 * SPDX-License-Identifier: LGPL-2.0-or-later
4 */
5
6import QtQuick
7import org.kde.ksvg as KSvg
8import org.kde.kirigami as Kirigami
9
10KSvg.FrameSvgItem {
11 anchors {
12 fill: parent
13 leftMargin: -margins.left
14 topMargin: -margins.top
15 rightMargin: -margins.right
16 bottomMargin: -margins.bottom
17 }
18
19 property bool showFocus: false
20 property bool flat: false
21
22 imagePath: "widgets/button"
23 prefix: flat ? ["toolbutton-focus", "focus"] : "focus"
24
25 opacity: showFocus ? 1 : 0
26 Behavior on opacity {
27 enabled: Kirigami.Units.shortDuration > 0
28 OpacityAnimator { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutQuad }
29 }
30}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:34:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.