Skip to content

Use an ImageVector app icon in About screen#12609

Merged
Stypox merged 2 commits intoTeamNewPipe:refactorfrom
Stypox:image-vector-app-icon
Sep 6, 2025
Merged

Use an ImageVector app icon in About screen#12609
Stypox merged 2 commits intoTeamNewPipe:refactorfrom
Stypox:image-vector-app-icon

Conversation

@Stypox
Copy link
Copy Markdown
Member

@Stypox Stypox commented Sep 6, 2025

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

Supersedes #12426 by creating a Kotlin ImageVector for the app icon instead of relying on an external library just to render a drawable. This required remaking the app icon SVGs so that they use only as little lines as needed instead of a bunch of bezier curves (I mean, curves would have also worked, but it was a useless mess). Then the new squircle SVG was converted to ImageVector with https://github.com/rafaeltonholo/svg-to-compose/ based on assets/newpipe_squircle.svg.

Before/After Screenshots/Screen Record

image

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

Also optimize them with svgo
@github-actions github-actions Bot added the size/giant PRs with more than 750 changed lines label Sep 6, 2025
@Stypox Stypox mentioned this pull request Sep 6, 2025
5 tasks
@Stypox Stypox changed the title Image vector app icon Use an ImageVector app icon in About screen Sep 6, 2025
@Stypox Stypox changed the base branch from dev to refactor September 6, 2025 15:29
@Composable
private fun IconPreview() {
org.schabi.newpipe.ui.theme.AppTheme {
Column(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This column is unnecessary, as the Image is the only child.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's just autogenerated code, but yeah I removed it, thanks for noticing

@Isira-Seneviratne
Copy link
Copy Markdown
Member

LGTM

@Stypox Stypox force-pushed the image-vector-app-icon branch from ea4fecb to b362014 Compare September 6, 2025 15:59
@github-actions github-actions Bot added size/medium PRs with less than 250 changed lines and removed size/giant PRs with more than 750 changed lines labels Sep 6, 2025
@Stypox Stypox merged commit b6bd87a into TeamNewPipe:refactor Sep 6, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/medium PRs with less than 250 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants