-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(macOS): Traffic lights sometimes become horizontal
Use NotificationCenter as a workaround of rewrite BitsdojoWindow
- Loading branch information
1 parent
d30da3b
commit d97b51d
Showing
3 changed files
with
59 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:file_selector/file_selector.dart'; | ||
|
||
import 'macos_window_control_button_manager.dart'; | ||
|
||
// TODO(hexagram): This is a temporary solution, not the best way to handle this callback. | ||
// Once BitsdojoWindow is forked and rewritten, using NSWindowDelagate to listen for windowDidEndSheet and windowWillBeginSheet will be a more general and better solution to handle this. | ||
Future<String?> getDirPath() async { | ||
final path = await getDirectoryPath(); | ||
if (Platform.isMacOS) { | ||
MacOSWindowControlButtonManager.setVertical(); | ||
} | ||
return path; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters