Changeset View
Changeset View
Standalone View
Standalone View
org.kde.desktop/ToolBar.qml
Show All 16 Lines | |||||
17 | * the packaging of this file. Please review the following information to | 17 | * the packaging of this file. Please review the following information to | ||
18 | * ensure the GNU General Public License version 2.0 requirements will be | 18 | * ensure the GNU General Public License version 2.0 requirements will be | ||
19 | * met: http://www.gnu.org/licenses/gpl-2.0.html. | 19 | * met: http://www.gnu.org/licenses/gpl-2.0.html. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | 22 | | |||
23 | import QtQuick 2.6 | 23 | import QtQuick 2.6 | ||
24 | import QtQuick.Templates 2.0 as T | 24 | import QtQuick.Templates 2.0 as T | ||
25 | import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate | 25 | import org.kde.kirigami 2.2 as Kirigami | ||
26 | 26 | | |||
27 | T.ToolBar { | 27 | T.ToolBar { | ||
28 | id: controlRoot | 28 | id: controlRoot | ||
29 | 29 | | |||
30 | implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) | 30 | implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding) | ||
31 | implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) | 31 | implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding) | ||
32 | 32 | | |||
33 | contentWidth: contentChildren[0].implicitWidth | 33 | contentWidth: contentChildren[0].implicitWidth | ||
34 | contentHeight: contentChildren[0].implicitHeight | 34 | contentHeight: contentChildren[0].implicitHeight | ||
35 | 35 | | |||
36 | contentItem: Item {} | 36 | contentItem: Item {} | ||
37 | 37 | | |||
38 | background: Rectangle { | 38 | background: Rectangle { | ||
39 | implicitHeight: 40 | 39 | implicitHeight: 40 | ||
40 | color: StylePrivate.SystemPaletteSingleton.window(controlRoot.enabled) | 40 | color: Kirigami.Theme.backgroundColor | ||
41 | Rectangle { | 41 | Kirigami.Separator { | ||
42 | anchors { | 42 | anchors { | ||
43 | left: parent.left | 43 | left: parent.left | ||
44 | right: parent.right | 44 | right: parent.right | ||
45 | top: controlRoot.parent.footer && controlRoot.parent.footer == controlRoot ? parent.top : undefined | 45 | top: controlRoot.parent.footer && controlRoot.parent.footer == controlRoot ? parent.top : undefined | ||
46 | bottom: controlRoot.parent.footer && controlRoot.parent.footer == controlRoot ? undefined : parent.top | 46 | bottom: controlRoot.parent.footer && controlRoot.parent.footer == controlRoot ? undefined : parent.bottom | ||
47 | } | 47 | } | ||
48 | height: 1 | | |||
49 | color: StylePrivate.SystemPaletteSingleton.text(controlRoot.enabled) | | |||
50 | opacity: 0.3 | | |||
51 | } | 48 | } | ||
52 | } | 49 | } | ||
53 | } | 50 | } |