Libplasma

TabBar.qml
1/*
2 SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7import QtQuick
8import QtQuick.Templates as T
9import org.kde.ksvg as KSvg
10//NOTE: importing PlasmaCore is necessary in order to make KSvg load the current Plasma Theme
11import org.kde.plasma.core as PlasmaCore
12import org.kde.kirigami as Kirigami
13
14T.TabBar {
15 id: control
16
17 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
18 contentWidth + leftPadding + rightPadding)
19 implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
20 contentHeight + topPadding + bottomPadding)
21
22 spacing: 0
23
24 contentItem: ListView {
25 implicitWidth: contentWidth
26 implicitHeight: contentHeight
27
28 model: control.contentModel
29 currentIndex: control.currentIndex
30
31 spacing: control.spacing
32 orientation: ListView.Horizontal
33 boundsBehavior: Flickable.StopAtBounds
34 flickableDirection: Flickable.AutoFlickIfNeeded
35 snapMode: ListView.SnapToItem
36
37 highlightMoveDuration: Kirigami.Units.longDuration
38 highlightRangeMode: ListView.ApplyRange
39 preferredHighlightBegin: 40
40 preferredHighlightEnd: width - 40
41 highlightResizeDuration: 0
42 highlight: KSvg.FrameSvgItem {
43 imagePath: "widgets/tabbar"
44 prefix: control.position == T.TabBar.Header ? "north-active-tab" : "south-active-tab"
45 }
46 }
47}
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.