Skip to content

gui: add an option for arrow keys scroll acceleration#10983

Open
SquareRobin wants to merge 5 commits into
The-OpenROAD-Project:masterfrom
SquareRobin:arrow-scroll-accel-option
Open

gui: add an option for arrow keys scroll acceleration#10983
SquareRobin wants to merge 5 commits into
The-OpenROAD-Project:masterfrom
SquareRobin:arrow-scroll-accel-option

Conversation

@SquareRobin

@SquareRobin SquareRobin commented Jul 24, 2026

Copy link
Copy Markdown

Summary

Scrolling with the arrow keys is convenient, but the acceleration is controlled only by the system. Adding an option for acceleration does not overcomplicate the settings and makes arrow keys scrolling a bit more practical.
Testing with different key repeat settings did not reveal any problems related to different auto-repeat frequencies and delays.

Type of Change

  • New feature

Impact

Adds a checkbox to the "Options" menu.

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have signed my commits (DCO).

Signed-off-by: Igor Sokolov <disk.destroyer@yahoo.com>
@SquareRobin
SquareRobin requested a review from a team as a code owner July 24, 2026 14:50
@SquareRobin
SquareRobin requested a review from gadfort July 24, 2026 14:50

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an option to enable scroll acceleration when using arrow keys in the GUI layout viewer. It propagates the new configuration option through the MainWindow, LayoutTabs, and LayoutScroll classes, and implements the acceleration logic in LayoutScroll's key press event handler. The review feedback suggests aligning the newly added member variables and constants with the project's naming conventions (using snake_case_ and kCamelCase). Additionally, it recommends refining the acceleration logic by using floating-point division with rounding to prevent abrupt jumps caused by integer division, and resetting the acceleration counter when the active scroll key changes.

Comment thread src/gui/src/layoutViewer.h Outdated
Comment thread src/gui/src/layoutViewer.cpp
Igor Sokolov added 4 commits July 24, 2026 17:53
Signed-off-by: Igor Sokolov <disk.destroyer@yahoo.com>
switch to float with static_cast to int in the multiplier calculation

Signed-off-by: Igor Sokolov <disk.destroyer@yahoo.com>
Signed-off-by: Igor Sokolov <disk.destroyer@yahoo.com>
Signed-off-by: Igor Sokolov <disk.destroyer@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant