-
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 light reset after showing file seletor (#168)
- Loading branch information
1 parent
6b4d96b
commit 22fb4da
Showing
3 changed files
with
19 additions
and
4 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
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 andbetter solution to handle this. | ||
Future<String?> getDirPath() async { | ||
final path = await getDirectoryPath(); | ||
if (Platform.isMacOS) { | ||
MacOSWindowControlButtonManager.setVertical(); | ||
} | ||
return path; | ||
} |