Changeset 25001 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 26, 2009 2:24:29 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 55309
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxApplianceEditorWgt.h
r19149 r25001 211 211 return size; 212 212 } 213 214 protected: 215 #ifdef QT_MAC_USE_COCOA 216 bool eventFilter (QObject *aObject, QEvent *aEvent); 217 #endif /* QT_MAC_USE_COCOA */ 218 213 219 private: 214 220 /* Private member vars */ -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxOSTypeSelectorButton.h
r16736 r25001 24 24 #define __VBoxOSTypeSelectorButton_h__ 25 25 26 /* VBox includes */ 26 27 #include "QIWithRetranslateUI.h" 27 28 29 /* Qt includes */ 28 30 #include <QPushButton> 29 31 … … 38 40 QString osTypeId() const { return mOSTypeId; } 39 41 42 bool isMenuShown() const; 43 40 44 void retranslateUi(); 41 45 … … 46 50 void populateMenu(); 47 51 52 /* Private member vars */ 48 53 QString mOSTypeId; 49 54 QMenu *mMainMenu; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxApplianceEditorWgt.cpp
r24766 r25001 357 357 * the button hasn't a rectangle shape. This prevents the 358 358 * display of parts from the current text on the Mac. */ 359 #ifdef QT_MAC_USE_COCOA 360 /* Use the palette from the tree view, not the one from the 361 * editor. */ 362 QPalette p = e->palette(); 363 p.setBrush (QPalette::Highlight, aParent->palette().brush (QPalette::Highlight)); 364 e->setPalette(p); 365 #endif /* QT_MAC_USE_COCOA */ 359 366 e->setAutoFillBackground (true); 360 367 e->setBackgroundRole (QPalette::Highlight); … … 890 897 aEditor->setGeometry (aOption.rect); 891 898 } 899 900 #ifdef QT_MAC_USE_COCOA 901 bool VirtualSystemDelegate::eventFilter (QObject *aObject, QEvent *aEvent) 902 { 903 if (aEvent->type() == QEvent::FocusOut) 904 { 905 /* On Mac OS X Cocoa the OS type selector widget loses it focus when 906 * the popup menu is shown. Prevent this here, cause otherwise the new 907 * selected OS will not be updated. */ 908 VBoxOSTypeSelectorButton *button = qobject_cast<VBoxOSTypeSelectorButton*> (aObject); 909 if (button && button->isMenuShown()) 910 return false; 911 /* The same counts for the text edit buttons of the license or 912 * description fields. */ 913 else if (qobject_cast<VBoxLineTextEdit*> (aObject)) 914 return false; 915 } 916 917 return QItemDelegate::eventFilter (aObject, aEvent); 918 } 919 #endif /* QT_MAC_USE_COCOA */ 892 920 893 921 //////////////////////////////////////////////////////////////////////////////// -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxOSTypeSelectorButton.cpp
r16736 r25001 21 21 */ 22 22 23 /* VBox includes */ 23 24 #include "VBoxOSTypeSelectorButton.h" 24 25 #include "VBoxGlobal.h" 25 26 27 /* Qt includes */ 26 28 #include <QMenu> 27 29 #include <QSignalMapper> … … 56 58 } 57 59 60 bool VBoxOSTypeSelectorButton::isMenuShown() const 61 { 62 return mMainMenu->isVisible(); 63 } 64 58 65 void VBoxOSTypeSelectorButton::retranslateUi() 59 66 {
Note:
See TracChangeset
for help on using the changeset viewer.