Changeset 99602 in vbox
- Timestamp:
- May 4, 2023 12:43:21 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotPane.cpp
r99567 r99602 1755 1755 /* Calculate the total snapshot tree width: */ 1756 1756 const int iTotal = m_pSnapshotTree->viewport()->width(); 1757 /* Look for a minimum width hints for non-important columns: */ 1757 1758 /* Look for a minimum width hint for Taken column: */ 1758 1759 const int iMinWidth1 = qMax(pItemView->sizeHintForColumn(Column_Taken), pItemHeader->sectionSizeHint(Column_Taken)); 1759 /* Propose suitable width hint s for non-important columns: */1760 /* Propose suitable width hint for Taken column (but no more than the half of existing space): */ 1760 1761 const int iWidth1 = iMinWidth1 < iTotal / Column_Max ? iMinWidth1 : iTotal / Column_Max; 1762 1763 /* Look for a minimum width hint for Name column: */ 1764 const int iMinWidth0 = qMax(pItemView->sizeHintForColumn(Column_Name), pItemHeader->sectionSizeHint(Column_Name)); 1765 /* Propose suitable width hint for important column (at least all remaining space and no less than the hint itself): */ 1766 const int iWidth0 = iMinWidth0 > iTotal - iWidth1 ? iMinWidth0 : iTotal - iWidth1; 1767 1761 1768 /* Apply the proposal: */ 1762 1769 m_pSnapshotTree->setColumnWidth(Column_Taken, iWidth1); 1763 m_pSnapshotTree->setColumnWidth(Column_Name, i Total - iWidth1);1770 m_pSnapshotTree->setColumnWidth(Column_Name, iWidth0); 1764 1771 } 1765 1772
Note:
See TracChangeset
for help on using the changeset viewer.

