- Timestamp:
- Feb 2, 2024 11:21:42 AM (14 months ago)
- svn:sync-xref-src-repo-rev:
- 161428
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.cpp
r103166 r103171 1282 1282 if (pModel) 1283 1283 { 1284 /* Keep running vm always on top of the list: */ 1284 1285 bool fLeftRunning = pModel->isVMRunning(sourceLeftIndex.row()); 1285 1286 bool fRightRunning = pModel->isVMRunning(sourceRightIndex.row()); 1286 if (fLeftRunning && fRightRunning)1287 if (fLeftRunning && !fRightRunning) 1287 1288 { 1288 1289 if (sortOrder() == Qt::AscendingOrder) … … 1298 1299 return true; 1299 1300 } 1300 1301 1301 } 1302 1302 return QSortFilterProxyModel::lessThan(sourceLeftIndex, sourceRightIndex); … … 1476 1476 } 1477 1477 if (role == Qt::ForegroundRole) 1478 return m_defaultViewFontColor.lighter(250); 1478 { 1479 /* For some reason QColor::lighter(..) is not working here: */ 1480 QColor color = qApp->palette().color(QPalette::Active, QPalette::WindowText); 1481 int h, s, l; 1482 color.getHsl(&h, &s, &l); 1483 l = 100; 1484 return QColor::fromHsl(h, s, l); 1485 } 1479 1486 } 1480 1487 if (!index.isValid() || role != Qt::DisplayRole || index.row() >= rowCount()) … … 1862 1869 m_pProxyModel->setSourceModel(m_pModel); 1863 1870 m_pProxyModel->setNotRunningVMVisibility(m_fShowNotRunningVMs); 1871 m_pProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); 1864 1872 m_pTableView->setModel(m_pProxyModel); 1865 1873 m_pTableView->setItemDelegate(new UIVMActivityOverviewDelegate(this)); … … 1879 1887 /* Store the default font and its color of the table on the view. They are used in ::data(..): */ 1880 1888 m_pModel->setDefaultViewFont(m_pTableView->font()); 1881 m_pModel->setDefaultViewFontColor(m_pTableView->palette().color(QPalette:: WindowText));1889 m_pModel->setDefaultViewFontColor(m_pTableView->palette().color(QPalette::Active, QPalette::WindowText)); 1882 1890 1883 1891 connect(m_pModel, &UIActivityOverviewModel::sigDataUpdate,
Note:
See TracChangeset
for help on using the changeset viewer.