bitsdojo_window icon indicating copy to clipboard operation
bitsdojo_window copied to clipboard

Can't hide system buttons on macOS Catalina 10.15.6

Open emillics opened this issue 3 years ago • 7 comments

After I changed the swift code by following the instruction, it stil displayed the three system buttons on the left top side of the window.The system is macOS Catalina 10.15.6

emillics avatar Mar 20 '21 12:03 emillics

Have the same bug on Big Sure 11.2.3

MaximRyabovol avatar Mar 31 '21 08:03 MaximRyabovol

I guess this plugins was designed this way,

You can edit following file and add code bellow to hide system icon,

bitsdojo_window/bitsdojo_window_macos/macos/Classes/BitsdojoWindow.swift

if hasCustomFrame {
        localStyle.insert(.fullSizeContentView)
        self.styleMask = localStyle;
        self.titlebarAppearsTransparent = true
        self.titleVisibility = .hidden
        self.styleMask.remove(.closable)
        self.styleMask.remove(.fullScreen)
        self.styleMask.remove(.miniaturizable)
        self.styleMask.remove(.resizable)
        self.isOpaque = false
        self.isMovable = false
}

atik7 avatar Apr 07 '21 12:04 atik7

@bitsdojo Could you please help to confirm this issue?

ThangD avatar Aug 05 '21 09:08 ThangD

System buttons are not hidden in the current version but support for doing this from Dart is coming with the next update.

bitsdojo avatar Aug 13 '21 09:08 bitsdojo

[13 Aug 2021] System buttons are not hidden in the current version but support for doing this from Dart is coming with the next update.

Is this still a 'work in progress'?

AncientPixel avatar Sep 09 '22 07:09 AncientPixel

In my multi platform desktop application I found the following settings in: {project_root}/macos/Runner/Base.lproj/MainMenu.xib

<window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target">
    <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
    <rect key="contentRect" x="335" y="390" width="800" height="600"/>
    <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/>
    <view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
        <rect key="frame" x="0.0" y="0.0" width="800" height="600"/>
        <autoresizingMask key="autoresizingMask"/>
    </view>
</window>

Changing the closable, miniaturizable and resizable properties to NO removed the system buttons.

@bitsdojo I believe this issue should be closed.


I am on OSX 13.0.1, with Flutter:

Flutter 3.7.7 • channel stable • https://github.com/flutter/flutter.git Framework • revision 2ad6cd72c0 (2 weeks ago) • 2023-03-08 09:41:59 -0800 Engine • revision 1837b5be5f Tools • Dart 2.19.4 • DevTools 2.20.1

juanheyns avatar Mar 24 '23 20:03 juanheyns

@juanheyns That's makes it so you can't resize, or minify the window -- it doesn't just remove the buttons.

Blquinn avatar Apr 13 '23 16:04 Blquinn