-
-
Notifications
You must be signed in to change notification settings - Fork 662
feat: add dynamic overview zoom controls #3194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
barrulus
wants to merge
15
commits into
YaLTeR:main
Choose a base branch
from
barrulus:feature/dynamic-overview-zoom
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+356
−8
Conversation
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
Add configurable zoom presets and bounds to the overview configuration:
- zoom_presets: optional list of zoom levels for cycling
- min_zoom: minimum zoom level (default: 0.05)
- max_zoom: maximum zoom level (default: 0.75)
- zoom_step: step size for zoom adjustments (default: 0.1)
Config syntax:
overview {
zoom-presets 0.5 0.25 0.1
min-zoom 0.05
max-zoom 0.75
zoom-step 0.1
}
Add new actions for controlling overview zoom level: - OverviewZoomCycle: cycle through configured zoom presets - OverviewZoomIn: increase zoom (optional step parameter) - OverviewZoomOut: decrease zoom (optional step parameter) - OverviewSetZoom: set specific zoom level
Add per-monitor runtime zoom state for dynamic overview zoom: - overview_zoom: current zoom level (may differ from config) - overview_zoom_preset_idx: index for cycling through presets Add helper methods on Monitor: - reset_overview_zoom(): reset to config default - cycle_overview_zoom(): cycle through presets - adjust_overview_zoom(): adjust by delta with bounds - set_overview_zoom(): set specific level with bounds Update compute_overview_zoom() to accept target zoom parameter.
Add handlers for the new overview zoom actions: - OverviewZoomCycle: cycle through configured zoom presets - OverviewZoomIn: increase zoom by step amount - OverviewZoomOut: decrease zoom by step amount - OverviewSetZoom: set specific zoom level All actions are no-op when overview is not open. Zoom changes apply to all monitors and trigger redraw.
Document the new overview zoom controls: - zoom-presets, min-zoom, max-zoom, zoom-step config options - overview-zoom-cycle, overview-zoom-in, overview-zoom-out, overview-set-zoom actions This code has been created with LLM assistance
8fd71b8 to
92d0452
Compare
|
Nice i really loved your idea zoomable overview hope this gets accepted |
Remove min-zoom, max-zoom, and zoom-step config options in favor of zoom-presets for cleaner API. Add overview-zoom animation config.
This comment was marked as resolved.
This comment was marked as resolved.
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.
Summary
zoom-presetsconfig option for overviewoverview-zoom-cycle,overview-zoom-in,overview-zoom-outactionsoverview-zoomanimation configThis allows users to dynamically adjust the overview zoom level to see more or fewer workspaces at once.
Design alignment
This implementation follows niri's design principles:
zoom-presetsis not configured, zoom actions are no-ops. The runtime zoom state is minimal (one f64 per monitor).Example config
Test plan
zoomvalueCloses: discussion #3047