-
Notifications
You must be signed in to change notification settings - Fork 34
🐧 Add native title bar option for better Linux window resizing #387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
cc7b672
🐧 Use native title bar on Linux for flexible window resizing
BluewhaleYF 80c565f
✨ Add option to use native window title bar
BluewhaleYF 2a19a1c
🌐 Fix zh-CN Plugin Marketplace i18n translation
BluewhaleYF 660e18a
♻️ Address PR review feedback
BluewhaleYF 4948963
🐛 Fix web platform crash
BluewhaleYF 4fe95fa
🎨 Resolve Flutter analyze warnings
BluewhaleYF File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -57,6 +57,7 @@ const kAppSoundEffects = 'app_sound_effects'; | |
| const kAppFestivalFeatures = 'app_feastival_features'; | ||
| const kAppWindowSize = 'app_window_size'; | ||
| const kAppWindowOpacity = 'app_window_opacity'; | ||
| const kAppLinuxUseNativeTitleBarLegacy = 'app_linux_use_native_title_bar'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait actually why there are two keys |
||
| const kAppCardTransparent = 'app_card_transparent'; | ||
| const kAppEnterToSend = 'app_enter_to_send'; | ||
| const kAppDefaultPoolId = 'app_default_pool_id'; | ||
|
|
@@ -100,6 +101,7 @@ const kAppDesktopIdleStatusEnabled = 'app_desktop_idle_status_enabled'; | |
| const kAppDesktopNowPlayingEnabled = 'app_desktop_now_playing_enabled'; | ||
| const kAppDesktopRpcServerEnabled = 'app_desktop_rpc_server_enabled'; | ||
| const kAppDesktopUseSeparateCallWindow = 'app_desktop_use_separate_call_window'; | ||
| const kAppDesktopUseNativeTitleBar = 'app_desktop_use_native_title_bar'; | ||
| const kAppShakeDetectionEnabled = 'app_shake_detection_enabled'; | ||
| const kMacosNowPlayingCliDefaultPath = '/opt/homebrew/bin/nowplaying-cli'; | ||
|
|
||
|
|
@@ -508,6 +510,7 @@ sealed class AppSettings with _$AppSettings { | |
| required ExploreSettings exploreSettings, | ||
| required bool mediaProxyEnabled, | ||
| required bool friendStatusDesktopNotification, | ||
| required bool desktopUseNativeTitleBar, | ||
| }) = _AppSettings; | ||
| } | ||
|
|
||
|
|
@@ -561,6 +564,12 @@ class AppSettingsNotifier extends _$AppSettingsNotifier { | |
| mediaProxyEnabled: prefs.getBool(kAppMediaProxyEnabled) ?? true, | ||
| friendStatusDesktopNotification: | ||
| prefs.getBool(kAppFriendStatusDesktopNotification) ?? true, | ||
| desktopUseNativeTitleBar: | ||
| !kIsWeb && (Platform.isLinux || Platform.isWindows) | ||
| ? (prefs.getBool(kAppDesktopUseNativeTitleBar) ?? | ||
| prefs.getBool(kAppLinuxUseNativeTitleBarLegacy) ?? | ||
| true) | ||
| : false, | ||
| ); | ||
| } | ||
|
|
||
|
|
@@ -731,6 +740,12 @@ class AppSettingsNotifier extends _$AppSettingsNotifier { | |
| state = state.copyWith(linkCollapseMode: value); | ||
| } | ||
|
|
||
| void setDesktopUseNativeTitleBar(bool value) { | ||
| final prefs = ref.read(sharedPreferencesProvider); | ||
| prefs.setBool(kAppDesktopUseNativeTitleBar, value); | ||
| state = state.copyWith(desktopUseNativeTitleBar: value); | ||
| } | ||
|
|
||
| void setWindowOpacity(double value) { | ||
| final prefs = ref.read(sharedPreferencesProvider); | ||
| prefs.setDouble(kAppWindowOpacity, value); | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bro forgot multi language