bitsdojo_window
bitsdojo_window copied to clipboard
How to Move/Position Window Buttons on macOS?
Hey, first thanks for this great package and your effort!
How can I achieve moving the window-buttons on macOS with your plugin? I would like them to be a little bit more to the right & the bottom (see attached screenshot).
@bitsdojo would be great to get a little hint here :) thanks in advance!!
@bitsdojo You would make my day by helping me out 🙃
Hey. Try wrapping the widgets in a container and adding a margin.
I tried doing that first but unfortunately, the macOS window buttons are not part of the widget tree but added through swift/objective-c instead..
Atm you can't do that using the plugin, I assume this is because macOS does not allow, or not easily allow to hide window buttons.
Does anybody have enough Swift/Objective-C/macOS experience to tell me how to do so manually via Xcode :) Would be awesome
This is on my list. Just need to find some time after work to implement it.
So just to confirm, the current recommended implementation is to show MinimizeWindowButton/MaximizeWindowButton/CloseWindowButton on Linux/Windows, but on MacOS, we just leave a gap in place for the native ones to render?
@esDotDev yes, that is the currently recommended implementation.
Ability to move/position window buttons on macOS is also coming with the next update.
How long this is gonna take @bitsdojo.
waiting since months still no update .
@bitsdojo bump 💯
Any updates?
Same issue to me: https://github.com/bitsdojo/bitsdojo_window/issues/111 .
I finally solved the problem by following these steps: https://medium.com/flutter-community/transparent-title-bar-on-macos-with-flutter-7043d44f25dc
Now its working for me.
@bitsdojo any updates after 2 year ?
In case somebody is still looking for a solution, replacing the tool bar with a custom one does work for me:
import Cocoa
import FlutterMacOS
import FlutterMacOS
import bitsdojo_window_macos
class MainFlutterWindow: BitsdojoWindow {
override func bitsdojo_window_configure() -> UInt {
return BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP
}
override func awakeFromNib() {
let flutterViewController = FlutterViewController()
let windowFrame = self.frame
self.contentViewController = flutterViewController
self.setFrame(windowFrame, display: true)
let customToolbar = NSToolbar()
self.toolbar = customToolbar
RegisterGeneratedPlugins(registry: flutterViewController)
super.awakeFromNib()
}
}