VirtualBox

Changeset 74079 in vbox


Ignore:
Timestamp:
Sep 5, 2018 11:40:11 AM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: VirtualBox Manager UI: Chooser pane re-styling: Group item: Hovering animation cleanup as well (s.a. r124840).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
Files:
2 edited

Legend:

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

    r74078 r74079  
    5353    , m_fClosed(false)
    5454    , m_iAdditionalHeight(0)
    55     , m_iCornerRadius(0)
    56     , m_iBlackoutDarkness(0)
     55    , m_iHeaderDarkness(110)
    5756    , m_pToggleButton(0)
    5857    , m_pEnterButton(0)
     
    8584    , m_fClosed(pCopyFrom->isClosed())
    8685    , m_iAdditionalHeight(0)
    87     , m_iCornerRadius(0)
    88     , m_iBlackoutDarkness(0)
     86    , m_iHeaderDarkness(110)
    8987    , m_strName(pCopyFrom->name())
    9088    , m_pToggleButton(0)
     
    121119    , m_fClosed(!fOpened)
    122120    , m_iAdditionalHeight(0)
    123     , m_iCornerRadius(0)
    124     , m_iBlackoutDarkness(0)
     121    , m_iHeaderDarkness(110)
    125122    , m_strName(strName)
    126123    , m_pToggleButton(0)
     
    168165    , m_fClosed(pCopyFrom->isClosed())
    169166    , m_iAdditionalHeight(0)
    170     , m_iCornerRadius(0)
    171     , m_iBlackoutDarkness(0)
     167    , m_iHeaderDarkness(110)
    172168    , m_strName(pCopyFrom->name())
    173169    , m_pToggleButton(0)
     
    12071203void UIChooserItemGroup::prepare()
    12081204{
    1209     /* Buttons: */
    1210     m_pToggleButton = 0;
    1211     m_pEnterButton = 0;
    1212     m_pExitButton = 0;
    1213     /* Name editor: */
    1214     m_pNameEditorWidget = 0;
    1215     m_pNameEditor = 0;
    12161205    /* Painting stuff: */
    1217     m_iAdditionalHeight = 0;
    1218     m_iCornerRadius = 10;
    1219     m_iBlackoutDarkness = 110;
    12201206    m_nameFont = font();
    12211207    m_nameFont.setWeight(QFont::Bold);
     
    16481634                                   model()->currentItems().contains(this) ?
    16491635                                   QPalette::Highlight : QPalette::Midlight);
    1650     QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(blackoutDarkness());
     1636    QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(headerDarkness());
    16511637
    16521638    /* Root-item: */
     
    16711657            /* Fill background: */
    16721658            QLinearGradient headerGradient(headerRect.bottomLeft(), headerRect.topLeft());
    1673             headerGradient.setColorAt(1, headerColor.darker(blackoutDarkness()));
     1659            headerGradient.setColorAt(1, headerColor.darker(headerDarkness()));
    16741660            headerGradient.setColorAt(0, headerColor.darker(animatedValue()));
    16751661            pPainter->fillRect(headerRect, headerGradient);
     
    16901676        QLinearGradient tGradient(tRect.bottomLeft(), tRect.topLeft());
    16911677        tGradient.setColorAt(1, headerColor.darker(animatedValue()));
    1692         tGradient.setColorAt(0, headerColor.darker(blackoutDarkness()));
     1678        tGradient.setColorAt(0, headerColor.darker(headerDarkness()));
    16931679        /* Fill top rectangle: */
    16941680        pPainter->fillRect(tRect, tGradient);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.h

    r74002 r74079  
    263263        bool isMainRoot() const { return m_fMainRoot; }
    264264
    265         /** Returns blackout item darkness. */
    266         int blackoutDarkness() const { return m_iBlackoutDarkness; }
     265        /** Returns item's header darkness. */
     266        int headerDarkness() const { return m_iHeaderDarkness; }
    267267
    268268        /** Defines @a iAdditionalHeight. */
     
    324324        /** Holds aditional height. */
    325325        int  m_iAdditionalHeight;
    326         /** Holds corner radious. */
    327         int  m_iCornerRadius;
    328         /** Holds blackout item darkness. */
    329         int  m_iBlackoutDarkness;
     326        /** Holds the header darkness. */
     327        int  m_iHeaderDarkness;
    330328
    331329        /** Holds the cached name. */
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