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

using new mauikti editor prop for stickyheadbar

parent 6fbeee08
...@@ -21,76 +21,24 @@ Maui.Dialog ...@@ -21,76 +21,24 @@ Maui.Dialog
signal noteSaved(var note) signal noteSaved(var note)
page.padding: 0 page.padding: 0
Kirigami.Theme.backgroundColor: selectedColor Kirigami.Theme.backgroundColor: selectedColor
Kirigami.Theme.textColor: fgColor Kirigami.Theme.textColor: fgColor
headBar.leftContent: [
ToolButton headBar.middleContent: TextField
{ {
icon.name: "edit-undo" id: title
enabled: editor.body.canUndo Layout.fillWidth: true
onClicked: editor.body.undo() Layout.margins: space.medium
opacity: enabled ? 1 : 0.5 placeholderText: qsTr("Title")
icon.color: Kirigami.Theme.textColor font.weight: Font.Bold
}, font.bold: true
font.pointSize: fontSizes.large
ToolButton // Kirigami.Theme.backgroundColor: selectedColor
{ // Kirigami.Theme.textColor: Qt.darker(selectedColor, 2.5)
icon.name: "edit-redo" // color: fgColor
enabled: editor.body.canRedo background: Rectangle
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
{ {
icon.name: "image" color: "transparent"
icon.color: control.Kirigami.Theme.textColor
} }
]
headBar.rightContent: ColorsBar
{
onColorPicked: selectedColor = color
} }
footBar.leftContent: [ footBar.leftContent: [
...@@ -99,7 +47,7 @@ Maui.Dialog ...@@ -99,7 +47,7 @@ Maui.Dialog
id: pinButton id: pinButton
icon.name: "pin" icon.name: "pin"
checkable: true checkable: true
icon.color: checked ? highlightColor : Kirigami.Theme.textColor icon.color: checked ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
// onClicked: checked = !checked // onClicked: checked = !checked
}, },
...@@ -150,25 +98,6 @@ Maui.Dialog ...@@ -150,25 +98,6 @@ Maui.Dialog
{ {
anchors.fill: parent 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 Maui.Editor
{ {
id: editor id: editor
...@@ -176,8 +105,18 @@ Maui.Dialog ...@@ -176,8 +105,18 @@ Maui.Dialog
Layout.fillWidth: true Layout.fillWidth: true
Kirigami.Theme.backgroundColor: selectedColor Kirigami.Theme.backgroundColor: selectedColor
Kirigami.Theme.textColor: Qt.darker(selectedColor, 2.5) 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 Maui.TagsBar
...@@ -189,8 +128,8 @@ Maui.Dialog ...@@ -189,8 +128,8 @@ Maui.Dialog
list.key: "notes" list.key: "notes"
onTagsEdited: list.updateToAbstract(tags) onTagsEdited: list.updateToAbstract(tags)
onTagRemovedClicked: list.removeFromAbstract(index) onTagRemovedClicked: list.removeFromAbstract(index)
Kirigami.Theme.backgroundColor: "transparent" Kirigami.Theme.backgroundColor: "transparent"
Kirigami.Theme.textColor: Kirigami.Theme.textColor Kirigami.Theme.textColor: Kirigami.Theme.textColor
} }
} }
......
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