aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/macos/TextArea.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/macos/TextArea.qml')
-rw-r--r--src/imports/controls/macos/TextArea.qml17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/imports/controls/macos/TextArea.qml b/src/imports/controls/macos/TextArea.qml
index f6b88303..98884bda 100644
--- a/src/imports/controls/macos/TextArea.qml
+++ b/src/imports/controls/macos/TextArea.qml
@@ -38,4 +38,21 @@ import QtQuick
import QtQuick.NativeStyle as NativeStyle
NativeStyle.DefaultTextArea {
+ id: control
+
+ // If you place a TextArea inside a Frame or Flickable (/ScrollView), and
+ // the TextArea is the only child of the content item, we place the focus
+ // frame around the Flickable/Frame instead.
+ readonly property Item __focusFrameTarget:
+ (parent.parent instanceof Frame || parent.parent instanceof Flickable)
+ && parent.children.length === 1
+ ? parent.parent : control
+
+ background: Rectangle {
+ color: control.palette.light
+ // Since this delegate is a plain Rectangle, we need to tag it to know
+ // that it's still the default one, and not some custom item set by the
+ // application. Only in the former case do we wan't to show a focus frame.
+ readonly property bool __isDefaultDelegate: true
+ }
}