Changeset 102923 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jan 17, 2024 1:32:37 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStorageSettingsEditor.cpp
r102922 r102923 2781 2781 { 2782 2782 /* Sanity check: */ 2783 if (!index.isValid()) 2784 return; 2783 AssertReturnVoid(index.isValid()); 2785 2784 2786 2785 /* Acquire model: */ 2787 const StorageModel *pModel = qobject_cast<const StorageModel*>(index.model());2786 const QAbstractItemModel *pModel = index.model(); 2788 2787 AssertPtrReturnVoid(pModel); 2789 2788 … … 2799 2798 /* Setup foreground settings: */ 2800 2799 QPalette::ColorGroup cg = enmState & QStyle::State_Active ? QPalette::Active : QPalette::Inactive; 2801 bool fSelected = enmState & QStyle::State_Selected;2802 bool fFocused = enmState & QStyle::State_HasFocus;2803 bool fGrayOnLoosingFocus = QApplication::style()->styleHint(QStyle::SH_ItemView_ChangeHighlightOnFocus, &option) != 0;2800 const bool fSelected = enmState & QStyle::State_Selected; 2801 const bool fFocused = enmState & QStyle::State_HasFocus; 2802 const bool fGrayOnLoosingFocus = QApplication::style()->styleHint(QStyle::SH_ItemView_ChangeHighlightOnFocus, &option) != 0; 2804 2803 pPainter->setPen(option.palette.color(cg, fSelected &&(fFocused || !fGrayOnLoosingFocus) ? 2805 2804 QPalette::HighlightedText : QPalette::Text)); … … 2807 2806 pPainter->translate(rect.x(), rect.y()); 2808 2807 2809 /* Draw Item Pixmap: */2808 /* Draw item pixmap: */ 2810 2809 const bool fHasChildren = enmState & QStyle::State_Children; 2811 2810 const bool fOpened = enmState & QStyle::State_Open; … … 2845 2844 pPainter->drawText(textPosition, strShortText); 2846 2845 2847 /* Draw Controller Additions: */2846 /* Draw controller additions: */ 2848 2847 if (pModel->data(index, StorageModel::R_IsController).toBool() && enmState & QStyle::State_Selected) 2849 2848 {
Note:
See TracChangeset
for help on using the changeset viewer.