Cleanup quick switcher
- Make it modal
- Fix spacing
- Use bottom separator instead of frame for search field
(cherry picked from commit fe6ff9b2b6)
This commit is contained in:
@@ -16,16 +16,18 @@ QQC2.Dialog {
|
|||||||
|
|
||||||
required property NeoChatConnection connection
|
required property NeoChatConnection connection
|
||||||
|
|
||||||
parent: applicationWindow().overlay
|
parent: QQC2.Overlay.overlay
|
||||||
width: Math.min(700, parent.width)
|
width: Math.min(700, parent.width)
|
||||||
height: 400
|
height: 400
|
||||||
|
|
||||||
leftPadding: Kirigami.Units.smallSpacing
|
leftPadding: 0
|
||||||
rightPadding: Kirigami.Units.smallSpacing
|
rightPadding: 0
|
||||||
bottomPadding: Kirigami.Units.smallSpacing
|
bottomPadding: 1 // HACK fix graphical glitch in the bottom
|
||||||
topPadding: Kirigami.Units.smallSpacing
|
topPadding: 0
|
||||||
|
|
||||||
anchors.centerIn: applicationWindow().overlay
|
anchors.centerIn: parent
|
||||||
|
|
||||||
|
modal: true
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
sequence: "Ctrl+K"
|
sequence: "Ctrl+K"
|
||||||
@@ -44,9 +46,17 @@ QQC2.Dialog {
|
|||||||
background: DialogRoundedBackground {}
|
background: DialogRoundedBackground {}
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
Kirigami.SearchField {
|
Kirigami.SearchField {
|
||||||
id: searchField
|
id: searchField
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
background: null
|
||||||
|
|
||||||
|
Layout.margins: Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
Keys.onDownPressed: {
|
Keys.onDownPressed: {
|
||||||
roomList.forceActiveFocus();
|
roomList.forceActiveFocus();
|
||||||
if (roomList.currentIndex < roomList.count - 1) {
|
if (roomList.currentIndex < roomList.count - 1) {
|
||||||
@@ -74,6 +84,10 @@ QQC2.Dialog {
|
|||||||
onTextChanged: RoomManager.sortFilterRoomListModel.filterText = text
|
onTextChanged: RoomManager.sortFilterRoomListModel.filterText = text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Kirigami.Separator {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
QQC2.ScrollView {
|
QQC2.ScrollView {
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user