Is there is any way to resize the preview pane

Discussion related to "Everything" 1.5 Alpha.
Post Reply
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Is there is any way to resize the preview pane

Post by vsub »

Without using left click and drag
Some kind of command maybe or autohotkey script
The idea is,I want the preview pane to be at specific size in window mode and in a different size when the window is maximized

In Window mode,I have a small visible area(I don't like horizontal scrollbars)and when the window is maximized,I have a lot unused space in he everything window which can be used for a bigger preview window

In window mode,the preview pane needs to be 325 in width and in maximized 1000
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Is there is any way to resize the preview pane

Post by NotNull »

(Moved to Everything 1.5 forum)

The preview pane can be positioned in either the right or the left sidebar. It's width is dictated by the width of the sidebar.
To set the width fof the sidebar (assuming right one for this):

- Create a new bookmark with the following settings:

Name = Small Preview pane
Search (Custom) = /right_sidebar_wide=325
(leave all other bookmark settings as-is)


Selecting this Bookmark (Menu => Bookmarks => Small Preview Pane ) will set the width to 325


Maybe there is also a possibility to read the current ini-value. That would make a toggle option possible (toggle between 3325 and 1000), but I'm not aware of this.
void
Developer
Posts: 16770
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there is any way to resize the preview pane

Post by void »

Maybe there is also a possibility to read the current ini-value. That would make a toggle option possible (toggle between 3325 and 1000), but I'm not aware of this.
/right_sidebar_wide=right_sidebar_wide==325?1000:325



Please consider the following bookmark:

/maximized=!maximized
/right_sidebar_wide=maximized?1000:325



I'll add a window message to make it easy to set the pane sizes from autohotkey.
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Re: Is there is any way to resize the preview pane

Post by vsub »

void wrote: Sat Feb 03, 2024 10:21 pm I'll add a window message to make it easy to set the pane sizes from autohotkey.
Thanks
A message will probably work better because a bookmark is creating a new tab(probably because of some option I have but I actually want to create a new tab with bookmarks but not for something like this)and also,I want this to happen automatically when maximizing\restoring the window

Like auto resizing the preview depending on the window mode(maximized or not)

Edit:Actually I think I can do it right now with that command but the problem with the new tab sill remains
Is there is some command that makes Everything to not create a new tab when I am using a specific bookmark?
void
Developer
Posts: 16770
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there is any way to resize the preview pane

Post by void »

Tools -> Options -> Advanced -> bookmark_open_action
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Re: Is there is any way to resize the preview pane

Post by vsub »

void wrote: Sun Feb 04, 2024 9:05 am Tools -> Options -> Advanced -> bookmark_open_action
Yes but I need to open a new tab,just not for this bookmark
Here is the working Autohotkey code

Code: Select all

#IfWinActive,AHK_class EVERYTHING
~LButton::
; CoordMode,Mouse,Window
MouseGetPoS,X,Y
If Y > 25
Return
WinGetPos,,,Y,,A
Y := Y - X
If Y not between 55 and 98 ; activate only when clicking on the maximize button
Return
Keywait,LButton
WinGet,Size,MinMax,A
If Size = -1
Return
If Size = 1 ; maximized
{
ControlGetPos,,,Y,,EVERYTHING_PREVIEW1,A
If Y != ; the preview panel is on
{
WinMenuSelectItem,A,,Bookmarks,Sidebar
Sleep,50 ; just be be sure it will not close the current tab
Send,^w ; close the new tab
}
}
Else
{
ControlGetPos,,,Y,,EVERYTHING_PREVIEW1,A
If Y != ; the preview panel is on
{
WinMenuSelectItem,A,,Bookmarks,Sidebar
Sleep,50 ; just be be sure it will not close the current tab
Send,^w ; close the new tab
}
}
Return
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Is there is any way to resize the preview pane

Post by NotNull »

void wrote: Sat Feb 03, 2024 10:21 pm
Maybe there is also a possibility to read the current ini-value. That would make a toggle option possible (toggle between 3325 and 1000), but I'm not aware of this.
/right_sidebar_wide=right_sidebar_wide==325?1000:325
Nice, very nice! Will have a lot of fun with that mechanism.


Also discovered tab completion for / search commands while playing around. Thanks for that too!
( For others: type for example /filelist in the search bar and press <tab>. Multiple <tab>s to cycle through all matches )
void
Developer
Posts: 16770
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there is any way to resize the preview pane

Post by void »

Everything 1.5.0.1367a adds the following IPC calls:

Code: Select all

#define EVERYTHING_IPC_GET_LEFT_SIDEBAR_WIDE			520 // int left_sidebar_wide = (int)SendMessage(FindWindow(EVERYTHING_IPC_SEARCH_CLIENT_WNDCLASS,0),EVERYTHING_WM_IPC,EVERYTHING_IPC_GET_LEFT_SIDEBAR_WIDE,0); 
#define EVERYTHING_IPC_GET_RIGHT_SIDEBAR_WIDE			521 // int right_sidebar_wide = (int)SendMessage(FindWindow(EVERYTHING_IPC_SEARCH_CLIENT_WNDCLASS,0),EVERYTHING_WM_IPC,EVERYTHING_IPC_GET_RIGHT_SIDEBAR_WIDE,0); 
#define EVERYTHING_IPC_SET_LEFT_SIDEBAR_WIDE			522 // SendMessage(FindWindow(EVERYTHING_IPC_SEARCH_CLIENT_WNDCLASS,0),EVERYTHING_WM_IPC,EVERYTHING_IPC_SET_LEFT_SIDEBAR_WIDE,320); 
#define EVERYTHING_IPC_SET_RIGHT_SIDEBAR_WIDE			523 // SendMessage(FindWindow(EVERYTHING_IPC_SEARCH_CLIENT_WNDCLASS,0),EVERYTHING_WM_IPC,EVERYTHING_IPC_SET_RIGHT_SIDEBAR_WIDE,320); 


To set the left sidebar width to 325 logical pixels:

Code: Select all

SendMessage(FindWindow("EVERYTHING",0),1024,522,325); 


To set the right sidebar width to 640 logical pixels:

Code: Select all

SendMessage(FindWindow("EVERYTHING",0),1024,523,640); 
vertigo
Posts: 28
Joined: Sun Oct 08, 2017 8:27 pm

Re: Is there is any way to resize the preview pane

Post by vertigo »

How would I have it enable the preview pane (on the right) at a certain size when maximized and disable/hide it when restored? I've tried

Code: Select all

/maximized=!maximized;right_sidebar_wide=maximized?1536:0
but the preview pane only shrinks to a certain point and no further, always remaining visible.
void
Developer
Posts: 16770
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there is any way to resize the preview pane

Post by void »

/maximized=!maximized;right_sidebar_wide=maximized?1536:0;preview_visible=maximized
vertigo
Posts: 28
Joined: Sun Oct 08, 2017 8:27 pm

Re: Is there is any way to resize the preview pane

Post by vertigo »

Thanks!
void
Developer
Posts: 16770
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there is any way to resize the preview pane

Post by void »

Everything 1.5.0.1374a adds an advanced right_sidebar_anchor_left setting.

When enabled, the right sidebar will be anchored to the left of the Everything window.
(same behavior as Everything 1.4)

When disabled, the right sidebar will be anchored to the right of the Everything window.
(same behavior as Windows 11 or later)

To anchor the right sidebar to the left of the Everything window:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    sidebar
  • Select: right_sidebar_anchor_left
  • Set the value to: true
  • Click OK.
Post Reply