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

Introduce new colours and fix up buttons. #240

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

sirdoombox
Copy link
Collaborator

Minor Changes

  • Introduced a SukiPrimaryDarkColor and SukiAccentDarkColor which is currently pre-calculated in SukiColorTheme using a scalar to be 50% "darker".
  • These colours have been used to update the disabled styling on buttons.
    • Using Opacity was undesirable as making buttons partially transparent looked odd in many cases.
  • Tweaked the app icon in the SukiSideMenu in the demo app to have visible pointerover interaction.
    • I also set the ToolTip.ShowDelay to 0 on this temporarily as a means of keeping an eye on a bug in Avalonia which causes tooltips to flicker in some cases.

Outstanding Issues

  • CanResize bug still plagues us but seems to be an Avalonia issue.
  • ToolTip.Tip bug is in a similar spot.
  • Button styling isn't perfect and bits and pieces might need tweaking.
  • The exact value of the dark colour isn't final and can be tweaked.
  • It might be an idea to run through and see where we can use the Dark variants of colours instead of numbered Opacity variants to prevent transparency being introduced where it shouldn't.

@kikipoulet kikipoulet merged commit 7c67bf4 into kikipoulet:main Jul 2, 2024
@kikipoulet
Copy link
Owner

About the button styling not perfect, what are your remarks ? 🤔

I had the thought recently that cornerradius could be better, even thinking that it would be better to have a custom implementation based on a quadratic Bezier curve instead of a "dumb" circle.

Screenshot_20240702-200115.png

A little off-topic, just a thought that I had so I put it here 👀

@sirdoombox
Copy link
Collaborator Author

sirdoombox commented Jul 2, 2024

My main remarks on the button styling as it is is animations being a little inconsistent and flashy in places and the styling classes being quite complex and quite tough to maintain and finally the disabled state looks a little bad in light mode atm. Also the loading icon doesn't have it's colour set properly which I forgot to do. I think we're offering a good range of options though so I don't think it is worth trying to reduce complexity by reducing options. Maybe there is a better way to organise the classes to help with bloat.

As for changing rounded corner rendering, I don't know enough about the API available to do this with simple styles and how expensive it might be. I think we'd have to look into how Avalonia implements the rounded corners internally to see if it's easy to "override" in some way.

@sirdoombox
Copy link
Collaborator Author

To add to this as I just thought of it, we might need SukiPrimaryLightColor which is 50% lighter for use in light mode? I think if I'm not mistaken in light mode disabled controls usually tend to get lighter, not darker?

@kikipoulet
Copy link
Owner

To add to this as I just thought of it, we might need SukiPrimaryLightColor which is 50% lighter for use in light mode? I think if I'm not mistaken in light mode disabled controls usually tend to get lighter, not darker?

Yes I think so, lighter to be more discrete

@sirdoombox
Copy link
Collaborator Author

I did try to introduce a lighter colour for disabled buttons but it doesn't look right at all. I really do hate the light theme...

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.

2 participants