VirtualBox

Changeset 81510 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 24, 2019 9:08:53 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134238
Message:

FE/Qt: bugref:9510. Changing the table format a bit to make Configuration and Runtime information tables more alike.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp

    r81392 r81510  
    176176void UIRuntimeInfoWidget::retranslateUi()
    177177{
    178 
    179178    m_strTableTitle = QApplication::translate("UIVMInformationDialog", "Runtime Attributes");
    180179    m_strScreenResolutionLabel = QApplication::translate("UIVMInformationDialog", "Screen Resolution");
     
    217216        iNewRow = iRow;
    218217    insertRow(iNewRow);
    219     setItem(iNewRow, 0, new QTableWidgetItem(strLabel, enmInfoRow));
    220     setItem(iNewRow, 1, new QTableWidgetItem(strInfo, enmInfoRow));
     218    setItem(iNewRow, 1, new QTableWidgetItem(strLabel, enmInfoRow));
     219    setItem(iNewRow, 2, new QTableWidgetItem(strInfo, enmInfoRow));
    221220    int iMargin = 0.2 * qApp->style()->pixelMetric(QStyle::PM_LayoutTopMargin);
    222221    setRowHeight(iNewRow, 2 * iMargin + m_iFontHeight);
     
    274273    {
    275274        QString strLabel = uGuestScreens > 1 ?
    276             QString("%1 %2:").arg(m_strScreenResolutionLabel).arg(QString::number(iScreen)) :
    277             QString("%1:").arg(m_strScreenResolutionLabel);
     275            QString("%1 %2").arg(m_strScreenResolutionLabel).arg(QString::number(iScreen)) :
     276            QString("%1").arg(m_strScreenResolutionLabel);
    278277        /* Insert the screen resolution row at the top of the table. Row 0 is the title row: */
    279278        insertInfoRow(InfoRow_Resolution, strLabel, m_screenResolutions[iScreen], iScreen + 1);
     
    297296                uUpDays, uUpHours, uUpMins, uUpSecs);
    298297    QString strUptime = QString(szUptime);
    299     updateInfoRow(InfoRow_Uptime, QString("%1:").arg(m_strUptimeLabel), strUptime);
     298    updateInfoRow(InfoRow_Uptime, QString("%1").arg(m_strUptimeLabel), strUptime);
    300299}
    301300
     
    303302{
    304303    /* Add the title row always as 0th row: */
    305     QTableWidgetItem *pTitleItem = new QTableWidgetItem(UIIconPool::iconSet(":/state_running_16px.png"), m_strTableTitle, InfoRow_Title);
     304    QTableWidgetItem *pTitleIcon = new QTableWidgetItem(UIIconPool::iconSet(":/state_running_16px.png"), "", InfoRow_Title);
     305    QTableWidgetItem *pTitleItem = new QTableWidgetItem(m_strTableTitle, InfoRow_Title);
    306306    QFont titleFont(font());
    307307    titleFont.setBold(true);
     
    309309    if (rowCount() < 1)
    310310        insertRow(0);
    311     setItem(0, 0, pTitleItem);
     311    setItem(0, 0, pTitleIcon);
     312    setItem(0, 1, pTitleItem);
     313    resizeColumnToContents(0);
    312314}
    313315
     
    319321    else
    320322        strOSType = uiCommon().vmGuestOSTypeDescription(strOSType);
    321    updateInfoRow(InfoRow_GuestOSType, QString("%1:").arg(m_strGuestOSTypeLabel), strOSType);
     323   updateInfoRow(InfoRow_GuestOSType, QString("%1").arg(m_strGuestOSTypeLabel), strOSType);
    322324}
    323325
     
    356358    QString strParavirtProvider = gpConverter->toString(m_machine.GetEffectiveParavirtProvider());
    357359
    358     updateInfoRow(InfoRow_ExecutionEngine, QString("%1:").arg(m_strExcutionEngineLabel), strExecutionEngine);
    359     updateInfoRow(InfoRow_NestedPaging, QString("%1:").arg(m_strNestedPagingLabel), strNestedPaging);
    360     updateInfoRow(InfoRow_UnrestrictedExecution, QString("%1:").arg(m_strUnrestrictedExecutionLabel), strUnrestrictedExecution);
    361     updateInfoRow(InfoRow_Paravirtualization, QString("%1:").arg(m_strParavirtualizationLabel), strParavirtProvider);
     360    updateInfoRow(InfoRow_ExecutionEngine, QString("%1").arg(m_strExcutionEngineLabel), strExecutionEngine);
     361    updateInfoRow(InfoRow_NestedPaging, QString("%1").arg(m_strNestedPagingLabel), strNestedPaging);
     362    updateInfoRow(InfoRow_UnrestrictedExecution, QString("%1").arg(m_strUnrestrictedExecutionLabel), strUnrestrictedExecution);
     363    updateInfoRow(InfoRow_Paravirtualization, QString("%1").arg(m_strParavirtualizationLabel), strParavirtProvider);
    362364
    363365}
     
    375377            strGAVersion += QString(" r%1").arg(uRevision);
    376378    }
    377    updateInfoRow(InfoRow_GuestAdditions, QString("%1:").arg(m_strGuestAdditionsLabel), strGAVersion);
     379   updateInfoRow(InfoRow_GuestAdditions, QString("%1").arg(m_strGuestAdditionsLabel), strGAVersion);
    378380}
    379381
     
    383385    QString strVRDEInfo = (iVRDEPort == 0 || iVRDEPort == -1) ?
    384386        m_strNotAvailable : QString("%1").arg(iVRDEPort);
    385    updateInfoRow(InfoRow_RemoteDesktop, QString("%1:").arg(m_strRemoteDesktopLabel), strVRDEInfo);
     387   updateInfoRow(InfoRow_RemoteDesktop, QString("%1").arg(m_strRemoteDesktopLabel), strVRDEInfo);
    386388}
    387389
     
    389391{
    390392    if (enmMode == KClipboardMode_Max)
    391         updateInfoRow(InfoRow_ClipboardMode, QString("%1:").arg(m_strClipboardModeLabel),
     393        updateInfoRow(InfoRow_ClipboardMode, QString("%1").arg(m_strClipboardModeLabel),
    392394                      gpConverter->toString(m_machine.GetClipboardMode()));
    393395    else
    394         updateInfoRow(InfoRow_ClipboardMode, QString("%1:").arg(m_strClipboardModeLabel),
     396        updateInfoRow(InfoRow_ClipboardMode, QString("%1").arg(m_strClipboardModeLabel),
    395397                      gpConverter->toString(enmMode));
    396398}
     
    399401{
    400402    if (enmMode == KDnDMode_Max)
    401         updateInfoRow(InfoRow_DnDMode, QString("%1:").arg(m_strDragAndDropLabel),
     403        updateInfoRow(InfoRow_DnDMode, QString("%1").arg(m_strDragAndDropLabel),
    402404                  gpConverter->toString(m_machine.GetDnDMode()));
    403405    else
    404         updateInfoRow(InfoRow_DnDMode, QString("%1:").arg(m_strDragAndDropLabel),
     406        updateInfoRow(InfoRow_DnDMode, QString("%1").arg(m_strDragAndDropLabel),
    405407                      gpConverter->toString(enmMode));
    406408}
     
    427429    clear();
    428430    setRowCount(0);
    429     setColumnCount(2);
     431    setColumnCount(3);
    430432    updateTitleRow();
    431433    updateScreenInfo();
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette