Warning, /plasma-bigscreen/youtube-voice-application/ui/+mediacenter/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 import org.kde.plasma.core 2.0 as PlasmaCore
0024 
0025 Controls.Button {
0026     id: control
0027     Layout.fillHeight: true
0028     Layout.fillWidth: true
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: Kirigami.Heading {
0047         id: contentHome
0048         horizontalAlignment: Text.AlignHCenter
0049         verticalAlignment: Text.AlignVCenter
0050         maximumLineCount: 1
0051         text: control.text
0052         level: 1
0053     }
0054     
0055     Keys.onReturnPressed: {
0056         control.clicked()
0057     }
0058 }