Skip to content
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

[WIP] Win32 template: Add dark theme support #88520

Closed

Conversation

moko256
Copy link
Member

@moko256 moko256 commented Aug 19, 2021

This PR changes windows template to receive theme (dark/light) update and to apply brightness to flutter by using the function added in flutter/engine#28131.
Please merge after installation bundle contains flutter/engine#28131.

After this PR is merged, please make announcement to win32 user that they need to apply this patch to existing applications to use the feature of this PR.

Engine PR: flutter/engine#28131

No changes in flutter/test.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 19, 2021
@google-cla google-cla bot added the cla: yes label Aug 19, 2021
@moko256 moko256 marked this pull request as ready for review September 28, 2021 00:55
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@moko256 moko256 changed the title Win32 template: Add dark theme support [WIP] Win32 template: Add dark theme support Sep 28, 2021
cbracken pushed a commit to flutter/engine that referenced this pull request Sep 28, 2021
This PR adds the dark theme support for both windows and winuwp engine, based on flutter/flutter#54612.

On Win32: using a registry value that is not documented. (I tested on Windows 10.0.19043.1165)
On UWP: using default background color. (I couldn't find WinRT API that returns dark/light directly, without xaml package.)

Flutter PR for win32: flutter/flutter#88520.
This PR will close flutter/flutter#54612.
This PR will complete one item in flutter/flutter#70214.
@moko256 moko256 changed the title [WIP] Win32 template: Add dark theme support Win32 template: Add dark theme support Sep 30, 2021
@moko256 moko256 changed the title Win32 template: Add dark theme support [WIP] Win32 template: Add dark theme support Oct 2, 2021
@moko256 moko256 changed the title [WIP] Win32 template: Add dark theme support Win32 template: Add dark theme support Oct 4, 2021
dnfield pushed a commit to dnfield/engine that referenced this pull request Oct 6, 2021
This PR adds the dark theme support for both windows and winuwp engine, based on flutter/flutter#54612.

On Win32: using a registry value that is not documented. (I tested on Windows 10.0.19043.1165)
On UWP: using default background color. (I couldn't find WinRT API that returns dark/light directly, without xaml package.)

Flutter PR for win32: flutter/flutter#88520.
This PR will close flutter/flutter#54612.
This PR will complete one item in flutter/flutter#70214.
@moko256 moko256 force-pushed the moko256_win32_notify_theme_change branch from 9f7d524 to 3eb3ab6 Compare October 13, 2021 22:19
@moko256 moko256 changed the title Win32 template: Add dark theme support [WIP] Win32 template: Add dark theme support Oct 16, 2021
@christopherfujino
Copy link
Member

Marking this as a draft since it depends on https://github.com/flutter/engine/pull/29303/files landing. Feel free to mark active once that change has landed and rolled to the framework.

@christopherfujino christopherfujino marked this pull request as draft November 19, 2021 22:05
@boyan01
Copy link
Contributor

boyan01 commented Jan 12, 2022

This PR seems only depends on flutter/engine#28131 which already be merged.

I tested this on latest master branch and it works well. Maybe this PR can be consider ready for review?

@moko256
Copy link
Member Author

moko256 commented Jan 12, 2022

The function of this PR will be replaced with flutter/engine#29303 because flutter/engine#29303 works without updating existing project created from template. I've forgotten to close this PR so I'll close this now. Sorry.

@moko256 moko256 closed this Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants