8000 Replace hard-coded colors in `.svg` files with color tinting · Issue #1295 · team113/messenger · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Replace hard-coded colors in .svg files with color tinting #1295
Open
@ekrem-qb

Description

@ekrem-qb

Revealed from #1293

Background

SvgIcons have concrete colors, so when there is need for colors different than hard-coded one, we have to add a copy of .svg file to the project.

Problem to solve

  • Inability to use colors from app theme for consistency in design
  • Inability to specify a common color for all icons in a certain widget sub-tree
  • Inability to dynamically change icon color in runtime
  • Unnecessary copies of .svg files that leads to big app size and high memory usage

Possible solutions

SvgIcons should act like MaterialIcons:

  • Be tinted to color specified in it's SvgIcon widget property
  • Use IconTheme as a backdrop color

We could add color field to SvgIcon and wrap it with ColorFiltered widget. Then, we can move colors specified in .svg files to app theme, IconTheme above SvgIcon or color field of specific icons. And finally, remove color tinted SvgIcons and keep only white tinted versions.

Metadata

Metadata

Assignees

Labels

enhancementImprovement of existing features or bugfixk::UI/UXUI (user interface) and UX (user experience) changesk::performanceApplication performance related changesk::refactorRefactor changes of existing coderesearchSome problem investigation is involved

Type

Projects

Status

Bugs

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0