-
Notifications
You must be signed in to change notification settings - Fork 186
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
Export layout as svg #132
base: main
Are you sure you want to change the base?
Export layout as svg #132
Conversation
0d5f1e3
to
b69f857
Compare
8b878f6
to
1a4f8db
Compare
This is sweet. I'm not in core, so take my suggestions with a grain of salt:
Is there something non core contributors can do to move this forward? |
@kbrock Done and done. |
generator.setSize(QSize(widget.width, widget.height * self.keyboard.layers)) | ||
generator.setViewBox(QRect(0, 0, widget.width, widget.height * self.keyboard.layers)) | ||
generator.setFileName(filename) | ||
generator.setTitle("My Keymap") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use keyboard name here, as it appears in the keyboard selector dropdown
generator.setViewBox(QRect(0, 0, widget.width, widget.height * self.keyboard.layers)) | ||
generator.setFileName(filename) | ||
generator.setTitle("My Keymap") | ||
generator.setDescription("Keymap generated from Vial") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If optional, omit this.
Any chance this could be merged? would be a very useful feature to have. |
II haven't had time to implement the changes requested by @NCKiser. If they are blocking, somebody else can give it a go, maybe. |
This is a very useful feature. I suggest the following changes to output device name: self.keymap_editor.export_as_svg(dialog.selectedFiles()[0], self.combobox_devices.currentText())
...
def export_as_svg(self, filename, device_name):
...
generator.setTitle(device_name) @NCKiser, if @groig has no time to implement fix this way or another is it possible to merge this PR and then merge a new one I'd create for this issue? |
This is useful for showing the layout in readmes and blog posts
Example output