Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Write status message in single line in Qt toolbar.#4329
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Currently, the status message is partially hidden when embedding aToolbar in a Qt4 app (see e.g. embedding_in_qt4_wtoolbar.py: activatethe pan tool and hover the mouse over the figure; the two lines of thestatus messages don't fit in the toolbar).The split-line message was introduced in3c61684 to avoid automatichorizontal expansion of the toolbar in presence of long messages (Iguess) but I cannot reproduce that issue right now.
mfitzp commentedApr 12, 2015
I have found a reference to the issue of If it's still reproducible it should be fixable by applying correct/additional size policies to the widgets. |
mfitzp commentedApr 12, 2015
I can't replicate the horizontal expansion bug from3c61684 in latest PyQt5 (Qt 5.4.1) and PyQt4, PySide (Qt 4.8.6) on MacOS X. I'll check Windows/Linux tomorrow in case of platform weirdness. An alternative to manual line-wrapping is |
mfitzp commentedApr 14, 2015
I can confirm the old expanding window bug no longer occurs on PyQt4 or PyQt5 (on Qt 4.8.6 and Qt 5.4.1) on Windows. So I think it is safe to revert this change. However, the result is still kind of ugly, so I think it might be worth trying to improve that while we're looking here. There are two options:
The code for wrapping and stripping is as follows: The use of The text-eliding option can be done with: @anntzer what do you think to either of these? |
anntzer commentedApr 14, 2015
I think shrinking is by far nicer than elision, but
|
OceanWolf commentedApr 14, 2015
@mfitzp Not sure how much work should go into this as MEP22 should completely revolutionise this, ensuring that the toolbar goes on a completely separate line so as to leave more room for tools. so I feel inclined to say that we should fix the example file itself rather than Qt. @tacaswell can you clarify the timetable for MEP22? I.e. will the rcParam controlling its use change straight away, or make the default rcParam switch-over at a later day. If at a later date, will we actively promote that people switch to MEP22? I ask because I guess the answers will decide whether we update the embedding docs to use MEP22 now, or at that later date. |
tacaswell commentedApr 14, 2015
@mdboom and@efiring need to weigh in on the time line. We definitely need I know it is annoyingly conservative, but we can't break existing user code. On Tue, Apr 14, 2015 at 11:35 AM OceanWolfnotifications@github.com wrote:
|
OceanWolf commentedApr 14, 2015
@tacaswell No problem, just wondered when should we change the embedding examples? For example I now see we didn't converthttps://github.com/matplotlib/matplotlib/blob/master/examples/user_interfaces/embedding_in_gtk3_panzoom.py during#3652. Anyway, from your comment I see whatever happens it won't get made default straight away, so that just leaves the question do we want to encourage people to switch early, i.e. by changing the embedding examples as the backends? Basically I see it as, without MEP22 the embed example for QT should get rewritten to follow the pattern (P.S. Definitely agree on getting all backends converted first, but for now I work on the assumption that we will get that done for the next point release) |
WeatherGod commentedJul 12, 2015
is this PR finished? are there outstanding issues? |
anntzer commentedJul 12, 2015
I agree with@mfitzp that the result is a bit ugly but it is certainly more usable than the status quo, and less ugly than getting "zoom rect" broken into two lines. |
OceanWolf commentedJul 13, 2015
@anntzer which option do you think we should use, do we need any changes to this PR? As I said above the whole toolbar will get a complete overhaul soon, so this will only act as a short-term fix for those using the current soon to become old toolbar... |
WeatherGod commentedJul 13, 2015
Keep in mind "soon" will likely be the next point release after 2.0. Which On Mon, Jul 13, 2015 at 4:16 PM, OceanWolfnotifications@github.com wrote:
|
tacaswell commentedJul 13, 2015
We should err on the side of short term fixes here. I suspect we are not On Mon, Jul 13, 2015, 4:16 PM OceanWolfnotifications@github.com wrote:
|
anntzer commentedJul 14, 2015
I'll stick with the original PR, which is less ugly imho... |
WeatherGod commentedJul 14, 2015
Just had a thought. How does this look now with the new feature showing the image value on mouseover of an image? |
anntzer commentedOct 20, 2015
Kindly asking whether this should go to 1.5 as a short term fix (perhaps it's too late now?) or just be subsumed by MEP27 (feel free to close this and reopen a similar issue on MEP27's side if this is the case). |
mdboom commentedOct 20, 2015
I don't think we need to wait on MEP27 for this. Have you had a chance to investigate@WeatherGod's question?
|
anntzer commentedOct 20, 2015
With the old code, the x, y and image values are still cropped and half visible below the "pan/zoom" text. With the PR, the text can sometimes be too long to fit in a single line, depending on the width of the window (I guess it was already the issue before but it didn't appear with the default size used in the |
mdboom commentedOct 20, 2015
Thanks! |
Write status message in single line in Qt toolbar.
Write status message in single line in Qt toolbar.
mdboom commentedOct 20, 2015
Backported to v1.5.x as50f373f |


Currently, the status message is partially hidden when embedding a
Toolbar in a Qt4 app (see e.g. embedding_in_qt4_wtoolbar.py: activate
the pan tool and hover the mouse over the figure; the two lines of the
status messages don't fit in the toolbar).
The split-line message was introduced in3c61684 to avoid automatic
horizontal expansion of the toolbar in presence of long messages (I
guess) but I cannot reproduce that issue right now.