Commit 97dd4a30 authored by camilo higuita's avatar camilo higuita

using new mauikti editor prop for stickyheadbar

parent 6fbeee08
......@@ -22,75 +22,23 @@ Maui.Dialog
page.padding: 0
Kirigami.Theme.backgroundColor: selectedColor
Kirigami.Theme.textColor: fgColor
headBar.leftContent: [
ToolButton
{
icon.name: "edit-undo"
enabled: editor.body.canUndo
onClicked: editor.body.undo()
opacity: enabled ? 1 : 0.5
icon.color: Kirigami.Theme.textColor
},
ToolButton
headBar.middleContent: TextField
{
icon.name: "edit-redo"
enabled: editor.body.canRedo
onClicked: editor.body.redo()
opacity: enabled ? 1 : 0.5
icon.color: Kirigami.Theme.textColor
},
ToolButton
{
icon.name: "format-text-bold"
focusPolicy: Qt.TabFocus
icon.color: checked ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
checkable: true
checked: editor.document.bold
onClicked: editor.document.bold = !editor.document.bold
},
ToolButton
{
icon.name: "format-text-italic"
icon.color: checked ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
focusPolicy: Qt.TabFocus
checkable: true
checked: editor.document.italic
onClicked: editor.document.italic = !editor.document.italic
},
ToolButton
{
icon.name: "format-text-underline"
icon.color: checked ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
focusPolicy: Qt.TabFocus
checkable: true
checked: editor.document.underline
onClicked: editor.document.underline = !editor.document.underline
},
ToolButton
{
icon.name: "format-text-uppercase"
icon.color: checked ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
focusPolicy: Qt.TabFocus
checkable: true
checked: editor.document.uppercase
onClicked: editor.document.uppercase = !editor.document.uppercase
},
ToolButton
id: title
Layout.fillWidth: true
Layout.margins: space.medium
placeholderText: qsTr("Title")
font.weight: Font.Bold
font.bold: true
font.pointSize: fontSizes.large
// Kirigami.Theme.backgroundColor: selectedColor
// Kirigami.Theme.textColor: Qt.darker(selectedColor, 2.5)
// color: fgColor
background: Rectangle
{
icon.name: "image"
icon.color: control.Kirigami.Theme.textColor
color: "transparent"
}
]
headBar.rightContent: ColorsBar
{
onColorPicked: selectedColor = color
}
footBar.leftContent: [
......@@ -99,7 +47,7 @@ Maui.Dialog
id: pinButton
icon.name: "pin"
checkable: true
icon.color: checked ? highlightColor : Kirigami.Theme.textColor
icon.color: checked ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
// onClicked: checked = !checked
},
......@@ -150,25 +98,6 @@ Maui.Dialog
{
anchors.fill: parent
TextField
{
id: title
Layout.fillWidth: true
Layout.margins: space.medium
height: 24
placeholderText: qsTr("Title")
font.weight: Font.Bold
font.bold: true
font.pointSize: fontSizes.large
// Kirigami.Theme.backgroundColor: selectedColor
// Kirigami.Theme.textColor: Qt.darker(selectedColor, 2.5)
// color: fgColor
background: Rectangle
{
color: "transparent"
}
}
Maui.Editor
{
id: editor
......@@ -176,8 +105,18 @@ Maui.Dialog
Layout.fillWidth: true
Kirigami.Theme.backgroundColor: selectedColor
Kirigami.Theme.textColor: Qt.darker(selectedColor, 2.5)
headBar.visible: false
stickyHeadBar: true
headBar.leftContent: ToolButton
{
icon.name: "image"
icon.color: control.Kirigami.Theme.textColor
}
headBar.rightContent: ColorsBar
{
onColorPicked: selectedColor = color
}
}
Maui.TagsBar
......
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