Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Interactive setting of savefig rcParams (Qt only). #7696

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

Closed

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Dec 29, 2016

An additional window pops after selecting the filename to allow setting
of savefig-related rcParams.

For simplicity and consistency, the "ps.usedistiller" rcParam is now
normalized to None when not set.

Closes #7352.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Dec 29, 2016
@tacaswell
Copy link
Member

👍 in principle.

Is there a way to work this into the UI other than another modal dialog box? How much can we hack on the filepicker?

@WeatherGod
Copy link
Member

WeatherGod commented Dec 29, 2016 via email

@anntzer
Copy link
Contributor Author

anntzer commented Dec 30, 2016

A quick googling suggests that it is possible to embed a QFileDialog within, say, a QHBoxLayout so that one has a standard filepicker on the left and the options panel on the right. It would require quite a bit more effort to implement though.

Right now the second window always pops up but you can just through it, and it is not different from the behavior of, say, Inkscape when saving to a format where options are available, and it's not that intrusive either.

@anntzer anntzer force-pushed the interactive-qt-savefig-options branch from 173a197 to 3652e4a Compare December 30, 2016 00:02
@anntzer
Copy link
Contributor Author

anntzer commented Jun 4, 2017

Upon further searching, I now believe that it is not possible to embed a Qt file dialog into a larger widget, unless we choose to not use the native file dialog (see difference at https://kb.froglogic.com/display/KB/Automating+native+or+Qt+%28file%29+dialogs+in+Qt+applications#AutomatingnativeorQt%28file%29dialogsinQtapplications-DialogsinQtapplications). (The reason being that a native file dialog can be anything and Qt cannot know how to embed it.)

In my opinion, using the native dialog is much preferrable from a UI POV, so I'd rather keep this PR as it is (except for a rebase).

@anntzer anntzer force-pushed the interactive-qt-savefig-options branch from 3652e4a to dbb34b1 Compare June 4, 2017 08:56
@anntzer
Copy link
Contributor Author

anntzer commented Jun 4, 2017

I put together an alternative implementation, which uses an additional menu for setting the options. The toolbutton menu is easy enough to discover (so that the feature actually gets used...) without being as conspicuous as an additional tool button. Not sure how this would interact with MEP22 though.

screenshot_20170604_143843
screenshot_20170604_143913

@anntzer anntzer mentioned this pull request Jun 4, 2017
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Aug 29, 2017
@anntzer anntzer force-pushed the interactive-qt-savefig-options branch from 53f9c7c to 09979bd Compare November 4, 2017 06:58
@fariza
Copy link
Member

fariza commented Dec 5, 2017

Maybe too late for this, but why don't use a canvas and the widgets that we have, this way, we can reuse for other backends

@anntzer
Copy link
Contributor Author

anntzer commented Dec 5, 2017

I think a native window is just much nicer. See also #8683.

@fariza
Copy link
Member

fariza commented Dec 5, 2017

Yes I agree that native widgets are much nicer.
The problem is: this just makes backend maintenance a lot harder.
This is the main point of MEP22 and MEP27

@dopplershift
Copy link
Contributor

I'm not a fan of adding more Qt-only features, unless we decide that's really the direction the project wants to go in.

@anntzer anntzer mentioned this pull request Feb 17, 2018
6 tasks
@anntzer anntzer force-pushed the interactive-qt-savefig-options branch 2 times, most recently from f863e69 to 17d5cac Compare February 26, 2018 22:48
An additional window pops after selecting the filename to allow setting
of savefig-related rcParams.

For simplicity and consistency, the "ps.usedistiller" rcParam is now
normalized to `None` when not set.
@anntzer anntzer force-pushed the interactive-qt-savefig-options branch from 17d5cac to 2129eb0 Compare February 27, 2018 00:55
@jklymak
Copy link
Member

jklymak commented Jul 16, 2020

@anntzer I'll close this as not likely to move forward, but feel free to reopen if you want to re-pursue

@jklymak jklymak closed this Jul 16, 2020
@anntzer anntzer deleted the interactive-qt-savefig-options branch July 16, 2020 10:02
@story645 story645 removed this from the future releases milestone Oct 6, 2022
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.

expose savefig.transparent / savefig.dpi in the UI
7 participants