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

Menus: use surface variant in dark theme, surface in light theme #313

Merged
merged 1 commit into from
Mar 11, 2023

Conversation

jpnurmi
Copy link
Member

@jpnurmi jpnurmi commented Mar 11, 2023

Moving the previously hardcoded rgb(34,34,34) color into the color scheme makes it possible to:

  • configure the background color of menus for high-contrast and flavors themes, and
  • use the appropriate background color in custom widgets such as YaruAutocomplete.

Popup menus look the same as before in both light and dark themes. The only effective change is that surfaceVariant has now a different value in the dark theme. I sincerely hope that surfaceVariant was a safe choice for this but it's hard to know where it might be used... 😅

Before After
image image
image image
image image
image image

Ref: ubuntu/yaru.dart#845
Ref: ubuntu/yaru.dart#668

This makes it possible configure the background color of menus. I
sincerely hope surfaceVariant is a safe choice for this.

Ref: #302
@jpnurmi jpnurmi merged commit b8ef574 into ubuntu:main Mar 11, 2023
@jpnurmi jpnurmi deleted the surface-variant branch March 11, 2023 13:58
@jpnurmi jpnurmi mentioned this pull request Mar 11, 2023
Copy link
Contributor

Unknown release type "Menus" found in pull request title "Menus: use surface variant in dark theme, surface in light theme".

Available types:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants