Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Windows: Add dark theme support. #28131

Merged
merged 11 commits into from
Sep 28, 2021

Conversation

moko256
Copy link
Contributor

@moko256 moko256 commented Aug 17, 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.)

TODO:

  • Provide the theme value
  • Notify when the theme value is changed.

Flutter PR for win32: flutter/flutter#88520.
This PR will close flutter/flutter#54612.
This PR will complete one item in flutter/flutter#70214.

No changes in flutter/tests.

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] and the [C++, Objective-C, Java style guides].
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the [CLA].
  • All existing and new tests are passing.

@google-cla google-cla bot added the cla: yes label Aug 17, 2021
@moko256 moko256 changed the title [WIP] Windows: Add dark theme support. Windows: Add dark theme support. Aug 19, 2021
@moko256 moko256 marked this pull request as ready for review August 19, 2021 11:30
@chinmaygarde
Copy link
Member

cc @cbracken

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one API nit, other than that, this looks good to me!

@google-cla
Copy link

google-cla bot commented Sep 28, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Sep 28, 2021
Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM stamp from a Japanese personal seal

@cbracken cbracken added cla: yes and removed cla: no labels Sep 28, 2021
@cbracken
Copy link
Member

Applied a quick one-line format fix. Looks great -- thanks! A lot of people will be excited to see this land! Apologies for the delay in getting to this; was out of the office for a bit.

@moko256
Copy link
Contributor Author

moko256 commented Sep 28, 2021

Thanks for your reviewing. (and I'm sorry I forgot to format code.) I'm excited too!

@cbracken cbracken force-pushed the moko256_windows_dark_theme branch from 983ba8b to 25c4b93 Compare September 28, 2021 17:21
@google-cla
Copy link

google-cla bot commented Sep 28, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Sep 28, 2021
@cbracken cbracken added cla: yes and removed cla: no labels Sep 28, 2021
@cbracken
Copy link
Member

Rebased and pushed to pick up the same API key change as last time.

@cbracken cbracken merged commit bd250bd into flutter:master Sep 28, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 28, 2021
flar pushed a commit to flutter/flutter that referenced this pull request Sep 29, 2021
* 1b5b3c0 Roll Skia from 43264640f256 to 791c0d36a6f6 (2 revisions) (flutter/engine#28909)

* d3f17b0 Mirror master to main branch. (flutter/engine#28896)

* 8f96492 Roll Dart SDK from f452a6585cbd to 280a0c3efb21 (1 revision) (flutter/engine#28910)

* 0aee3c6 Roll Skia from 791c0d36a6f6 to 0f124cd7cd60 (2 revisions) (flutter/engine#28911)

* bd250bd Windows: Add dark theme support. (flutter/engine#28131)
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.
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Oct 29, 2021
* 1b5b3c0 Roll Skia from 43264640f256 to 791c0d36a6f6 (2 revisions) (flutter/engine#28909)

* d3f17b0 Mirror master to main branch. (flutter/engine#28896)

* 8f96492 Roll Dart SDK from f452a6585cbd to 280a0c3efb21 (1 revision) (flutter/engine#28910)

* 0aee3c6 Roll Skia from 791c0d36a6f6 to 0f124cd7cd60 (2 revisions) (flutter/engine#28911)

* bd250bd Windows: Add dark theme support. (flutter/engine#28131)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Windows] themeMode.system does not pick up on the Windows system theme
3 participants