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

Icon for Show grid/Snap to grid #785

Closed
masac opened this issue Jan 19, 2019 · 8 comments
Closed

Icon for Show grid/Snap to grid #785

masac opened this issue Jan 19, 2019 · 8 comments

Comments

@masac
Copy link

masac commented Jan 19, 2019

https://drive.google.com/file/d/1Qs3Hdd11TXyFI5ej2MWxXDtnEPGeF63C/view?usp=sharing
I'm a math teacher. Can you add a show grid icon? It would greatly help me to graphically represent geometric figures in space. The MrWriter version would be ideal. Thanks!

@andreasb242
Copy link
Contributor

@morrolinux What do you think, especially: Should we link it to the background, or should we do it independently?

@morrolinux
Copy link
Contributor

Honestly, I think this feature is not needed as of now:
Grid snapping only makes sense when you use "graph" or "dotted" paper, which are easy to pick and apply for all pages when you edit, and can be defaulted back to "plain white" when finished.
Or one could simply edit with "graph" paper and export to PDF with white plain background (like I do).

Given that grid size is not (yet) customizable, and even if it was, it would probably make sense for it to just follow the paper "graph" or "dotted" size (spacing), (maybe size/2 as a toggle) I wouldn't bother developing a feature in contrast with that concept

@andreasb242
Copy link
Contributor

I'm currently working on the Glade UI integration.
We may should add scripting / plugins, for example here we only need to execute a few actions, like change background and change snap to grid, which all are UI Commands.

This is only an idea, It's not sure that it will be done. But there are more and more such requests, and it don't make sense to implement them all in core. But the user would have such a functionality...

andreasb242 added a commit to andreasb242/xournalpp that referenced this issue Feb 22, 2019
xournalpp#785 Allow to change background and grid snapping at the same time
Plugins not yet enabled.
@andreasb242
Copy link
Contributor

I wrote a plugin which does this. Plugins will be available in a short time ;-)

@andreasb242
Copy link
Contributor

You have to enable the Plugin "ToggleGrid" in the Plugin menu, for this you need to build with Lua, or may to wait until new packages / releases are available. It's only available in the Menu.
No Icon yet, at the moment plugins cannot provide icons, this will be done at a later time.

@masac
Copy link
Author

masac commented Feb 23, 2019

Thanks!

@omennia
Copy link

omennia commented Nov 4, 2021

Hello,
I think this is a nice feature.
Although there's no icon for it, is it possible to have a shortcut set for this?
For exemple, the color cycle plugin has the Alt+C shortcut mapped to it.
Is there any way to map a shortcut to this plugin?
If so, how can it be done?

Thanks

@omennia
Copy link

omennia commented Nov 5, 2021

I just realized you just need to add a parameter to a line of code.
It can be found (at least for me) in ~/.local/share/xournalpp/plugins/ToggleGrid

change the line:
app.registerUi({["menu"] = "Toggle Grid Paper", ["callback"] = "toggleGridPaper"});
to:
app.registerUi({["menu"] = "Toggle Grid Paper", ["callback"] = "toggleGridPaper", ["accelerator"] = "<Alt>k"});
And you should now have a mapping of this plugin to the shortcut Alt+k, which you can map to one of your tablet buttons. Simple and useful.

Hope it helps someone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants