Warning, /frameworks/kirigami/src/controls/private/globaltoolbar/PageRowGlobalToolBarStyleGroup.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 * SPDX-FileCopyrightText: 2018 Marco Martin <mart@kde.org>
0003 *
0004 * SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006
0007 import QtQuick
0008 import org.kde.kirigami as Kirigami
0009
0010 QtObject {
0011 id: globalToolBar
0012 property int style: Kirigami.ApplicationHeaderStyle.None
0013
0014 readonly property int actualStyle: {
0015 if (style === Kirigami.ApplicationHeaderStyle.Auto) {
0016 if (!Kirigami.Settings.isMobile) {
0017 return Kirigami.ApplicationHeaderStyle.ToolBar
0018 } else if (root.wideMode) {
0019 return Kirigami.ApplicationHeaderStyle.Titles
0020 } else {
0021 return Kirigami.ApplicationHeaderStyle.Breadcrumb
0022 }
0023 }
0024 return style;
0025 }
0026
0027 /** @property kirigami::ApplicationHeaderStyle::NavigationButtons */
0028 property int showNavigationButtons: (!Kirigami.Settings.isMobile || Qt.platform.os === "ios")
0029 ? (Kirigami.ApplicationHeaderStyle.ShowBackButton | Kirigami.ApplicationHeaderStyle.ShowForwardButton)
0030 : Kirigami.ApplicationHeaderStyle.NoNavigationButtons
0031 property bool separatorVisible: true
0032 //Unfortunately we can't access pageRow.globalToolbar.Kirigami.Theme directly in a declarative way
0033 property int colorSet: Kirigami.Theme.Header
0034 // whether or not the header should be
0035 // "pushed" back when scrolling using the
0036 // touch screen
0037 property bool hideWhenTouchScrolling: false
0038 /**
0039 * If true, when any kind of toolbar is shown, the drawer handles will be shown inside the toolbar, if they're present
0040 */
0041 property bool canContainHandles: true
0042 property int toolbarActionAlignment: Qt.AlignRight
0043 property int toolbarActionHeightMode: Kirigami.ToolBarLayout.ConstrainIfLarger
0044
0045 property int minimumHeight: 0
0046 // FIXME: Figure out the exact standard size of a Toolbar
0047 property int preferredHeight: (actualStyle === Kirigami.ApplicationHeaderStyle.ToolBar
0048 ? Kirigami.Units.iconSizes.medium
0049 : Kirigami.Units.gridUnit * 1.8) + Kirigami.Units.smallSpacing * 2
0050 property int maximumHeight: preferredHeight
0051
0052 // Sets the minimum leading padding for the title in a page header
0053 property int titleLeftPadding: Kirigami.Units.gridUnit
0054 }