- Timestamp:
- Jun 1, 2017 4:55:31 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
-
globals/VBoxGlobal.cpp (modified) (11 diffs)
-
selector/UISnapshotDetailsWidget.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r67214 r67217 972 972 "<table border=0 cellspacing=1 cellpadding=0>%1</table>"; 973 973 static const char *sSectionHrefTpl = 974 "<tr><td width=% 7 rowspan=%1 align=left><img width=%6 height=%6src='%2'></td>"974 "<tr><td width=%6 rowspan=%1 align=left><img src='%2'></td>" 975 975 "<td colspan=3><b><a href='%3'><nobr>%4</nobr></a></b></td></tr>" 976 976 "%5" 977 977 "<tr><td colspan=3><font size=1> </font></td></tr>"; 978 978 static const char *sSectionBoldTpl = 979 "<tr><td width=% 7 rowspan=%1 align=left><img width=%6 height=%6src='%2'></td>"979 "<tr><td width=%6 rowspan=%1 align=left><img src='%2'></td>" 980 980 "<td colspan=3><!-- %3 --><b><nobr>%4</nobr></b></td></tr>" 981 981 "%5" … … 1021 1021 strReport += strSectionTpl 1022 1022 .arg(2 + iRowCount) /* rows */ 1023 .arg(" :/machine_16px.png", /* icon */1023 .arg("details://general", /* icon */ 1024 1024 "#general", /* link */ 1025 1025 tr("General", "details report"), /* title */ 1026 1026 strItem, /* items */ 1027 QString::number(iIconMetric),1028 1027 QString::number(iIndentMetric)); 1029 1028 } … … 1119 1118 strReport += strSectionTpl 1120 1119 .arg(2 + iRowCount) /* rows */ 1121 .arg(" :/chipset_16px.png", /* icon */1120 .arg("details://system", /* icon */ 1122 1121 "#system", /* link */ 1123 1122 tr("System", "details report"), /* title */ 1124 1123 strItem, /* items */ 1125 QString::number(iIconMetric),1126 1124 QString::number(iIndentMetric)); 1127 1125 } … … 1176 1174 strReport += strSectionTpl 1177 1175 .arg(2 + iRowCount) /* rows */ 1178 .arg(" :/vrdp_16px.png", /* icon */1176 .arg("details://display", /* icon */ 1179 1177 "#display", /* link */ 1180 1178 tr("Display", "details report"), /* title */ 1181 1179 strItem, /* items */ 1182 QString::number(iIconMetric),1183 1180 QString::number(iIndentMetric)); 1184 1181 } … … 1246 1243 strReport += strSectionTpl 1247 1244 .arg(2 + iRowCount) /* rows */ 1248 .arg(" :/hd_16px.png", /* icon */1245 .arg("details://storage", /* icon */ 1249 1246 "#storage", /* link */ 1250 1247 tr("Storage", "details report"), /* title */ 1251 1248 strItem, /* items */ 1252 QString::number(iIconMetric),1253 1249 QString::number(iIndentMetric)); 1254 1250 } … … 1279 1275 strReport += strSectionTpl 1280 1276 .arg(2 + iRowCount) /* rows */ 1281 .arg(" :/sound_16px.png", /* icon */1277 .arg("details://audio", /* icon */ 1282 1278 "#audio", /* link */ 1283 1279 tr("Audio", "details report"), /* title */ 1284 1280 strItem, /* items */ 1285 QString::number(iIconMetric),1286 1281 QString::number(iIndentMetric)); 1287 1282 } … … 1352 1347 strReport += strSectionTpl 1353 1348 .arg(2 + iRowCount) /* rows */ 1354 .arg(" :/nw_16px.png", /* icon */1349 .arg("details://network", /* icon */ 1355 1350 "#network", /* link */ 1356 1351 tr("Network", "details report"), /* title */ 1357 1352 strItem, /* items */ 1358 QString::number(iIconMetric),1359 1353 QString::number(iIndentMetric)); 1360 1354 } … … 1404 1398 strReport += strSectionTpl 1405 1399 .arg(2 + iRowCount) /* rows */ 1406 .arg(" :/serial_port_16px.png", /* icon */1400 .arg("details://serialPorts", /* icon */ 1407 1401 "#serialPorts", /* link */ 1408 1402 tr("Serial Ports", "details report"), /* title */ 1409 1403 strItem, /* items */ 1410 QString::number(iIconMetric),1411 1404 QString::number(iIndentMetric)); 1412 1405 } … … 1447 1440 const QString dummy = strSectionTpl /* strReport += strSectionTpl */ 1448 1441 .arg(2 + iRowCount) /* rows */ 1449 .arg(" :/parallel_port_16px.png", /* icon */1442 .arg("details://parallelPorts", /* icon */ 1450 1443 "#parallelPorts", /* link */ 1451 1444 tr("Parallel Ports", "details report"), /* title */ 1452 1445 strItem, /* items */ 1453 QString::number(iIconMetric),1454 1446 QString::number(iIndentMetric)); 1455 1447 Q_UNUSED(dummy); … … 1490 1482 strReport += strSectionTpl 1491 1483 .arg(2 + iRowCount) /* rows */ 1492 .arg(" :/usb_16px.png", /* icon */1484 .arg("details://usb", /* icon */ 1493 1485 "#usb", /* link */ 1494 1486 tr("USB", "details report"), /* title */ 1495 1487 strItem, /* items */ 1496 QString::number(iIconMetric),1497 1488 QString::number(iIndentMetric)); 1498 1489 } … … 1516 1507 strReport += strSectionTpl 1517 1508 .arg(2 + iRowCount) /* rows */ 1518 .arg(" :/sf_16px.png", /* icon */1509 .arg("details://sharedFolders", /* icon */ 1519 1510 "#sfolders", /* link */ 1520 1511 tr("Shared Folders", "details report"), /* title */ 1521 1512 strItem, /* items */ 1522 QString::number(iIconMetric),1523 1513 QString::number(iIndentMetric)); 1524 1514 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotDetailsWidget.cpp
r67176 r67217 33 33 34 34 /* GUI includes: */ 35 # include "UIConverter.h" 35 36 # include "UIDesktopWidgetWatchdog.h" 37 # include "UIExtraDataDefs.h" 38 # include "UIIconPool.h" 36 39 # include "UISnapshotDetailsWidget.h" 37 40 # include "UIMessageCenter.h" … … 566 569 m_pBrowserDetails->setSizePolicy(policy); 567 570 m_pBrowserDetails->setFocus(); 571 /* Determine icon metric: */ 572 const QStyle *pStyle = QApplication::style(); 573 const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize); 574 const QSize iconSize = QSize(iIconMetric, iIconMetric); 575 /* Register DetailsElementType icons in the m_pBrowserDetails document: */ 576 // WORKAROUND: 577 // Unfortunatelly we can't just enumerate types within 578 // cycle since they have exceptions like 'parallel' case. 579 QList<DetailsElementType> types; 580 types << DetailsElementType_General 581 << DetailsElementType_System 582 << DetailsElementType_Preview 583 << DetailsElementType_Display 584 << DetailsElementType_Storage 585 << DetailsElementType_Audio 586 << DetailsElementType_Network 587 << DetailsElementType_Serial 588 #ifdef VBOX_WITH_PARALLEL_PORTS 589 << DetailsElementType_Parallel 590 #endif /* VBOX_WITH_PARALLEL_PORTS */ 591 << DetailsElementType_USB 592 << DetailsElementType_SF 593 << DetailsElementType_UI 594 << DetailsElementType_Description; 595 foreach (const DetailsElementType &enmType, types) 596 m_pBrowserDetails->document()->addResource( 597 QTextDocument::ImageResource, 598 QUrl(QString("details://%1").arg(gpConverter->toInternalString(enmType))), 599 QVariant(gpConverter->toIcon(enmType).pixmap(iconSize))); 568 600 569 601 /* Add to layout: */
Note:
See TracChangeset
for help on using the changeset viewer.

