VirtualBox

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


Ignore:
Timestamp:
Nov 24, 2011 1:44:33 PM (13 years ago)
Author:
vboxsync
Message:

FE/Qt: 5978: Rework mini-toolbar visual representation: Disabling mini-toolbar alpha-mask.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r38348 r39408  
    391391    {
    392392        /* Get mini-toolbar mask: */
    393         QRegion toolBarRegion(m_pMiniToolBar->mask());
     393        QRegion toolBarRegion(m_pMiniToolBar->rect());
    394394
    395395        /* Move mini-toolbar mask to mini-toolbar position: */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMiniToolBar.cpp

    r35867 r39408  
    77
    88/*
    9  * Copyright (C) 2009-2010 Oracle Corporation
     9 * Copyright (C) 2009-2011 Oracle Corporation
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    6767    setVisible(false);
    6868
    69     /* Left margin of tool-bar: */
    70     m_Margins << widgetForAction(addWidget(new QWidget(this)));
    71 
    7269    /* Add pushpin: */
    7370    m_pAutoHideAction = new QAction(this);
     
    117114    connect(m_pCloseAction, SIGNAL(triggered()), this, SIGNAL(closeAction()));
    118115    addAction(m_pCloseAction);
    119 
    120     /* Right margin of tool-bar: */
    121     m_Margins << widgetForAction(addWidget(new QWidget(this)));
    122116
    123117    /* Event-filter for parent widget to control resize: */
     
    334328    if (!m_fPolished)
    335329    {
    336         /* Tool-bar margins: */
    337         foreach(QWidget *pMargin, m_Margins)
    338             pMargin->setMinimumWidth(height());
    339 
    340330        /* Tool-bar spacings: */
    341331        foreach(QWidget *pSpacing, m_Spacings)
     
    381371
    382372    /* Update geometry: */
    383     recreateMask();
    384373    moveToBase();
    385 }
    386 
    387 /* Recreate mini-toolbar mask */
    388 void VBoxMiniToolBar::recreateMask()
    389 {
    390     int iEdgeShift = height();
    391     int iPoints[8];
    392     switch (m_alignment)
    393     {
    394         case AlignTop:
    395         {
    396             iPoints[0] = 0;
    397             iPoints[1] = 0;
    398 
    399             iPoints[2] = iEdgeShift;
    400             iPoints[3] = height();
    401 
    402             iPoints[4] = width() - iEdgeShift;
    403             iPoints[5] = height();
    404 
    405             iPoints[6] = width();
    406             iPoints[7] = 0;
    407 
    408             break;
    409         }
    410         case AlignBottom:
    411         {
    412             iPoints[0] = iEdgeShift;
    413             iPoints[1] = 0;
    414 
    415             iPoints[2] = 0;
    416             iPoints[3] = height();
    417 
    418             iPoints[4] = width();
    419             iPoints[5] = height();
    420 
    421             iPoints[6] = width() - iEdgeShift;
    422             iPoints[7] = 0;
    423 
    424             break;
    425         }
    426         default:
    427             break;
    428     }
    429     /* Make sure any old mask is removed first: */
    430     clearMask();
    431     /* Set the new mask */
    432     QPolygon polygon;
    433     polygon.setPoints(4, iPoints);
    434     setMask(polygon);
    435374}
    436375
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMiniToolBar.h

    r33540 r39408  
    66
    77/*
    8  * Copyright (C) 2009-2010 Oracle Corporation
     8 * Copyright (C) 2009-2011 Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    7979
    8080    void initialize();
    81     void recreateMask();
    8281    void moveToBase();
    8382    void setMouseTrackingEnabled(bool fEnabled);
     
    104103
    105104    /* Lists of used spacers */
    106     QList<QWidget*> m_Margins;
    107105    QList<QWidget*> m_Spacings;
    108106    QList<QWidget*> m_LabelMargins;
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