Changeset 108310 in vbox
- Timestamp:
- Feb 20, 2025 1:18:42 PM (2 months ago)
- svn:sync-xref-src-repo-rev:
- 167654
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
r108309 r108310 591 591 void UIToolsItem::updatePixmap() 592 592 { 593 /* Prepare variables: */ 594 const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize) * 1.5; 593 /* Smaller Machine tool icons in widget mode: */ 594 const int iIconMetric = model()->isPopup() || itemClass() != UIToolClass_Machine 595 ? QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize) * 1.5 596 : QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); 595 597 596 598 /* Prepare new pixmap size: */ … … 894 896 /* Prepare variables: */ 895 897 #ifdef VBOX_WS_MAC 896 constint iPixmapX = model()->isPopup() ? iMargin : 2 * iMargin;898 int iPixmapX = model()->isPopup() ? iMargin : 2 * iMargin; 897 899 #else 898 constint iPixmapX = model()->isPopup() ? iMargin : 1.5 * iMargin;900 int iPixmapX = model()->isPopup() ? iMargin : 1.5 * iMargin; 899 901 #endif 902 903 /* A bit of indentation for Machine tools in widget mode: */ 904 if (!model()->isPopup() && itemClass() == UIToolClass_Machine) 905 iPixmapX += QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize) * .5; 906 900 907 const int iPixmapY = (iFullHeight - m_pixmap.height() / m_pixmap.devicePixelRatio()) / 2; 901 908 /* Paint pixmap: */ … … 913 920 /* Prepare variables: */ 914 921 #ifdef VBOX_WS_MAC 915 constint iNameX = model()->isPopup() ? iMargin + m_pixmapSize.width() + iSpacing916 922 int iNameX = model()->isPopup() ? iMargin + m_pixmapSize.width() + iSpacing 923 : 2 * iMargin + m_pixmapSize.width() + 2 * iSpacing; 917 924 #else 918 constint iNameX = model()->isPopup() ? iMargin + m_pixmapSize.width() + iSpacing919 925 int iNameX = model()->isPopup() ? iMargin + m_pixmapSize.width() + iSpacing 926 : 1.5 * iMargin + m_pixmapSize.width() + 2 * iSpacing; 920 927 #endif 928 929 /* A bit of indentation for Machine tools in widget mode: */ 930 if (!model()->isPopup() && itemClass() == UIToolClass_Machine) 931 iNameX += QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize) * .5; 932 921 933 const int iNameY = (iFullHeight - m_nameSize.height()) / 2; 922 934 /* Paint name (always for popup mode, if requested otherwise): */
Note:
See TracChangeset
for help on using the changeset viewer.