VirtualBox

Changeset 89582 in vbox


Ignore:
Timestamp:
Jun 9, 2021 1:52:35 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10003: UIMessageCenter: Making message-box details table colors native as well.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIErrorString.cpp

    r84063 r89582  
    1919#include <QApplication>
    2020#include <QObject>
     21#include <QPalette>
    2122
    2223/* GUI includes: */
     
    99100        return formatErrorInfo(comErrorInfo);
    100101    /* Handle NULL error-info otherwise: */
    101     return QString("<table bgcolor=#EEEEEE border=0 cellspacing=5 cellpadding=0 width=100%>"
    102                    "<tr><td>%1</td><td><tt>%2</tt></td></tr></table>")
     102    return QString("<table bgcolor=%1 border=0 cellspacing=5 cellpadding=0 width=100%>"
     103                   "<tr><td>%2</td><td><tt>%3</tt></td></tr></table>")
     104                   .arg(QApplication::palette().color(QPalette::Active, QPalette::Window).name(QColor::HexRgb))
    103105                   .arg(QApplication::translate("UIErrorString", "Result&nbsp;Code: ", "error info"))
    104106                   .arg(formatRCFull(comProgress.GetResultCode()))
     
    152154    }
    153155
    154     strFormatted += "<!--EOM--><table bgcolor=#EEEEEE border=0 cellspacing=5 "
    155                     "cellpadding=0 width=100%>";
     156    strFormatted += QString("<!--EOM--><table bgcolor=%1 border=0 cellspacing=5 cellpadding=0 width=100%>")
     157                            .arg(QApplication::palette().color(QPalette::Active, QPalette::Window).name(QColor::HexRgb));
    156158
    157159    bool fHaveResultCode = false;
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r88247 r89582  
    25722572        formatted.prepend(QString("<p>%1.</p>").arg(uiCommon().emphasize(strErrorMsg)));
    25732573    if (!strErrorId.isEmpty())
    2574         formatted += QString("<table bgcolor=#EEEEEE border=0 cellspacing=5 "
     2574        formatted += QString("<table bgcolor=%1 border=0 cellspacing=5 "
    25752575                             "cellpadding=0 width=100%>"
    2576                              "<tr><td>%1</td><td>%2</td></tr>"
    2577                              "<tr><td>%3</td><td>%4</td></tr>"
     2576                             "<tr><td>%2</td><td>%3</td></tr>"
     2577                             "<tr><td>%4</td><td>%5</td></tr>"
    25782578                             "</table>")
     2579                             .arg(QApplication::palette().color(QPalette::Active, QPalette::Window).name(QColor::HexRgb))
    25792580                             .arg(tr("<nobr>Error ID: </nobr>", "runtime error info"), strErrorId)
    25802581                             .arg(tr("Severity: ", "runtime error info"), severity);
Note: See TracChangeset for help on using the changeset viewer.

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