peter-frentrup / NppMenuSearch

Notepad++ Menu Search Plugin
Other
39 stars 11 forks source link

Search toolbar size issue #8

Open bahusoid opened 7 years ago

bahusoid commented 7 years ago

Could you please undo your commit da305ed2cfb0b2e40b624de0be20692b760b99f1 that you made for #2.

It doesn't really fix the issue on affected Notepad++ versions (6.7 - 7.4.1). See my comment with details: https://github.com/peter-frentrup/NppMenuSearch/issues/2#issuecomment-294471843

Plus it adds undesired behavior when I disconnect my external display and run Notepadd++ on notebook monitor with different resolution.

I found and fixed the root of this issue right inside Npp++ - https://github.com/notepad-plus-plus/notepad-plus-plus/pull/3386

peter-frentrup commented 6 years ago

Hi,
the problem of not displaying the suggestions window (also reported as issue #9) should be fixed now. I don't know what caused that issue, but from the code changes, I don't understand how da305ed could have caused it.

Apart from that, I think remembering the search box width is a useful feature and I cannot reproduce your other issues (I have no high DPI monitors, in case that is related).

So I am not convinced that undoing da305ed is a good thing.

bahusoid commented 6 years ago

Hi, Thanks for fixing #9.

But sizing doesn't work for me at all in 0.9.2 with Notepad++ 7.5.1. Here is how window looks before I close Notepad++: nppsearchmenubeforeclose

PreferredToolbarWidth setting saved as 619

And here is how it looks after Notepad++ restart: nppsearchmenuonrestart

Anyway I don't understand usage scenario for this behavior. It make sense to save/restore size only if Notepad++ window maximized (but again - it won't work nicely if it's opened on different monitor with different resolution, and for some reasons it doesn't work for me even with single monitor). I can close notepad windowed with some small window size and saving those values as preferred is not a desired behavior.

peter-frentrup commented 6 years ago

So, on your machine the plugin behaves as if the PreferredToolbarWidth was not saved? (However, the screenshot of step 3 in your comment https://github.com/peter-frentrup/NppMenuSearch/issues/2#issuecomment-294471843 is even more mysterious to me). This is strange, I cannot reproduce it. I will try it again when I have access to a Windows 10 machine.

On the other hand, if I would undo commit da305ed, then Notepad++ would always look like in your second screenshot after a restart, with minimum width, so I don't see the benefit of a revert.

The usage behaviour you don't understand or need (if it would work correctly on your machine) is exactly what I like: restore the text box width. For example, I hardly ever maximize any window on my machine, and behaviour that only happens with a maximized window is not helpful for my workflow.

bahusoid commented 6 years ago

So, on your machine the plugin behaves as if the PreferredToolbarWidth was not saved?

Not sure. If I exit second time (with small toolbar) - it's saved as 125. So for some reasons plugin can't restore properly saved width.

On the other hand, if I would undo commit da305ed, then Notepad++ would always look like in your second screenshot after a restart, with minimum width, so I don't see the benefit of a revert.

No. It fills properly all available space (same behavior as in old Notepad++ with old plugin version without this fix). I'm talking about 7.4.2+ versions where I fixed toolbar initialization logic that was broken in 6.7.

peter-frentrup commented 6 years ago

Not sure. If I exit second time (with small toolbar) - it's saved as 125. So for some reasons plugin can't restore properly saved width.

Do you have a high DPI monitor? Is the saved value correct and only the restoring implementation broken or is the saved value wrong, too?

No. It fills properly all available space (same behavior as in old Notepad++ with old plugin version without this fix). I'm talking about 7.4.2+ versions where I fixed toolbar initialization logic that was broken in 6.7.

Ah, ok, I didn't remember. But to be honest, I don't like an always-maximized search box. I want it small, but large enough to show the whole cue text if there is enough space for it.

I am not on my Windows machine currently, so I am not sure, which version of Notepad++ I have installed. Maybe not yet 7.4.2? Maybe that causes my width-restoring implementation to fail? I will check.

bahusoid commented 6 years ago

Do you have a high DPI monitor?

No. Pretty standard 16/9 1920*1200

Is the saved value correct and only the restoring implementation broken or is the saved value wrong, too?

Saved value around 620 seems correct to me. And if I don't resize it back it's saved as 125. So I would say it's "restoring implementation".

bahusoid commented 6 years ago

For example, I hardly ever maximize any window on my machine

Actually it could be the case. I just checked and "size restoration" works for me if window is not maximized. But if I exit Notepad++ with maximized window - size is not properly restored.

peter-frentrup commented 2 years ago

I hope, this now properly works in version 0.9.5

bahusoid commented 1 year ago

I hope, this now properly works in version 0.9.5

It's much better now. It saves and properly restore size if I close Notepad++ maximized or maximize/de-maximize it. But If I close it not maximized and then after restart maximize it again - maximized size is not properly restored.