Skip to content

Home: move the threshold slider under the gauge and slim it down#139

Merged
almothafar merged 1 commit into
masterfrom
feature/135-compact-slider-gauge
Jul 12, 2026
Merged

Home: move the threshold slider under the gauge and slim it down#139
almothafar merged 1 commit into
masterfrom
feature/135-compact-slider-gauge

Conversation

@almothafar

Copy link
Copy Markdown
Owner

Closes #135.

On the Mate 10 Pro home screen the critical/warning RangeSlider block sat at the bottom and ate vertical space, squeezing the scrollable details table.

Changes

  • Move the threshold block (slider + Critical/Warning captions) from the bottom section up to directly under the battery gauge it controls, so the details table gets the reclaimed room. IDs are unchanged, so MainActivity needs no edits.
  • Shared style: add Widget.App.RangeSlider, applied to both the home slider and the Settings BatteryRangeSliderPreference, so the two stay in sync. Material 1.14 defaults to tall bar thumbs and a tick dot per step (40 over 10–50), which looked noisy; the style hides ticks and end stop-indicators, uses a compact round thumb snug to the track, and drops the floating value bubble (the captions already show the values).
  • Settings: remove the redundant "Battery Alert Levels" title (the category header "Battery Level Thresholds" already labels it) and delete the now-unused battery_range_title string (en + ar). Shrink the captions and tuck them closer to the slider.
  • Gauge box: the CircularProgressBar measures as a square taller than the bottom-open horseshoe, so the old +10/-10dp margins left more empty space above the arc than below. Retune the top margin so top/bottom spacing matches, without overlapping the toolbar.

Testing

Built and installed on a Huawei Mate 10 Pro (Android 10). Verified on-device: slider sits under the gauge and adjusts thresholds live (gauge colors + captions update), the details table is more visible, Settings matches the home slider, the gauge is vertically balanced, and Arabic RTL looks correct.

🤖 Generated with Claude Code

On the Mate 10 Pro home screen the critical/warning RangeSlider block sat at
the bottom and ate vertical space, squeezing the scrollable details table.

- Move the threshold block (slider + Critical/Warning captions) from the bottom
  section up to directly under the battery gauge it controls; the details table
  now gets the reclaimed room. IDs are unchanged, so MainActivity needs no edits.
- Add a shared Widget.App.RangeSlider style (applied to both the home slider and
  the Settings BatteryRangeSliderPreference) so the two stay in sync. Material
  1.14 defaults to tall bar thumbs and a tick dot per step (40 over 10-50), which
  looked noisy; the style hides ticks and the end stop-indicators, uses a compact
  round thumb snug to the track, and drops the floating value bubble (the captions
  already show the values).
- Remove the redundant "Battery Alert Levels" title from Settings (the category
  header already labels it) and delete the now-unused battery_range_title string
  (en + ar); shrink the captions and tuck them closer to the slider.
- Balance the gauge box: the CircularProgressBar is a square taller than the
  bottom-open horseshoe, so the old +10/-10 margins left more space above the arc
  than below. Retune the top margin so top/bottom spacing matches.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@almothafar almothafar merged commit b92b8a6 into master Jul 12, 2026
2 checks passed
@almothafar almothafar deleted the feature/135-compact-slider-gauge branch July 12, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Home screen: compact the threshold range slider and move it under the gauge

1 participant