Sidebar: remove frame from description TextArea
This commit is contained in:
parent
17a7e0108b
commit
81d935c766
1 changed files with 30 additions and 31 deletions
61
Sidebar.qml
61
Sidebar.qml
|
@ -97,45 +97,44 @@ Page {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
// Description box.
|
// Description box.
|
||||||
Frame {
|
ScrollView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumHeight: 100
|
Layout.maximumHeight: 100
|
||||||
padding: 1
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||||
|
|
||||||
ScrollView {
|
padding: 0
|
||||||
anchors.fill: parent
|
|
||||||
contentWidth: parent.availableWidth
|
|
||||||
padding: 0
|
|
||||||
|
|
||||||
visible: description.enabled
|
visible: description.enabled
|
||||||
background: Frame { }
|
background: Rectangle {
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
color: palette.base
|
||||||
|
border.color: description.activeFocus ? palette.highlight : palette.dark
|
||||||
|
radius: 2
|
||||||
|
}
|
||||||
|
|
||||||
TextArea {
|
TextArea {
|
||||||
id: description
|
id: description
|
||||||
|
|
||||||
placeholderText: qsTr('Description')
|
placeholderText: qsTr('Description')
|
||||||
background: Rectangle { color: palette.base }
|
padding: filter.padding
|
||||||
leftPadding: padding
|
leftPadding: filter.leftPadding
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
|
|
||||||
onTextChanged: modified = true
|
onTextChanged: modified = true
|
||||||
KeyNavigation.priority: KeyNavigation.BeforeItem
|
KeyNavigation.priority: KeyNavigation.BeforeItem
|
||||||
KeyNavigation.tab: nextItemInFocusChain()
|
KeyNavigation.tab: nextItemInFocusChain()
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
id: shortcutDescription
|
id: shortcutDescription
|
||||||
sequence: 'Ctrl+D'
|
sequence: 'Ctrl+D'
|
||||||
onActivated: description.forceActiveFocus()
|
onActivated: description.forceActiveFocus()
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
anchors { right: parent.right; bottom: parent.bottom; margins: 4 }
|
anchors { right: parent.right; bottom: parent.bottom; margins: 4 }
|
||||||
visible: !parent.activeFocus
|
visible: !parent.activeFocus
|
||||||
text: shortcutDescription.nativeText
|
text: shortcutDescription.nativeText
|
||||||
font.pixelSize: parent.font.pixelSize * 0.75
|
font.pixelSize: parent.font.pixelSize * 0.75
|
||||||
color: 'gray'
|
color: 'gray'
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue