peter-frentrup / NppMenuSearch

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

keep same size of search field if i resize the window #37

Open CennoxX opened 2 years ago

CennoxX commented 2 years ago

If I resize the Notepad++ window the size of the search field changes from my set size in the maximized window to a smaller search field: output

A related problem is that if I close the now un-maximized window with the shrunken search field and then reopen Notepad++, the search field remains shrunk even if I maximize the window again. This might be related to issue #8. close

Gitoffthelawn commented 2 years ago

I can confirm this issue (as of the last time I tried this extension, which was a few months ago).

peter-frentrup commented 2 years ago

Hello, thank you for your report. It seems that you have installed the CustomizeToolbarPlugin. IIRC, last time I checked it worked by adding invisible buttons to the primary toolbar or some similar trick to grab space. That would explain why the search field shrinks when you restore the window size from maximized state (first animation). This issue is an example of two toolbars fighting for available space, so there exists probably no good fix.

For the other issue (second animation): the search field just recognized that its width was changed, but it does not know whether it was by the user actively grabbing the toolbar handle or by Windows realigning things upon window resize. When reopening, it just tries to restore the last seen width.

Sorry, Peter

Gitoffthelawn commented 2 years ago

Thanks for you explanation Peter.

One possible solution would be to merge this helpful plugin with the CustomizeToolbar plugin. That way there wouldn't be two toolbars fighting for available space. I'm not sure if that interests you at all, but it's an idea. Either that, or maybe the two separate plugins could communicate with each other.

Personally, I find both plugins to be very helpful. In the end, I found the CustomizeToolbar plugin to be slightly more valuable, so I uninstalled this plugin. I certainly miss it, but having to manually adjust the size and position got to be a bit too much of a hassle for my taste.

CennoxX commented 2 years ago

You're right, I use the CustomizeToolbarPlugin. But even without CustomizeToolbarPlugin the field doesn't keep the same size: output

peter-frentrup commented 1 year ago

The resizing logic is how the Windows Rebar control works. There is not a lot I can do.

Sorry, Peter