Commit 95918cd2 authored by Nate Graham's avatar Nate Graham
Browse files

Port custom toolbars to QQC2 Toolbar

This is more semantically correct and lets them use Header colors, if
the color scheme has any defined.
parent 32145a2b
......@@ -12,10 +12,9 @@ import QtQuick.Layouts 1.0
import org.kde.kirigami 2.8 as Kirigami
import org.kde.kquickcontrolsaddons 2.0 as KQCAddons
Rectangle {
QQC2.ToolBar {
id: root
width: parent.width
color: Kirigami.Theme.backgroundColor
signal colorschemeChanged(int index)
signal sliderValueChanged(int val)
......@@ -25,9 +24,6 @@ Rectangle {
RowLayout {
anchors.fill: parent
anchors.leftMargin: Kirigami.Units.smallSpacing
anchors.rightMargin: Kirigami.Units.smallSpacing
anchors.verticalCenter: parent.verticalCenter
spacing: Kirigami.Units.largeSpacing
Kirigami.SearchField {
id: filterInput
......@@ -131,13 +127,5 @@ Rectangle {
popup.modal: false
}
}
Kirigami.Separator {
height: 1
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}
}
}
......@@ -10,10 +10,8 @@ import QtQuick.Layouts 1.0
import org.kde.kirigami 2.8 as Kirigami
Rectangle {
id: root
width: parent.width
color: Kirigami.Theme.backgroundColor
QQC2.ToolBar {
id: root
property alias currentIndex: colorcombo.currentIndex
property alias value: sizeslider.value
......@@ -21,19 +19,13 @@ Rectangle {
signal colorschemeChanged(int index)
signal sliderValueChanged(int val)
Kirigami.Separator {
height: 1
anchors {
left: parent.left
right: parent.right
top: parent.top
}
}
// Normally Toolbars use header colors, but this is a footer! So use the
// window color set instead
Kirigami.Theme.colorSet: Kirigami.Theme.Window
Kirigami.Theme.inherit: false
RowLayout {
anchors.fill: parent
anchors.leftMargin: Kirigami.Units.smallSpacing
anchors.rightMargin: Kirigami.Units.smallSpacing
anchors.verticalCenter: parent.verticalCenter
spacing: Kirigami.Units.largeSpacing
QQC2.Slider {
visible: !cuttlefish.widescreen
......
......@@ -116,6 +116,15 @@ Kirigami.ApplicationWindow {
Layout.fillHeight: true
}
}
// ToolsResponsive is a QQC2 toolbar which automatically draws a
// separator line on the bottom, but not on the top, and we need one
// on the top because we're using it as a footer, so we have to draw
// our own separator
Kirigami.Separator {
Layout.fillWidth: true
visible: toolsResponsive.visible
}
ToolsResponsive {
visible: !cuttlefish.widescreen
id: toolsResponsive
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment