Changeset 47694 in vbox for trunk/src/VBox
- Timestamp:
- Aug 13, 2013 1:12:05 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp
r47634 r47694 40 40 , m_fShown(false) 41 41 , m_pShowAnimation(0) 42 , m_fHovered(false) 42 , m_fCanLooseFocus(!m_buttonDescriptions.isEmpty()) 43 , m_fFocused(!m_fCanLooseFocus) 44 , m_fHovered(m_fFocused) 43 45 , m_iDefaultOpacity(180) 44 46 , m_iHoveredOpacity(250) 45 , m_iOpacity(m_iDefaultOpacity) 46 , m_fFocused(false) 47 , m_iOpacity(m_fHovered ? m_iHoveredOpacity : m_iDefaultOpacity) 47 48 , m_pTextPane(0), m_pButtonPane(0) 48 49 { … … 227 228 { 228 229 /* Create message-label: */ 229 m_pTextPane = new UIPopupPaneTextPane(this, m_strMessage, m_fProposeAutoConfirmation );230 m_pTextPane = new UIPopupPaneTextPane(this, m_strMessage, m_fProposeAutoConfirmation, m_fFocused); 230 231 { 231 232 /* Prepare label: */ … … 265 266 /* Install 'hover' animation for 'opacity' property: */ 266 267 UIAnimation::installPropertyAnimation(this, "opacity", "defaultOpacity", "hoveredOpacity", 267 SIGNAL(sigHoverEnter()), SIGNAL(sigHoverLeave()) );268 SIGNAL(sigHoverEnter()), SIGNAL(sigHoverLeave()), m_fHovered); 268 269 } 269 270 … … 340 341 { 341 342 /* Unhocus pane if focused: */ 342 if (m_f Focused)343 if (m_fCanLooseFocus && m_fFocused) 343 344 { 344 345 m_fFocused = false; -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h
r47633 r47694 161 161 QSize m_shownSizeHint; 162 162 163 /* Variables: Focus stuff: */ 164 bool m_fCanLooseFocus; 165 bool m_fFocused; 166 163 167 /* Variables: Hover stuff: */ 164 168 bool m_fHovered; … … 166 170 const int m_iHoveredOpacity; 167 171 int m_iOpacity; 168 169 /* Variables: Focus stuff: */170 bool m_fFocused;171 172 172 173 /* Widgets: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneTextPane.cpp
r47455 r47694 26 26 #include "UIAnimationFramework.h" 27 27 28 UIPopupPaneTextPane::UIPopupPaneTextPane(QWidget *pParent, const QString &strText, bool fProposeAutoConfirmation) 28 UIPopupPaneTextPane::UIPopupPaneTextPane(QWidget *pParent, const QString &strText, 29 bool fProposeAutoConfirmation, bool fFocused) 29 30 : QIWithRetranslateUI<QWidget>(pParent) 30 31 , m_iLayoutMargin(0) … … 35 36 , m_pAutoConfirmCheckBox(0) 36 37 , m_fProposeAutoConfirmation(fProposeAutoConfirmation) 37 , m_fFocused(f alse)38 , m_fFocused(fFocused) 38 39 , m_pAnimation(0) 39 40 { … … 219 220 /* Install geometry animation for 'minimumSizeHint' property: */ 220 221 m_pAnimation = UIAnimation::installPropertyAnimation(this, "minimumSizeHint", "collapsedSizeHint", "expandedSizeHint", 221 SIGNAL(sigFocusEnter()), SIGNAL(sigFocusLeave()) );222 SIGNAL(sigFocusEnter()), SIGNAL(sigFocusLeave()), m_fFocused); 222 223 } 223 224 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneTextPane.h
r47455 r47694 51 51 52 52 /* Constructor: */ 53 UIPopupPaneTextPane(QWidget *pParent, const QString &strText, bool fProposeAutoConfirmation); 53 UIPopupPaneTextPane(QWidget *pParent, const QString &strText, 54 bool fProposeAutoConfirmation, bool fFocused); 54 55 55 56 /* API: Text stuff: */
Note:
See TracChangeset
for help on using the changeset viewer.