Verified Commit 2552eec0 authored by Jonah Brüchert's avatar Jonah Brüchert
Browse files

More PlasmaComponents -> Kirigami conversion

parent f86a7385
......@@ -20,12 +20,10 @@
***************************************************************************/
import QtQuick 2.3
//import QtQuick.Controls 1.0
//import QtWebEngine 1.0
import QtQuick.Layouts 1.0
import org.kde.kirigami 2.0 as Kirigami
Item {
// id: options
......@@ -37,7 +35,7 @@ Item {
anchors.fill: parent
spacing: units.smallSpacing
spacing: Kirigami.Units.smallSpacing
interactive: height < contentHeight
model: browserManager.bookmarks
......
......@@ -37,7 +37,7 @@ Rectangle {
property string title: ""
color: theme.backgroundColor
color: Kirigami.Theme.backgroundColor
Rectangle {
color: "white"
opacity: 0.6
......@@ -47,7 +47,7 @@ Rectangle {
opacity: state == "hidden" ? 0.0 : 1.0
Behavior on opacity {
NumberAnimation {
duration: units.longDuration/2;
duration: Kirigami.Units.longDuration/2;
easing.type: Easing.InOutQuad
}
}
......
......@@ -38,7 +38,7 @@ Item {
property int expandedHeight: Kirigami.Units.gridUnit * 8
Behavior on height { NumberAnimation { duration: units.longDuration; easing.type: Easing.InOutQuad} }
Behavior on height { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad} }
Rectangle { anchors.fill: parent; color: theme.backgroundColor; }
......
......@@ -37,7 +37,7 @@ Item {
anchors.fill: parent
spacing: units.smallSpacing
spacing: Kirigami.Units.smallSpacing
interactive: height < contentHeight
model: browserManager.history
......
......@@ -24,7 +24,6 @@ import QtQuick.Layouts 1.0
import QtWebEngine 1.4
import QtQuick.Controls 2.0 as Controls
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kirigami 2.0 as Kirigami
//import org.kde.plasma.components 2.0 as PlasmaComponents
//import org.kde.plasma.extras 2.0 as PlasmaExtras
......@@ -40,7 +39,7 @@ Item {
property int expandedHeight: Kirigami.Units.gridUnit * 2.5
property int buttonSize: Kirigami.Units.gridUnit * 2
Behavior on height { NumberAnimation { duration: units.longDuration; easing.type: Easing.InOutQuad} }
Behavior on height { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad} }
Rectangle { anchors.fill: parent; color: theme.backgroundColor; }
......@@ -51,7 +50,7 @@ Item {
anchors.rightMargin: Kirigami.Units.gridUnit / 2
visible: navigationShown
spacing: units.smallSpacing
spacing: Kirigami.Units.smallSpacing
/*
PlasmaComponents.ToolButton {
......@@ -135,17 +134,12 @@ Item {
Layout.preferredWidth: buttonSize
Layout.preferredHeight: buttonSize
PlasmaCore.SvgItem {
Kirigami.Icon {
id: menuIcon
svg: PlasmaCore.Svg {
id: iconSvg
imagePath: "widgets/configuration-icons"
//onRepaintNeeded: toolBoxIcon.elementId = iconSvg.hasElement("menu") ? "menu" : "configure"
}
elementId: iconSvg.hasElement("menu") ? "menu" : "configure"
source: "open-menu-symbolic"
anchors.fill: parent
anchors.margins: (Kirigami.Units.gridUnit / 2)
}
checked: options.state != "hidden"
//onClicked: options.state = (options.state != "hidden" ? "hidden" : targetState)
onPressed: options.state = (options.state != "hidden" ? "hidden" : targetState)
......
......@@ -41,8 +41,8 @@ Rectangle {
property int expandedHeight: Kirigami.Units.gridUnit * 12
property int expandedWidth: Kirigami.Units.gridUnit * 14
Behavior on opacity { NumberAnimation { duration: units.longDuration/2; easing.type: Easing.InOutQuad} }
Behavior on x { NumberAnimation { duration: units.longDuration/2; easing.type: Easing.InOutQuad} }
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.longDuration/2; easing.type: Easing.InOutQuad} }
Behavior on x { NumberAnimation { duration: Kirigami.Units.longDuration/2; easing.type: Easing.InOutQuad} }
height: expandedHeight
width: expandedWidth
......
......@@ -43,7 +43,7 @@ ColumnLayout {
// anchors.rightMargin: Kirigami.Units.gridUnit / 2
//visible: navigationShown
//spacing: units.smallSpacing
//spacing: Kirigami.Units.smallSpacing
OptionButton {
id: backButton
......@@ -121,7 +121,7 @@ ColumnLayout {
// Layout.preferredWidth: parent.width
Item {
Layout.preferredHeight: units.smallSpacing
Layout.preferredHeight: Kirigami.Units.smallSpacing
Layout.fillWidth: true
}
......
......@@ -76,8 +76,8 @@ Item {
// switch to tabs
}
}
NumberAnimation { duration: units.longDuration; easing.type: Easing.InOutQuad }
NumberAnimation { duration: units.longDuration; easing.type: Easing.InOutQuad; target: contentView; property: opacity }
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad }
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad; target: contentView; property: opacity }
ScriptAction {
script: {
print("Animation done");
......@@ -88,7 +88,7 @@ Item {
}
Behavior on width {
NumberAnimation { duration: units.longDuration; easing.type: Easing.InOutQuad}
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad}
}
......
......@@ -56,7 +56,7 @@ Controls.ItemDelegate {
topMargin: Kirigami.Units.gridUnit / 2
bottomMargin: Kirigami.Units.gridUnit / 2
bottom: parent.bottom
margins: units.smallSpacing
margins: Kirigami.Units.smallSpacing
}
source: icon
......@@ -72,11 +72,11 @@ Controls.ItemDelegate {
text: title
anchors {
left: urlIcon.right
leftMargin: units.largeSpacing / 2
leftMargin: Kirigami.Units.largeSpacing / 2
right: parent.right
bottom: parent.verticalCenter
top: urlIcon.top
//margins: units.smallSpacing
//margins: Kirigami.Units.smallSpacing
}
}
......@@ -87,11 +87,11 @@ Controls.ItemDelegate {
font.pointSize: theme.smallestFont.pointSize
anchors {
left: urlIcon.right
leftMargin: units.largeSpacing / 2
leftMargin: Kirigami.Units.largeSpacing / 2
right: removeIcon.left
top: urlIcon.verticalCenter
bottom: parent.bottom
//margins: units.smallSpacing
//margins: Kirigami.Units.smallSpacing
}
}
......@@ -108,7 +108,7 @@ Controls.ItemDelegate {
topMargin: Kirigami.Units.gridUnit
bottomMargin: Kirigami.Units.gridUnit
bottom: parent.bottom
margins: units.smallSpacing
margins: Kirigami.Units.smallSpacing
}
MouseArea {
anchors.fill: parent
......
......@@ -111,7 +111,7 @@ Item {
}
opacity: currentWebView.loading ? 1 : 0
Behavior on opacity { NumberAnimation { duration: units.longDuration; easing.type: Easing.InOutQuad; } }
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad; } }
Rectangle {
color: theme.highlightColor
......
Markdown is supported
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