Fix toolbar of RoomList when using font size 11px

We don't need to use a ToolBar for the titleDelegate since the
titleDelegate is already included inside a toolbar. This work magically
when using the default font size of 10px Noto Sans but breaks with 11px

BUG: 467242
This commit is contained in:
Carl Schwan
2023-06-17 21:32:51 +02:00
parent 529cfa8f7d
commit bd5ed0f46c

View File

@@ -9,7 +9,7 @@ import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
QQC2.ToolBar {
RowLayout {
id: root
property var desiredWidth
@@ -45,19 +45,16 @@ QQC2.ToolBar {
}
}
padding: 0
RowLayout {
id: row
Kirigami.SearchField {
Layout.topMargin: Kirigami.Units.smallSpacing
Layout.bottomMargin: Kirigami.Units.smallSpacing
Layout.fillWidth: true
Layout.preferredWidth: root.desiredWidth ? root.desiredWidth - menuButton.width - row.spacing : -1
Layout.preferredWidth: root.desiredWidth ? root.desiredWidth - menuButton.width - root.spacing : -1
visible: !root.collapsed
onTextChanged: sortFilterRoomListModel.filterText = text
KeyNavigation.tab: listView
}
QQC2.ToolButton {
id: menuButton
display: QQC2.AbstractButton.IconOnly
@@ -76,11 +73,11 @@ QQC2.ToolBar {
}
}
}
QQC2.ToolTip {
text: parent.text
}
}
}
Component {
id: desktopMenu