Skip to content
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

Add option to display grid in GRC canvas #5672

Open
dkozel opened this issue Mar 22, 2022 · 3 comments · May be fixed by #6822
Open

Add option to display grid in GRC canvas #5672

dkozel opened this issue Mar 22, 2022 · 3 comments · May be fixed by #6822

Comments

@dkozel
Copy link
Contributor

dkozel commented Mar 22, 2022

Feature Description

Add the ability to display the grid that blocks snap to in GRC. This should be toggleable and saved using a preference and have a menu item in the dropdown menu to enable/disable.

Feature Urgency

low (just an idea)

More Information

Thanks to @skoslowski for outlining the steps to implement the drawing of the grid:

To implement it, you'll want to start here: https://github.com/gnuradio/gnuradio/blob/main/grc/gui/DrawingArea.py#L213
The grid size is defined in https://github.com/gnuradio/gnuradio/blob/main/grc/gui/Constants.py#L50
Best add a color in https://github.com/gnuradio/gnuradio/blob/main/grc/gui/canvas/colors.py
To make it optional grep for some action like TOGGLE_SNAP_TO_GRID and add your own in the same manner.

Examples of loading/using/saving the preference can be found here.

self.config.variable_editor_position(sidebar=True))

gnuradio/grc/gui/Config.py

Lines 165 to 166 in f44384a

def blocks_window_position(self, pos=None):
return self.entry('blocks_window_position', pos, default=-1) or 1

@ghost
Copy link

ghost commented Oct 8, 2022

Hi! I'd like to make a contribution - could I claim/maybe get some more info on this other than the ones listed? Thanks!

@sdh11
Copy link
Contributor

sdh11 commented Jan 1, 2023

@dkozel: Here's a start for this feature. I haven't tested on High DPI systems yet, so the scaling might be off. There is no menu option at the moment, but it can be enabled in the main configuration.

@sdh11
Copy link
Contributor

sdh11 commented Jan 1, 2023

flowgraph-grid

@sdh11 sdh11 linked a pull request Sep 8, 2023 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants