Fix segment count to 7 for weekly (and optionally session) usage bar - #71
Open
Lexx-Agency-dev wants to merge 2 commits into
Open
Fix segment count to 7 for weekly (and optionally session) usage bar#71Lexx-Agency-dev wants to merge 2 commits into
Lexx-Agency-dev wants to merge 2 commits into
Conversation
Useful for grabbing a working binary without a local Windows SDK/MSVC install.
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.
Problem
Both the 5h and 7d usage bars currently render with the same fixed
segment count (
SEGMENT_COUNT = 10insrc/window.rs, used viarow_bar_segment_countwhen only one model is active). For the 7-daywindow this doesn't map onto 7 days, making the bar less intuitive to
read at a glance.
Change
Changed
SEGMENT_COUNTfrom10to7, so each segment in the barcorresponds to one day for the 7d window (and, since both rows share
this constant, also gives the 5h bar 7 segments for visual consistency).
Scope / impact
active_models == 1case (single model shown).The 2-model (
5segments) and 3-model (4segments) layouts inrow_bar_segment_countare unchanged.all computed from
segment_count, so they scale automatically.Testing
Built locally with
cargo build --releaseand confirmed the taskbarwidget renders both bars with 7 segments, filling proportionally to
the reported usage percentage.
Screenshots
Before: [10 segments]
After: [7 segments]