feat(dash): scrollbars on scrolling panels, with click-and-drag#92
Open
michaelroy-amd wants to merge 1 commit into
Open
feat(dash): scrollbars on scrolling panels, with click-and-drag#92michaelroy-amd wants to merge 1 commit into
michaelroy-amd wants to merge 1 commit into
Conversation
Panels gave no sign when content overflowed. Add reusable `panel::vertical_scrollbar` / `horizontal_scrollbar` helpers (no-op when content fits, else draw a bar and return the shrunk content rect) and wire them into the job console (V+H), the LOGS dock, bench detail, chat transcript, and the list managers. Scrollbars are also click-and-drag: each drawn bar records a hit-test handle; a click on a track jumps to that position and arms a drag that keeps tracking the pointer until release (inverting the tail-anchored dock). Also clamps the job console's horizontal offset against the widest line. Stacked on the progress-spinner branch (shared job-console render path). Signed-off-by: Michael Roy <michael.roy@amd.com>
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.
What
Panels gave no visual sign when their content overflowed, and there was no way to grab a scrollbar with the mouse.
panel::vertical_scrollbar/horizontal_scrollbarhelpers: no-op when content fits, otherwise draw a bar and return the shrunk content rect.Excluded on purpose: the list managers' bars are drag-to-jump-selection would be awkward (they're driven by
ListStateselection), so those show a bar but aren't draggable. Easy follow-on.Tests
panel::tests: no-op-when-fits, shrink-on-overflow (V and H).app::tests: proportional position mapping, full grab → drag → release cycle, dock inversion.--test-threads=1), clippy-D warningsclean.Notes
Part 2 of 3. Stacked on #91 (both touch the
draw_job_consolesignature / call site) — please merge #91 first, then this retargets tomain.