Add option to remove title bar in Linux and Windows#727
Add option to remove title bar in Linux and Windows#727lkcv wants to merge 1 commit intoDonutWare:developfrom
Conversation
ea0aaaa to
ba35ed8
Compare
PartyDonut
left a comment
There was a problem hiding this comment.
While the implementation is perfectly fine.
I'm thinking this might actually be better as a startup argument?
Similar to how we have --htpc mode we could have --no-titlebar as a startup argument
|
Yeah, I can change it to a startup flag. |
|
I got rid of the option and made it a startup flag instead. |
PartyDonut
left a comment
There was a problem hiding this comment.
Thanks for implementing the changes, some small feedback left.
On a side note, this would probably also be a good option for implementing on macOS. Is this something you would like to try? If not no worries I can add it later on.
There was a problem hiding this comment.
Formatting is a bit all over the place. Could you please format the file using line length 120.
| final noTitleBar = | ||
| (AdaptiveLayout.of(context).platform == TargetPlatform.linux || | ||
| AdaptiveLayout.of(context).platform == TargetPlatform.windows) && | ||
| ref.read(argumentsStateProvider).noTitleBar; |
There was a problem hiding this comment.
Better to use a watch, it probably won't change during runtime. But better to be prepared.
| ref.read(argumentsStateProvider).noTitleBar; | |
| ref.watch(argumentsStateProvider.select((value) => value.noTitleBar)); |
| ); | ||
| final surfaceColor = theme.colorScheme.surface; | ||
| final noTitleBar = | ||
| (AdaptiveLayout.of(context).platform == TargetPlatform.linux || |
There was a problem hiding this comment.
Let's move this logic to ArgumentsModel as a getter to clean it up. That way we only have to watch a single variable here.
You can also use defaultTargetPlatform, platform is only saved in AdaptiveLayout for convenience.
Pull Request Description
Added a startup flag (--no-titlebar) to disable the title bar in Linux and Windows. This flag is ignored on macOS.
Issue Being Fixed
This addresses this discussion:
#726
Screenshots / Recordings
Here's a screenshot of Fladder in regular windowed mode (not htpc) without a title bar.

Checklist
I've confirmed these changes work as expected on Linux.