Commit 5f43557e authored by camilo neon's avatar camilo neon
Browse files

fix editor context menu on long press

parent efdabffc
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.7 as Kirigami
import "private"
/**
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.7 as Kirigami
import "private"
/**
* Editor
* A text area for editing text with convinient functions.
* The Editor is controlled by the DocumentHandler which controls the files I/O,
......@@ -16,8 +16,8 @@ import "private"
*
*
*/
Maui.Page
{
Maui.Page
{
id: control
Kirigami.Theme.inherit: false
Kirigami.Theme.colorSet: Kirigami.Theme.View
......@@ -316,17 +316,6 @@ Maui.Page
else control.zoomOut()
}
MouseArea
{
anchors.fill: parent
onPressed:
{
console.log("Editor")
body.forceActiveFocus()
}
}
Kirigami.ScrollablePage
{
id: _scrollView
......@@ -366,6 +355,11 @@ Maui.Page
color: "transparent"
}
onPressAndHold:
{
documentMenu.popup()
}
onPressed:
{
if(!Kirigami.Settings.isMobile && event.button === Qt.RightButton)
......@@ -447,4 +441,5 @@ Maui.Page
body.font.pointSize = body.font.pointSize / 1.5
}
}
}
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