Changeset 77829 in vbox
- Timestamp:
- Mar 21, 2019 3:55:55 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp
r77827 r77829 231 231 , m_iAnimatedValue(m_iDefaultValue) 232 232 , m_pDisabledEffect(0) 233 , m_iPreviousMinimumWidthHint(0)234 233 , m_enmDragTokenPlace(UIChooserItemDragToken_Off) 235 234 , m_iDragTokenDarkness(110) … … 423 422 if (parentItem()) 424 423 parentItem()->updateGeometry(); 425 426 /* Special handling for root-items: */427 if (isRoot())428 {429 /* Root-item should notify chooser-view if minimum-width-hint was changed: */430 const int iMinimumWidthHint = minimumWidthHint();431 if (m_iPreviousMinimumWidthHint != iMinimumWidthHint)432 {433 /* Save new minimum-width-hint, notify listener: */434 m_iPreviousMinimumWidthHint = iMinimumWidthHint;435 emit sigMinimumWidthHintChanged(m_iPreviousMinimumWidthHint);436 }437 }438 424 } 439 425 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.h
r77827 r77829 81 81 /** Notifies listeners about hover leave. */ 82 82 void sigHoverLeave(); 83 /** @} */84 85 /** @name Layout stuff.86 * @{ */87 /** Notifies listeners about @a iMinimumWidthHint change. */88 void sigMinimumWidthHintChanged(int iMinimumWidthHint);89 83 /** @} */ 90 84 … … 341 335 /** Holds previous geometry. */ 342 336 QRectF m_previousGeometry; 343 344 /** Holds previous minimum width hint. */345 int m_iPreviousMinimumWidthHint;346 337 /** @} */ 347 338 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
r77827 r77829 61 61 , m_pLayoutGroup(0) 62 62 , m_pLayoutMachine(0) 63 , m_iPreviousMinimumWidthHint(0) 63 64 { 64 65 prepare(); … … 82 83 , m_pLayoutGroup(0) 83 84 , m_pLayoutMachine(0) 85 , m_iPreviousMinimumWidthHint(0) 84 86 { 85 87 prepare(); … … 568 570 /* Call to base-class: */ 569 571 UIChooserItem::updateGeometry(); 572 573 /* Special handling for root-groups: */ 574 if (isRoot()) 575 { 576 /* Root-group should notify chooser-view if minimum-width-hint was changed: */ 577 const int iMinimumWidthHint = minimumWidthHint(); 578 if (m_iPreviousMinimumWidthHint != iMinimumWidthHint) 579 { 580 /* Save new minimum-width-hint, notify listener: */ 581 m_iPreviousMinimumWidthHint = iMinimumWidthHint; 582 emit sigMinimumWidthHintChanged(m_iPreviousMinimumWidthHint); 583 } 584 } 570 585 } 571 586 … … 1188 1203 this, &UIChooserItemGroup::sltHandleWindowRemapped); 1189 1204 } 1205 1206 /* Invalidate minimum width hint 1207 * after we isntalled listener: */ 1208 m_iPreviousMinimumWidthHint = 0; 1209 /* Update geometry finally: */ 1210 updateGeometry(); 1190 1211 } 1191 1212 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.h
r77826 r77829 51 51 /** @} */ 52 52 53 /** @name Layout stuff. 54 * @{ */ 55 /** Notifies listeners about @a iMinimumWidthHint change. */ 56 void sigMinimumWidthHintChanged(int iMinimumWidthHint); 57 /** @} */ 58 53 59 public: 54 60 … … 363 369 /** @name Layout stuff. 364 370 * @{ */ 371 /** Holds previous minimum width hint. */ 372 int m_iPreviousMinimumWidthHint; 373 365 374 /** Holds cached visible name size. */ 366 375 QSize m_visibleNameSize;
Note:
See TracChangeset
for help on using the changeset viewer.