mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-29 18:42:07 +08:00
cabana: auto stretch last column (#28310)
old-commit-hash: 9a3897831cebe7ee98858a3820f05b1985a0f40f
This commit is contained in:
@@ -46,6 +46,7 @@ MessagesWidget::MessagesWidget(QWidget *parent) : QWidget(parent) {
|
||||
restoreHeaderState(settings.message_header_state);
|
||||
view->header()->setSectionsMovable(true);
|
||||
view->header()->setSectionResizeMode(MessageListModel::Column::DATA, QHeaderView::Fixed);
|
||||
view->header()->setStretchLastSection(true);
|
||||
|
||||
// Header context menu
|
||||
view->header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
@@ -404,8 +405,8 @@ void MessageView::updateBytesSectionSize() {
|
||||
}
|
||||
}
|
||||
int width = delegate->widthForBytes(max_bytes);
|
||||
if (header()->sectionSize(5) != width) {
|
||||
header()->resizeSection(5, width);
|
||||
if (header()->sectionSize(MessageListModel::Column::DATA) != width) {
|
||||
header()->resizeSection(MessageListModel::Column::DATA, width);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user