forked from osmocom/wireshark
Qt: Add the correct column width padding.
When applying recent column widths, add the correct padding in the right place. Bug: 11175 Change-Id: I5a6fe7975764ddc5d9024d8839a837579b2bf799 Ping-Bug: 11179 Reviewed-on: https://code.wireshark.org/review/8456 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
703b5dc48a
commit
4a37dfc57e
|
@ -604,7 +604,7 @@ int PacketList::sizeHintForColumn(int column) const
|
|||
size_hint = itemDelegateForColumn(column)->sizeHint(viewOptions(), QModelIndex()).width();
|
||||
}
|
||||
packet_list_model_->setSizeHintEnabled(false);
|
||||
size_hint += QTreeView::sizeHintForColumn(column);
|
||||
size_hint += QTreeView::sizeHintForColumn(column); // Decoration padding
|
||||
packet_list_model_->setSizeHintEnabled(true);
|
||||
return size_hint;
|
||||
}
|
||||
|
@ -693,8 +693,11 @@ void PacketList::applyRecentColumnWidths()
|
|||
} else {
|
||||
col_width = fm.width(MIN_COL_WIDTH_STR);
|
||||
}
|
||||
// Custom delegate padding
|
||||
if (itemDelegateForColumn(i)) {
|
||||
col_width += itemDelegateForColumn(i)->sizeHint(viewOptions(), QModelIndex()).width();
|
||||
}
|
||||
}
|
||||
col_width += QTreeView::sizeHintForColumn(i); // Decoration padding
|
||||
setColumnWidth(i, col_width) ;
|
||||
}
|
||||
column_state_ = header()->saveState();
|
||||
|
|
Loading…
Reference in New Issue