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

Dialogs layout alignment - FormCreateBranch #8490

Conversation

RussKie
Copy link
Member

@RussKie RussKie commented Sep 27, 2020

Relates to #6183

Screenshots

  • Before:
    image

  • After
    image

❗ Please note "Help" button will be removed in the follow up PRs to reduce the wasted space at the bottom.


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

@ghost ghost assigned RussKie Sep 27, 2020
@RussKie
Copy link
Member Author

RussKie commented Sep 27, 2020

@NikolayXHD need your help here - the colour of "Clear working directory and index" checkbox is too dark with the new colours. Is this something we're calculating dynamically?

@codecov
Copy link

codecov bot commented Sep 27, 2020

Codecov Report

Merging #8490 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #8490      +/-   ##
==========================================
- Coverage   55.06%   55.06%   -0.01%     
==========================================
  Files         901      901              
  Lines       65047    65050       +3     
  Branches    11726    11726              
==========================================
- Hits        35818    35817       -1     
- Misses      26473    26475       +2     
- Partials     2756     2758       +2     
Flag Coverage Δ
#production 41.99% <100.00%> (-0.01%) ⬇️
#tests 94.81% <ø> (ø)

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

@NikolayXHD
Copy link
Member

NikolayXHD commented Sep 27, 2020

@NikolayXHD need your help here - the colour of "Clear working directory and index" checkbox is too dark with the new colours. Is this something we're calculating dynamically?

From what I can see by debugging, the color for disabled text is calculated dynamically by WinForms

https://source.dot.net/#System.Windows.Forms/System/Windows/Forms/ButtonInternal/ButtonBaseAdapter.cs,675

image

Like the code above shows, if the background does not have magic value SystemColors.Control, the disabled text color will be calculated by making background color darker, regardless of whether the background is bright or dark, which produces near-black text color on dark gray background

@NikolayXHD
Copy link
Member

A proper workaround would be something like

// GitExtensionsDialog.cs
if (ColorHelper.IsDarkTheme())
  this.MainPanel.BackgroundColor = SystemColors.Control;

@mstv
Copy link
Member

mstv commented Sep 27, 2020

I don't like the large borders in the newly aligned dialogs. The dialogs cover too much of the main window without reason.

@RussKie
Copy link
Member Author

RussKie commented Sep 28, 2020

From what I can see by debugging, the color for disabled text is calculated dynamically by WinForms

source.dot.net/#System.Windows.Forms/System/Windows/Forms/ButtonInternal/ButtonBaseAdapter.cs,675

image

Like the code above shows, if the background does not have magic value SystemColors.Control, the disabled text color will be calculated by making background color darker, regardless of whether the background is bright or dark, which produces near-black text color on dark gray background

@NikolayXHD omg 😱 wow

@merriemcgaw @JeremyKuhne we have work to do 😉

@RussKie

This comment has been minimized.

@RussKie
Copy link
Member Author

RussKie commented Sep 28, 2020

Scratch that, the discussion is in #6183.

@RussKie RussKie force-pushed the Dialogs_layout_alignment_FormCreateBranch branch from 914660a to b2fd1d8 Compare September 28, 2020 02:12
@RussKie RussKie force-pushed the Dialogs_layout_alignment_FormCreateBranch branch from b2fd1d8 to eee06f4 Compare October 20, 2020 06:55
@RussKie RussKie merged commit 3b4492d into gitextensions:master Oct 20, 2020
@RussKie RussKie deleted the Dialogs_layout_alignment_FormCreateBranch branch October 20, 2020 11:30
@ghost ghost added this to the 4.0 milestone Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants