Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[macOS] Dark Theme support #10646

Merged
merged 4 commits into from
Aug 17, 2020
Merged

[macOS] Dark Theme support #10646

merged 4 commits into from
Aug 17, 2020

Conversation

jfversluis
Copy link
Member

@jfversluis jfversluis commented May 11, 2020

Description of Change

Add necessary bits to support both native Dark Mode from 10.14 and up and the Forms xplat APIs

Issues Resolved

API Changes

  • added on macOS project: public class FormsNSView

Platforms Affected

  • macOS

Behavioral/Visual Changes

Some colors might be different than before when running on 10.14+. Colors where changed to use dynamic colors so the values might be different than the hard-coded ones earlier.

Before/After Screenshots

image

image

Testing Procedure

Switch your Mac to Dark Mode and run the gallery app. Everything should look easy on the eyes.
When switching while the app is running, everything should transition back and forth

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@jfversluis jfversluis added DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. p/macOS a/darkmode labels May 11, 2020
@samhouts samhouts added this to In progress in DarkMode/AppThemes May 11, 2020
@jamesmontemagno
Copy link
Contributor

I would love to try this puppy out on https://github.com/jamesmontemagno/MyStreamTimer as it is pretty small and could use some dark mode

@jamesmontemagno
Copy link
Contributor

Looking really good.
I do get a crash when I change between light and dark mode when the app is running. It looks like it is coming from internal XF.

Screen Shot 2020-05-15 at 3 49 31 PM

@jamesmontemagno
Copy link
Contributor

Editor does not seem to have the correct text color in dark mode.
Entry is alright

@samhouts samhouts changed the base branch from master to 4.8.0 June 26, 2020 00:04
@samhouts samhouts changed the base branch from 4.8.0 to main July 29, 2020 23:42
@samhouts samhouts added this to In Progress in .NET MAUI Backlog Jul 30, 2020
@samhouts samhouts added the retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. label Aug 4, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 4, 2020
@samhouts samhouts removed this from In Progress in .NET MAUI Backlog Aug 4, 2020
@jfversluis jfversluis changed the base branch from main to 5.0.0 August 6, 2020 12:18
@jfversluis jfversluis removed DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. retarget-branch-required PR or associated issues target a milestone. Please target this PR to the matching branch. labels Aug 6, 2020
@jfversluis
Copy link
Member Author

Retargeted to 5.0 and removed DNM. I think I got most of the things done for this. There might be some tweaks needed here and there, but for now it seems good enough.

@jamesmontemagno
Copy link
Contributor

All of the crashes were fixed in the latest commits. I am shipping an app today with the nightly builds btw

@knocte
Copy link
Contributor

knocte commented Aug 10, 2020

Would this PR fix #3777 properly (instead of the workaround that was put in place there?)?

@jfversluis
Copy link
Member Author

@knocte yes :)

@samhouts samhouts added this to In Review in vNext+1 (5.0.0) Aug 11, 2020
@samhouts samhouts merged commit f303548 into 5.0.0 Aug 17, 2020
vNext+1 (5.0.0) automation moved this from In Review to Done Aug 17, 2020
@samhouts samhouts deleted the macos-darktheme branch August 17, 2020 20:49
@samhouts samhouts added this to Done in Sprint 175 Aug 17, 2020
myroot pushed a commit to myroot/Xamarin.Forms that referenced this pull request Aug 19, 2020
* Getting there

* Some hardcoded color removal

* Fix cell issues

* Update PageRenderer.cs

fixes xamarin#8864
fixes xamarin#3777
sung-su pushed a commit to sung-su/Xamarin.Forms that referenced this pull request Aug 20, 2020
* Getting there

* Some hardcoded color removal

* Fix cell issues

* Update PageRenderer.cs

fixes xamarin#8864
fixes xamarin#3777
sung-su pushed a commit to sung-su/Xamarin.Forms that referenced this pull request Aug 20, 2020
* Getting there

* Some hardcoded color removal

* Fix cell issues

* Update PageRenderer.cs

fixes xamarin#8864
fixes xamarin#3777
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
DarkMode/AppThemes
  
In progress
Development

Successfully merging this pull request may close these issues.

[Bug] MacOS Xamarin Forms does not support dark mode
6 participants