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

DataGrid - Fix remaining theme colors #3564

Merged
merged 4 commits into from
Feb 17, 2020
Merged

DataGrid - Fix remaining theme colors #3564

merged 4 commits into from
Feb 17, 2020

Conversation

Symbai
Copy link
Contributor

@Symbai Symbai commented Feb 13, 2020

What does the pull request do?

Replace remaining hardcoded brushes with theme brushes. I had to use similar theme brush values because the hardcoded brush values don't exist in theme resource dictionary.

Before Light

image

After Light

image

Before Dark

image

After Dark

image

@grokys
Copy link
Member

grokys commented Feb 14, 2020

@Symbai I've just noticed that #3530 causes a problem: the row highlight color is now the same as the TextBox highlight color, so when you double-click to edit a DataGridTextColumn, you can't see that the text is highlighted, for example:

yYwbO87HHQ

I think we need to choose a different color for the row highlight, could we do that in this PR? Here's the above operation using ThemeAccentBrush (which might be a good choice?) for example:

uyRJbTbAhL

Other than that, PR looks good!

@Symbai
Copy link
Contributor Author

Symbai commented Feb 14, 2020

@grokys Nice catch. Using ThemeAccentBrush makes the selection really noticeably. But on dark theme it barely is then:

Light

image

Dark

image

How about ThemeAccentBrush2?

Light:

image

Dark:

image

@Gillibald
Copy link
Contributor

Can't we change the background of the TextBox so it does not have the same color as the selected row?

@Symbai
Copy link
Contributor Author

Symbai commented Feb 14, 2020

@Gillibald Generally we should consider adding background colors to many controls as currently many controls have a transparent background, causing the issue above (different behavior to WPF and causes issues when controls are placed on a custom background. I wanted to make a PR someday later about).

In WPF the textbox in DataGrid has a background which is not transparent, matching with your suggestion.
image

If this is what we want to do, I would undo the change in this PR and make a new PR setting background colors to several controls.

@grokys
Copy link
Member

grokys commented Feb 14, 2020

Hmm yeah maybe that would be better, if that's what WPF does. If that's the case 👍 to reverting the change there.

@Symbai
Copy link
Contributor Author

Symbai commented Feb 14, 2020

Done

@jmacato jmacato merged commit 53f233c into AvaloniaUI:master Feb 17, 2020
@Symbai Symbai mentioned this pull request Apr 23, 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.

4 participants