Changeset 108123 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Feb 9, 2025 5:51:31 PM (3 months ago)
- svn:sync-xref-src-repo-rev:
- 167422
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
r108106 r108123 287 287 int iProposedWidth = 0; 288 288 289 /* Two margins: */289 /* Add 2 margins by default: */ 290 290 iProposedWidth += 2 * iMargin; 291 /* Additional 3 margins for widget mode: */ 291 292 if (!model()->tools()->isPopup()) 292 293 iProposedWidth += 3 * iMargin; 293 /* And Tools-item content to take into account: */ 294 int iToolsItemWidth = m_pixmapSize.width(); 294 295 /* Add pixmap size by default: */ 296 iProposedWidth += m_pixmapSize.width(); 297 298 /* Add text size for popup mode or 299 * if it's requested for widget mode: */ 295 300 if ( model()->tools()->isPopup() 296 301 || model()->showItemNames()) 297 iToolsItemWidth += iSpacing + m_nameSize.width(); 298 iProposedWidth += iToolsItemWidth; 302 { 303 iProposedWidth += m_nameSize.width(); 304 305 /* Add 1 spacing by default: */ 306 iProposedWidth += iSpacing; 307 /* Additional 1 spacing for widget mode: */ 308 if (!model()->tools()->isPopup()) 309 iProposedWidth += iSpacing; 310 } 299 311 300 312 /* Return result: */ … … 886 898 /* Prepare variables: */ 887 899 const int iNameX = model()->tools()->isPopup() ? iMargin + m_pixmapSize.width() + iSpacing 888 : 2.5 * iMargin + m_pixmapSize.width() + iSpacing;900 : 2.5 * iMargin + m_pixmapSize.width() + 2 * iSpacing; 889 901 const int iNameY = (iFullHeight - m_nameSize.height()) / 2; 890 902 /* Paint name (always for popup mode, if requested otherwise): */
Note:
See TracChangeset
for help on using the changeset viewer.