Changeset 39408 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 24, 2011 1:44:33 PM (13 years ago)
- 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 391 391 { 392 392 /* Get mini-toolbar mask: */ 393 QRegion toolBarRegion(m_pMiniToolBar-> mask());393 QRegion toolBarRegion(m_pMiniToolBar->rect()); 394 394 395 395 /* Move mini-toolbar mask to mini-toolbar position: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMiniToolBar.cpp
r35867 r39408 7 7 8 8 /* 9 * Copyright (C) 2009-201 0Oracle Corporation9 * Copyright (C) 2009-2011 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 67 67 setVisible(false); 68 68 69 /* Left margin of tool-bar: */70 m_Margins << widgetForAction(addWidget(new QWidget(this)));71 72 69 /* Add pushpin: */ 73 70 m_pAutoHideAction = new QAction(this); … … 117 114 connect(m_pCloseAction, SIGNAL(triggered()), this, SIGNAL(closeAction())); 118 115 addAction(m_pCloseAction); 119 120 /* Right margin of tool-bar: */121 m_Margins << widgetForAction(addWidget(new QWidget(this)));122 116 123 117 /* Event-filter for parent widget to control resize: */ … … 334 328 if (!m_fPolished) 335 329 { 336 /* Tool-bar margins: */337 foreach(QWidget *pMargin, m_Margins)338 pMargin->setMinimumWidth(height());339 340 330 /* Tool-bar spacings: */ 341 331 foreach(QWidget *pSpacing, m_Spacings) … … 381 371 382 372 /* Update geometry: */ 383 recreateMask();384 373 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);435 374 } 436 375 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMiniToolBar.h
r33540 r39408 6 6 7 7 /* 8 * Copyright (C) 2009-201 0Oracle Corporation8 * Copyright (C) 2009-2011 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 79 79 80 80 void initialize(); 81 void recreateMask();82 81 void moveToBase(); 83 82 void setMouseTrackingEnabled(bool fEnabled); … … 104 103 105 104 /* Lists of used spacers */ 106 QList<QWidget*> m_Margins;107 105 QList<QWidget*> m_Spacings; 108 106 QList<QWidget*> m_LabelMargins;
Note:
See TracChangeset
for help on using the changeset viewer.