StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
berlihingen  
#1 Posted : Friday, January 15, 2021 9:00:34 PM(UTC)
berlihingen

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 11/10/2020(UTC)
Posts: 30

Was thanked: 1 time(s) in 1 post(s)
That function present f.e. in 4t Tray Minimizer which I used to use, it collapses Windows OS window to the title – but classic windows only, doesn't work with modern Store Apps.
Can't find anything myself – maybe someone knows such a script that may be used in S+?
Rob  
#2 Posted : Saturday, January 16, 2021 12:28:55 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Without installing a system hook, which would be better served with a plug-in DLL or EXE, this is about as close as you can get without getting too crazy.

If an app enforces a minimum height, like the S+ Settings window, it will only reduce the height to the minimum height.

Code:
// Rollup window, but app can override the zero height and enforce a minimum height

sp.StoreRectangle(`RollupWindow_${action.Window.HWnd.ToString()}`, action.Window.Rectangle);
action.Window.Size = new Size(action.Window.Rectangle.Width, 0);

Code:
// Restore window size, start gesture on title bar of rolled up window

var orgRect = sp.GetStoredRectangle(`RollupWindow_${action.Window.HWnd.ToString()}`);
action.Window.Size = new Size(orgRect.Width, orgRect.Height);
berlihingen  
#3 Posted : Saturday, January 16, 2021 8:22:20 AM(UTC)
berlihingen

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 11/10/2020(UTC)
Posts: 30

Was thanked: 1 time(s) in 1 post(s)

This works perfectly with browser PWAs where I need it most, thank you very much!
Rob  
#4 Posted : Saturday, January 16, 2021 1:40:02 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Also, if you notice that multiple rollup/rolldown events are slowly shrinking the width or height of the window, change the rollup to this instead:
Code:
sp.StoreRectangle(`RollupWindow_${action.Window.HWnd.ToString()}`, action.Window.AbsoluteRectangle);
action.Window.Size = new Size(action.Window.AbsoluteRectangle.Width, 0);

Edited by user Saturday, January 16, 2021 1:41:12 PM(UTC)  | Reason: Not specified

berlihingen  
#5 Posted : Saturday, January 16, 2021 2:37:16 PM(UTC)
berlihingen

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 11/10/2020(UTC)
Posts: 30

Was thanked: 1 time(s) in 1 post(s)
Thanks!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.