VirtualBox

Changeset 74685 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 8, 2018 3:31:17 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: VirtualBox Manager: Details pane: Adjusting color tones for macOS.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r74596 r74685  
    376376    setAutoFillBackground(true);
    377377    QPalette pal = palette();
    378     QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(155);
     378#ifdef VBOX_WS_MAC
     379    const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(145);
     380#else
     381    const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(155);
     382#endif
    379383    pal.setColor(QPalette::Window, color);
    380384    setPalette(pal);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp

    r74118 r74685  
    4747    , m_pSet(pParent)
    4848    , m_enmType(enmType)
    49     , m_iLightnessToneStart(155)
    50     , m_iLightnessToneFinal(175)
     49#ifdef VBOX_WS_MAC
     50    , m_iDefaultToneStart(145)
     51    , m_iDefaultToneFinal(155)
     52    , m_iHoverToneStart(115)
     53    , m_iHoverToneFinal(125)
     54#else
     55    , m_iDefaultToneStart(160)
     56    , m_iDefaultToneFinal(190)
     57    , m_iHoverToneStart(160)
     58    , m_iHoverToneFinal(190)
     59#endif
    5160    , m_fHovered(false)
    5261    , m_fNameHovered(false)
     
    665674    /* Paint default background: */
    666675    const QColor defaultColor = pal.color(QPalette::Active, QPalette::Mid);
    667     const QColor dcTone1 = defaultColor.lighter(m_iLightnessToneFinal);
    668     const QColor dcTone2 = defaultColor.lighter(m_iLightnessToneStart);
     676    const QColor dcTone1 = defaultColor.lighter(m_iDefaultToneFinal);
     677    const QColor dcTone2 = defaultColor.lighter(m_iDefaultToneStart);
    669678    QLinearGradient gradientDefault(fullRect.topLeft(), fullRect.bottomLeft());
    670679    gradientDefault.setColorAt(0, dcTone1);
     
    677686        /* Paint hovered background: */
    678687        const QColor hoveredColor = pal.color(QPalette::Active, QPalette::Highlight);
    679         QColor hcTone1 = hoveredColor.lighter(m_iLightnessToneFinal);
    680         QColor hcTone2 = hoveredColor.lighter(m_iLightnessToneStart);
     688        QColor hcTone1 = hoveredColor.lighter(m_iHoverToneFinal);
     689        QColor hcTone2 = hoveredColor.lighter(m_iHoverToneStart);
    681690        hcTone1.setAlpha(m_iAnimatedValue);
    682691        hcTone2.setAlpha(m_iAnimatedValue);
     
    705714
    706715    /* Paint frame: */
    707     const QColor frameColor = palette().color(QPalette::Active, QPalette::Mid);
    708     pPainter->setPen(frameColor.lighter(m_iLightnessToneStart));
     716    const QColor strokeColor = palette().color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultToneStart);
     717    QPen pen(strokeColor);
     718    pen.setWidth(0);
     719    pPainter->setPen(pen);
    709720    pPainter->drawRect(fullRect);
    710721
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.h

    r74118 r74685  
    307307        QFont  m_textFont;
    308308
    309         /** Holds the start lightness tone. */
    310         int m_iLightnessToneStart;
    311         /** Holds the final lightness tone. */
    312         int m_iLightnessToneFinal;
     309        /** Holds the start default tone. */
     310        int m_iDefaultToneStart;
     311        /** Holds the final default tone. */
     312        int m_iDefaultToneFinal;
     313        /** Holds the start hover tone. */
     314        int m_iHoverToneStart;
     315        /** Holds the final hover tone. */
     316        int m_iHoverToneFinal;
    313317
    314318        /** Holds whether element is hovered. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp

    r74111 r74685  
    317317
    318318    /* Paint default background: */
    319     const QColor defaultColor = palette().color(QPalette::Active, QPalette::Midlight).darker(110);
     319#ifdef VBOX_WS_MAC
     320    const QColor defaultColor = palette().color(QPalette::Active, QPalette::Mid).lighter(145);
     321#else
     322    const QColor defaultColor = palette().color(QPalette::Active, QPalette::Mid).lighter(155);
     323#endif
    320324    pPainter->fillRect(optionRect, defaultColor);
    321325
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