Warning, /plasma-bigscreen/youtube-voice-application/ui/TopBarTabButton.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *  Copyright 2018 by Aditya Mehra <aix.m@outlook.com>
0003  *  Copyright 2020 Marco Martin <mart@kde.org>
0004  *
0005  *  This program is free software: you can redistribute it and/or modify
0006  *  it under the terms of the GNU General Public License as published by
0007  *  the Free Software Foundation, either version 3 of the License, or
0008  *  (at your option) any later version.
0009 
0010  *  This program is distributed in the hope that it will be useful,
0011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  *  GNU General Public License for more details.
0014 
0015  *  You should have received a copy of the GNU General Public License
0016  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0017  */
0018 
0019 import QtQuick 2.9
0020 import QtQuick.Layouts 1.4
0021 import QtQuick.Controls 2.3 as Controls
0022 import org.kde.kirigami 2.8 as Kirigami
0023 
0024 Controls.Button {
0025     id: control
0026     Layout.fillHeight: true
0027     Layout.fillWidth: true
0028     property var source
0029     
0030     background: Rectangle {
0031         Kirigami.Theme.colorSet: Kirigami.Theme.Button
0032         color: control.activeFocus ? Kirigami.Theme.highlightColor : "transparent"
0033 
0034         Kirigami.Separator {
0035             anchors {
0036                 left: parent.left
0037                 right: parent.right
0038                 bottom: parent.bottom
0039             }
0040             color: Kirigami.Theme.highlightColor
0041             height: Kirigami.Units.smallSpacing
0042             visible: control.checked
0043         }
0044     }
0045     
0046     contentItem: Item {
0047         Image {
0048             id: contentHome
0049             width: Kirigami.Units.iconSizes.medium
0050             height: Kirigami.Units.iconSizes.medium
0051             anchors.centerIn: parent
0052             source: control.source
0053         }
0054     }
0055     
0056     Keys.onReturnPressed: {
0057         control.clicked()
0058     }
0059 }