- Timestamp:
- Sep 10, 2019 11:38:18 AM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm
r76553 r80696 27 27 #import <AppKit/NSFont.h> 28 28 #import <AppKit/NSScreen.h> 29 #import <AppKit/NSScroller.h> 29 30 #import <AppKit/NSWindow.h> 30 31 #import <AppKit/NSImageView.h> … … 261 262 if ([NSScreen respondsToSelector: @selector(screensHaveSeparateSpaces)]) 262 263 return [NSScreen performSelector: @selector(screensHaveSeparateSpaces)]; 264 else 265 return false; 266 } 267 268 bool darwinIsScrollerStyleOverlay() 269 { 270 /* Check whether scrollers by default have legacy style. 271 * This method is available since 10.7 only. */ 272 if ([NSScroller respondsToSelector: @selector(preferredScrollerStyle)]) 273 { 274 const int enmType = (int)(intptr_t)[NSScroller performSelector: @selector(preferredScrollerStyle)]; 275 return enmType == NSScrollerStyleOverlay; 276 } 263 277 else 264 278 return false; -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.h
r76581 r80696 115 115 SHARED_LIBRARY_STUFF bool darwinIsOnActiveSpace(NativeNSWindowRef pWindow); 116 116 SHARED_LIBRARY_STUFF bool darwinScreensHaveSeparateSpaces(); 117 SHARED_LIBRARY_STUFF bool darwinIsScrollerStyleOverlay(); 117 118 118 119 bool darwinOpenFile(NativeNSStringRef pstrFile); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsScrollArea.cpp
r80695 r80696 23 23 #include "UIGraphicsScrollArea.h" 24 24 #include "UIGraphicsScrollBar.h" 25 #ifdef VBOX_WS_MAC 26 # include "VBoxUtils.h" 27 #endif 25 28 26 29 … … 245 248 void UIGraphicsScrollArea::prepareWidgets() 246 249 { 250 #ifdef VBOX_WS_MAC 251 /* Check whether scroll-bar is in auto-hide (overlay) mode: */ 252 m_fAutoHideMode = darwinIsScrollerStyleOverlay(); 253 #endif 254 247 255 /* Create scroll-bar: */ 248 256 m_pScrollBar = new UIGraphicsScrollBar(m_enmOrientation, m_fAutoHideMode, this);
Note:
See TracChangeset
for help on using the changeset viewer.