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

Dark titlebar when using a dark theme on a recent Win10 #8435

Merged
merged 1 commit into from Sep 9, 2020

Conversation

pmiossec
Copy link
Member

@pmiossec pmiossec commented Sep 6, 2020

Proposed changes

  • Set a dark titlebar when using a dark theme when the user use a supported version of Win10

Screenshots

Before

The title bar is always white...
image

After

light theme:

image

dark theme:

image

Test methodology

  • Manual

Test environment(s)

  • Git Extensions 33.33.33
  • Build 26402f0898e7107f5b8978fa8c8a2416198a864b
  • Git 2.27.0.windows.1
  • Microsoft Windows NT 10.0.19041.0
  • .NET Framework 4.8.4180.0
  • DPI 96dpi (no scaling)

✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned pmiossec Sep 6, 2020
@codecov
Copy link

codecov bot commented Sep 6, 2020

Codecov Report

Merging #8435 into master will decrease coverage by 0.02%.
The diff coverage is 6.25%.

@@            Coverage Diff             @@
##           master    #8435      +/-   ##
==========================================
- Coverage   53.02%   52.99%   -0.03%     
==========================================
  Files         869      870       +1     
  Lines       62066    62082      +16     
  Branches    11302    11309       +7     
==========================================
- Hits        32908    32898      -10     
- Misses      26502    26518      +16     
- Partials     2656     2666      +10     
Flag Coverage Δ
#production 40.94% <6.25%> (-0.04%) ⬇️
#tests 94.26% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@tebeco
Copy link

tebeco commented Sep 7, 2020

@pmiossec

Given the diff shown by github (which include older commits) is it the good base branch (or you might have an older base branch on your fork ?)
As these commits are part of a PR for colorblind it might be on purpose, just curious though

image

Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

We should really give credit when copying code 😉
https://stackoverflow.com/a/62811758/2338036

GitUI/GitModuleForm.cs Outdated Show resolved Hide resolved
GitUI/GitModuleForm.cs Outdated Show resolved Hide resolved
GitUI/GitModuleForm.cs Outdated Show resolved Hide resolved
@pmiossec
Copy link
Member Author

pmiossec commented Sep 7, 2020

Given the diff shown by github (which include older commits) is it the good base branch (or you might have an older base branch on your fork ?)
As these commits are part of a PR for colorblind it might be on purpose, just curious though

@tebeco

that's because the branch is based on #8424 (because it introduces change around theme and I wanted to be sure to avoid future conflicts) and so it will be merged after.

@NikolayXHD
Copy link
Member

@pmiossec fantastic! Few days ago I noticed Telegram messenger app does this, so I thought there must be a way, tried looking it up, failed, and here you are!

@pmiossec
Copy link
Member Author

pmiossec commented Sep 7, 2020

@pmiossec fantastic! Few days ago I noticed Telegram messenger app does this, so I thought there must be a way, tried looking it up, failed, and here you are!

I deserve very few credits.
Credits goes to:

I just did a quick dev and the PR. Testing was a little more difficult because my Win10 is too old 😢

@gitextensions gitextensions deleted a comment Sep 7, 2020
@gitextensions gitextensions deleted a comment Sep 7, 2020
@tebeco
Copy link

tebeco commented Sep 7, 2020

I'll take my shoot here since I've spotted this

  • Is that a bot that need to be reported ?
  • Is "Code review" open to all Github on Git Extensions ? (@RussKie open/influenced to weird bot/account if that's one)

on this PR:
image
image

on an older PR:
image

@pmiossec
Copy link
Member Author

pmiossec commented Sep 7, 2020

* Is that a bot that need to be reported ?

3 or 4 useless comments in 2 or 3 days. So maybe yes...

* Is "Code review" open to all Github on `Git Extensions` ?

yes. So, contribute! 😉

@RussKie
Copy link
Member

RussKie commented Sep 7, 2020 via email

@pmiossec pmiossec changed the title WIP: Dark titlebar when using a dark theme on a recent Win10 Dark titlebar when using a dark theme on a recent Win10 Sep 7, 2020
Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

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

10.0.19041

GitUI/Interops/DwmApi/DwmApi.cs Outdated Show resolved Hide resolved
@pmiossec pmiossec force-pushed the titlebar_dark branch 2 times, most recently from 08bab9e to 42cb937 Compare September 7, 2020 21:28
@pmiossec
Copy link
Member Author

pmiossec commented Sep 7, 2020

Done

Copy link
Member

@drewnoakes drewnoakes left a comment

Choose a reason for hiding this comment

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

This is a great improvement to the dark mode. Thanks very much to all involved.

GitUI/Interops/DwmApi/DwmApi.cs Outdated Show resolved Hide resolved
GitUI/Interops/DwmApi/DwmApi.cs Outdated Show resolved Hide resolved
Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

Few more nits

GitUI/Interops/DwmApi/DwmApi.cs Show resolved Hide resolved
GitUI/Interops/DwmApi/DwmApi.cs Outdated Show resolved Hide resolved
GitUI/Interops/DwmApi/DwmApi.cs Outdated Show resolved Hide resolved
@pmiossec pmiossec force-pushed the titlebar_dark branch 2 times, most recently from c5ddd77 to 0b3ff36 Compare September 8, 2020 08:53
@RussKie
Copy link
Member

RussKie commented Sep 8, 2020 via email

@RussKie RussKie merged commit 0f81767 into gitextensions:master Sep 9, 2020
@ghost ghost added this to the 4.0 milestone Sep 9, 2020
@RussKie
Copy link
Member

RussKie commented Sep 9, 2020

Thank you

@pmiossec pmiossec deleted the titlebar_dark branch September 9, 2020 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants