VirtualBox

Changeset 74690 in vbox for trunk


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

FE/Qt: bugref:9241: VirtualBox Manager: Details pane: No layout margin/spacing for UIDetailsGroup at all (s.a. r125600).

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

Legend:

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

    r74686 r74690  
    105105{
    106106    /* Prepare variables: */
    107     const int iSpacing = data(GroupData_Spacing).toInt();
    108107    const int iMaximumWidth = geometry().size().toSize().width();
    109108    int iVerticalIndent = 0;
     
    123122        pItem->updateLayout();
    124123        /* Advance indent: */
    125         iVerticalIndent += (pItem->minimumHeightHint() + iSpacing);
     124        iVerticalIndent += pItem->minimumHeightHint();
    126125    }
    127126}
     
    153152{
    154153    /* Prepare variables: */
    155     const int iMargin = data(GroupData_Margin).toInt();
    156     const int iSpacing = data(GroupData_Spacing).toInt();
    157154    int iMinimumHeightHint = 0;
    158155    bool fHasItems = false;
     
    166163                continue;
    167164        /* And take into account all the others: */
    168         iMinimumHeightHint += (pItem->minimumHeightHint() + iSpacing);
     165        iMinimumHeightHint += pItem->minimumHeightHint();
    169166        if (!fHasItems)
    170167            fHasItems = true;
    171168    }
    172     /* Minus last spacing: */
    173     if (fHasItems)
    174         iMinimumHeightHint -= iSpacing;
    175 
    176     /* Add two margins finally: */
    177     if (fHasItems)
    178         iMinimumHeightHint += 2 * iMargin;
    179169
    180170    /* Return result: */
     
    293283}
    294284
    295 QVariant UIDetailsGroup::data(int iKey) const
    296 {
    297     /* Provide other members with required data: */
    298     switch (iKey)
    299     {
    300         /* Layout hints: */
    301         case GroupData_Margin: return QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize) / 6;
    302         case GroupData_Spacing: return QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize) / 6;
    303         /* Default: */
    304         default: break;
    305     }
    306     return QVariant();
    307 }
    308 
    309285void UIDetailsGroup::paintBackground(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const
    310286{
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.h

    r74110 r74690  
    126126private:
    127127
    128     /** Data field types. */
    129     enum GroupItemData
    130     {
    131         /* Layout hints: */
    132         GroupData_Margin,
    133         GroupData_Spacing
    134     };
    135 
    136128    /** @name Prepare/cleanup cascade.
    137129      * @{ */
    138130        /** Prepares connections. */
    139131        void prepareConnections();
    140     /** @} */
    141 
    142     /** @name Item stuff.
    143       * @{ */
    144         /** Returns abstractly stored data value for certain @a iKey. */
    145         QVariant data(int iKey) const;
    146132    /** @} */
    147133
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