Commit Graph

10 Commits (eef877d6ce24f84183b15d467f7db0851a6dae1a)

Author SHA1 Message Date
Peter Hutterer eef877d6ce tuhi: use a Gtk.FileChooserNative dialog
This one hooks into the correct portal APIs, hopefully fixing the issue with
the Flatpak version not saving files correctly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-26 11:03:26 +10:00
Ishak BELAHMAR bbff179a4d Add png export feature 2019-09-30 09:50:03 +02:00
Peter Hutterer bb9f9b6c26 gui: reshuffle the includes until gi and flake8 are happy
We have implied inclusion orders here, specifically with gi. This works as
long as the files are included in the right order from other files but its not
generic enough - we really do need the gi.require_version() bit
everywhere to avoid issues.

Of course, once we do this flake8 complains about everything so let's
reshuffle things in an order it's happy with. This seems to be local modules
first, then ... whatever except when not?

application.py is excluded from this patch because it's about to get changed
in the next one and I'm too lazy to separate those out.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-29 10:42:44 +10:00
Peter Hutterer d514aa2224 gui: rename refresh() to process_svg()
refresh was accurate when it ended up redrawing the screen but now that
redrawing is a separate function let's rename this.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-22 15:52:25 +10:00
Peter Hutterer 8c9454a298 gui: don't regenerate the SVG when the rotate button is clicked
Do this when we're saving the file instead and rotate the pixbuf itself only.
For the tablet-wide orientation we regenerate the SVGs because this is
supposed to be a once-off setting so being smart here doesn't gain us
anything.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-22 15:52:25 +10:00
Peter Hutterer d633637899 gui: initialize the drawing with the right zoom factor
Fixes #172

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-21 11:49:26 +02:00
Peter Hutterer 10c34bc655 gui: simplify the Config's singleton pattern
Use __new__ instead of instance(), this way we can just use the same config
object as Config().do_something.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>k
2019-08-20 12:19:52 +10:00
Peter Hutterer 64fcf04e32 svg: use our Json SVG converter from kete
A few minor changes like passing in a filename and fixing the different
spellings of the orientations.

In order to use it from kete though we have to mess with the PYTHONPATH. But
since it's a in-tree tool only anyway... meh.

This loses the ability to disable pressure on tablets. I think that's just a
leftover from before we knew how to handle pressure in SVG exports. We should
just fix that properly instead of having a config option here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-20 12:02:30 +10:00
Peter Hutterer ac811920b8 tuhi: move the gui/svg.py file to tuhi
One JSON to SVG converter per project is enough.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-20 12:02:30 +10:00
Peter Hutterer e6057e256d Merge tuhigui into tuhi.gui
Let's make this a submodule of tuhi so we can share some code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-14 08:18:39 +10:00