Repository navigation
Conversation
…Glyph rendering (#1792) <!-- New features need an issue labeled `approved` and assigned to you before you open a PR. Feature PRs without one will be closed. See CONTRIBUTING.md. --> ## Linked issue Closes #1791 ## Description <!-- What does this PR change and why? --> Symbols hidden behind the battery: the charging bolt and battery saver plus had their own offscreen layer, which cut off the part that overlaps the battery and stopped the gap around them from cutting into it. I removed that layer, so all symbols draw on top with a proper cutout. Squashed symbols: the symbol was measured without the 7dp it overlaps the battery by, so tight containers shrank it to a sliver. It now always gets its full size. Matching outlines: the bolt now uses the same cutout and outline as the limiter shield, and the plus’s gap was widened to match. Sizing: the battery number is about 10% smaller, and the bolt is shorter (9×11dp, the same size as the shield). This branch has one commit, `b3f7790cb`, with these changes: **Glyph rendering fixes (`IslandComponents.kt`)** - **Symbols hidden behind the battery:** the charging bolt and battery saver plus had their own offscreen layer, which cut off the part that overlaps the battery and stopped the gap around them from cutting into it. I removed that layer, so all symbols draw on top with a proper cutout. - **Squashed symbols:** the symbol was measured without the 7dp it overlaps the battery by, so tight containers shrank it to a sliver. It now always gets its full size. - **Matching outlines:** the bolt now uses the same cutout and outline as the limiter shield, and the plus's gap was widened to match. - **Sizing:** the battery number is about 10% smaller, and the bolt is shorter (9×11dp, the same size as the shield). - **Preview:** a `BatteryGlyphPreview` showing every battery state. **Battery state everywhere (`BatteryStatus.kt`, `TimeBatteryPlugin.kt`, `BriefPlugin.kt`)** - **Shared logic:** battery reading and state and idle colors now live in one file, `BatteryStatus.kt`, used by both plugins. - **Brief header:** the battery now shows its state color and the charging, saver and limiter glyphs. Before, it only showed the level in the accent color. - **Charging peek:** the peek line's battery now shows the charging bolt and the other state glyphs. ## Type of change - [x] Bug fix - [ ] New feature - [ ] Translations - [ ] Documentation - [ ] Build / CI tooling ## UI changes <!-- Required if this PR changes or adds UI. Please attach screenshots or a screen recording. --> _added a small preview to see quickly all the states of the icon_ <img width="439" height="940" alt="image" src="https://github.com/user-attachments/assets/1a01ef43-48ff-42c2-a0e7-68215a724dcd" /> [Screen_recording_20261112_164705.webm](https://github.com/user-attachments/assets/82a59efb-ba07-4aad-9435-2f72801c414a) now the peek alerts and brief uses the correct battery status too. ## Checklist - [x] For new features: the linked issue is labeled `approved` and assigned to me. - [x] This PR covers a single feature or fix and is under ~1,000 changed lines (or the size was agreed in the issue). - [x] The base branch is `develop`. - [x] `./gradlew assembleDebug` and `./gradlew testDebugUnitTest` pass. - [x] I tested the changes on a device or emulator (including Shizuku or Root if applicable). - [x] I understand every line of this change and can explain it in review, including any AI-assisted code. - [x] The code follows the [Development Guide](https://github.com/sameerasw/essentials/blob/develop/docs/DEVELOPMENT_GUIDE.md).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change