Render a qrc SVG into a theme-inked QIcon.
| 144 | |
| 145 | // Render a qrc SVG into a theme-inked QIcon. |
| 146 | QIcon renderThemedIcon(const QString& resource_path, int px = 16) { |
| 147 | QFile file(resource_path); |
| 148 | if (!file.open(QIODevice::ReadOnly)) { |
| 149 | return QIcon(); |
| 150 | } |
| 151 | QByteArray svg_data = file.readAll(); |
| 152 | file.close(); |
| 153 | recolorSvgInk(svg_data, pickerThemeIsLight()); |
| 154 | return rasterizeSvgIcon(svg_data, px); |
| 155 | } |
| 156 | |
| 157 | // Render one of the app's Material chevron SVGs (keyboard_arrow_left/right), |
| 158 | // recolored to `color`, into a px*DPR QIcon. The source path's own fill is |
no test coverage detected