VirtualBox

Changeset 95082 in vbox


Ignore:
Timestamp:
May 24, 2022 6:06:45 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt/Ds: macOS: A bit of utility stuff for measuring cocoa titlebar height.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm

    r95078 r95082  
    405405
    406406    return toolbarHeight;
     407}
     408
     409int darwinWindowTitleHeight(NativeNSWindowRef pWindow)
     410{
     411    NSView *pSuperview = [[pWindow standardWindowButton:NSWindowCloseButton] superview];
     412    NSSize sz = [pSuperview frame].size;
     413    return sz.height;
    407414}
    408415
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp

    r95078 r95082  
    213213    NOREF(pWidget);
    214214    return 0;
     215}
     216
     217int darwinWindowTitleHeight(QWidget *pWidget)
     218{
     219    return ::darwinWindowTitleHeight(::darwinToNativeWindow(pWidget));
    215220}
    216221
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.h

    r95078 r95082  
    105105void darwinWindowInvalidateShadowImpl(NativeNSWindowRef pWindow);
    106106int  darwinWindowToolBarHeight(NativeNSWindowRef pWindow);
     107SHARED_LIBRARY_STUFF int darwinWindowTitleHeight(NativeNSWindowRef pWindow);
    107108bool darwinIsToolbarVisible(NativeNSWindowRef pWindow);
    108109SHARED_LIBRARY_STUFF bool darwinIsWindowMaximized(NativeNSWindowRef pWindow);
     
    280281void darwinWindowInvalidateShadow(QWidget *pWidget);
    281282int  darwinWindowToolBarHeight(QWidget *pWidget);
     283SHARED_LIBRARY_STUFF int darwinWindowTitleHeight(QWidget *pWidget);
    282284bool darwinIsToolbarVisible(QToolBar *pToolBar);
    283285SHARED_LIBRARY_STUFF bool darwinIsWindowMaximized(QWidget *pWidget);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette