Feature - Implemented Let Main window remember last size when launched

tgetgel

Member
Is there a way just to have it "fit" when it loads the main window from launch? I know this solution does not remember how the window was left (which is the ideal state), but at least you could easily get to the corners to resize it.
 

Theraze

Active member
Isn't that already what it does? Just that it fits ALL the tabs you load into the window, not just the visible one on the front... right?
 

fronobulax

Developer
Staff member
My understanding of what is happening now is that the initial window size is determined by what is required so that things fit. For most people, having the Gear Changer as a tab was what determined a size that was unfortunately too large for some of us.

My plan, subject to revision, is to create new configuration variables for height and width. On start up, if they are set then they are used. Otherwise it behaves as it does now. On shutdown the current size of the window is saved as the configuration. People who don't re-size the window should not see any change until they mess with which tabs are where. When I think it through, overwriting the configuration probably needs to be a preference because there is bound to be someone who likes the resizing when tabs are added or removed from start up. Even with that there are probably some things people will complain about where the work around begins with "edit your settings file"...
 

Theraze

Active member
My response was actually regarding this:
Is there a way just to have it "fit" when it loads the main window from launch? I know this solution does not remember how the window was left (which is the ideal state), but at least you could easily get to the corners to resize it.

My understanding is that this is already the current behaviour.
 

fronobulax

Developer
Staff member
My response was actually regarding this:

My understanding is that this is already the current behaviour.

@Theraze - I thought we were saying the same thing with the only difference being I have looked at the code within the past 60 minutes ;-)

@tgetgel - The initial window is sized based upon the content. The content is determined by which tabs are enabled. KoLmafia does not remember the size from session to session.
 

Winterbay

Active member
Would it be possible to get the chat to adhere to that thinking as well? At the moment my chat opens up with tabs being outside the window meaning that I need to resize the chat window to see them all.
 

tgetgel

Member
The initial window is sized based upon the content. The content is determined by which tabs are enabled. KoLmafia does not remember the size from session to session.
The initial request was for the main mafia window to remember it's size from session to session.
 

Theraze

Active member
@fronobulax Heh. Fair enough. :)

The initial request was for the main mafia window to remember it's size from session to session.
Yes... but the request of yours we responded to (sent today) was for the existing behaviour to continue, as a solution for the feature request. If that's actually acceptable, then one of the Minions can close this with Feature - Rejected. :)
 

fronobulax

Developer
Staff member
I understood the original request as noting a problem where the mafia Desktop window is so large that part of it disappears behind the Windows XP Taskbar. I have a similar problem on a Windows 7 laptop.

I can think of several possible solutions. I have a working solution where the window always has a hardwired size (rather than a dynamic one based upon what tabs are present) but I find that inelegant and so am slowly working on something I think is better.
 

Theraze

Active member
Well, he says he wants it to "fit" but says that resizing it is fine... if so, you can also resize from the upper left corner, so having it fit the content does meet the need.

That being said, fronobulax's eventual fix is likely what tgetgel actually wants. :D
 

fronobulax

Developer
Staff member
r9067

New user preference, rememberDesktopSize which defaults to false and can currently only be changed by editing user_prefs.txt. If false then the desktop window is sized based upon the contents which is what happened before r9067. If it is true then the window size is set using the user preferences desktopHeight and desktopWidth. When the window is disposed of the current dimensions are saved as the preferences, thus remembering the last size.
 

Grotfang

Developer
New user preference, rememberDesktopSize which defaults to false and can currently only be changed by editing user_prefs.txt.

Nice work! I'm already using it :)

Just so no-one gets confused, if mafia is already running, editing your user_prefs.txt file may not have a lasting effect. Instead, enter into the CLI:

Code:
set rememberDesktopSize=true
 

fronobulax

Developer
Staff member
Whoops. I almost never remember that I can set preferences in the CLI. Any references to "only" are erroneous.

Veer - I did spend a couple minutes trying to figure out how to mark this as implemented but obviously failed.
 
Top