Changeset 52593 in vbox
- Timestamp:
- Sep 4, 2014 1:09:58 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm
r51275 r52593 184 184 [pWindow setHasShadow:YES]; 185 185 } 186 } 187 188 void darwinSetWindowHasShadow(NativeNSWindowRef pWindow, bool fEnabled) 189 { 190 if (fEnabled) 191 [pWindow setHasShadow :YES]; 192 else 193 [pWindow setHasShadow :NO]; 186 194 } 187 195 -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp
r51130 r52593 82 82 { 83 83 ::darwinSetShowsWindowTransparentImpl(::darwinToNativeWindow(pWidget), fEnabled); 84 } 85 86 void darwinSetWindowHasShadow(QWidget *pWidget, bool fEnabled) 87 { 88 ::darwinSetWindowHasShadow(::darwinToNativeWindow(pWidget), fEnabled); 84 89 } 85 90 -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.h
r51130 r52593 62 62 void darwinLabelWindow(NativeNSWindowRef pWindow, NativeNSImageRef pImage, bool fCenter); 63 63 void darwinSetShowsWindowTransparentImpl(NativeNSWindowRef pWindow, bool fEnabled); 64 void darwinSetWindowHasShadow(NativeNSWindowRef pWindow, bool fEnabled); 64 65 void darwinSetMouseCoalescingEnabled(bool fEnabled); 65 66 … … 229 230 void darwinSetHidesAllTitleButtons(QWidget *pWidget); 230 231 void darwinSetShowsWindowTransparent(QWidget *pWidget, bool fEnabled); 232 void darwinSetWindowHasShadow(QWidget *pWidget, bool fEnabled); 231 233 void darwinSetDockIconMenu(QMenu *pMenu); 232 234 void darwinDisableIconsInMenus(void); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISlidingToolBar.cpp
r52480 r52593 264 264 } 265 265 266 bool UISlidingToolBar::event(QEvent *pEvent) 267 { 268 /* Depending on event-type: */ 269 switch (pEvent->type()) 270 { 271 case QEvent::Resize: 272 case QEvent::WindowActivate: 273 { 274 /* By some strange reason 275 * cocoa resets NSWindow::setHasShadow option 276 * for frameless windows on every window resize/activation. 277 * So we have to make sure window still has no shadows. */ 278 darwinSetWindowHasShadow(this, false); 279 break; 280 } 281 default: 282 break; 283 } 284 /* Call to base-class: */ 285 return QWidget::event(pEvent); 286 } 287 266 288 void UISlidingToolBar::setWidgetGeometry(const QRect &rect) 267 289 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISlidingToolBar.h
r52402 r52593 93 93 /** Close event handler. */ 94 94 virtual void closeEvent(QCloseEvent *pEvent); 95 /** Common event handler. */ 96 virtual bool event(QEvent *pEvent); 95 97 96 98 /** Defines mdi-sub-window geometry. */
Note:
See TracChangeset
for help on using the changeset viewer.