Changeset 67372 in vbox
- Timestamp:
- Jun 13, 2017 2:43:54 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotDetailsWidget.cpp
r67312 r67372 199 199 QSize UISnapshotDetailsElement::minimumSizeHint() const 200 200 { 201 /* Calculate minimum size-hint on the basis of margin, text-document ideal width and size: */ 201 /* Calculate minimum size-hint on the basis of: 202 * 1. context and text-documnt margins, 2. text-document ideal width and height: */ 203 int iTop = 0, iLeft = 0, iRight = 0, iBottom = 0; 204 layout()->getContentsMargins(&iTop, &iLeft, &iRight, &iBottom); 205 const QSize size = m_pTextEdit->document()->size().toSize(); 202 206 const int iDocumentMargin = (int)m_pTextEdit->document()->documentMargin(); 203 const int iIdealWidth = (int)m_pTextEdit->document()->idealWidth() + 2 * iDocumentMargin; 204 QSize size = m_pTextEdit->document()->size().toSize(); 205 size += QSize(2 * iDocumentMargin, 2 * iDocumentMargin); 206 return QSize(iIdealWidth, size.height()); 207 const int iIdealWidth = (int)m_pTextEdit->document()->idealWidth() + 2 * iDocumentMargin + iLeft + iRight; 208 const int iIdealHeight = size.height() + 2 * iDocumentMargin + iTop + iBottom; 209 return QSize(iIdealWidth, iIdealHeight); 207 210 } 208 211
Note:
See TracChangeset
for help on using the changeset viewer.