Feature - Implemented Let Main window remember last size when launched

tgetgel

Member
Everytime I launch mafia, the main window extends behind the taskbar (Windows XP, almost latest daily build, screen size 1024 x 768).

main window.jpg (The top was trimmed in the capture and edit process)

I can resize the window, but when I relaunch mafia, it is this size again. (Note the refresh button barely visible above the task bar. This has been going on for a long time.
 

StDoodle

Minion
I've had this happen; the size doesn't appear to get saved for me either. If I'm hooked into my monitor, it's fine, but if I take the laptop elsewhere it's kind of a pain. I just assumed it was one of those windows / gui issues that can't really be handled perfectly from java. Then again, I can never get "minimize to tray" to work either. /me is confused
 

jasonharper

Developer
Mafia only remembers window positions, not size. The size depends on the initial contents of the window, which could very well be of a different size than on your last launch due to changes in the program (or due to moving your prefs to a different computer that has differently-sized controls or fonts).

Some increase in vertical size is to be expected if you have the Gear Changer as one of your startup tabs, due to the recently added offhand filtering buttons.
 

Winterbay

Active member
Is the same sort of resizing supposed to happen with the chat window? I seem to have too many tabs/channels open up at the same time meaning that 2 or 3 of them always end up off screen until I resize the window myself.
 

icon315

Member
Isn't there a way for the gear changer to be opened in its own individual window. I tried it but it just gave me a blank page.
 

Bale

Minion
I would really appreciate it if mafia remembered the window size for the main frame since I do have the Gear Changer as one of my startup tabs. Adding this feature would make my mafia experience better, even if it only worked for the main frame.

I'm going to change the tag from bug to feature request. (Small change to thread title's wording.)
 

fronobulax

Developer
Staff member
I started having the same problem recently as well, but figured it was Windows 7 that was refusing to remember the shrunk settings. Personally I would like mafia remember and use the last window size that I set. With all due respect to Jason, I think my preferred size should override what information mafia wants to display. That's the way Firefox behaves and why there are scroll bars. I'd be interested in more discussion since if I agree with the consensus this is something that I would work on.
 
Last edited:

StDoodle

Minion
I tend to agree; even on my larger external monitor, I often re-size mafia such that the gear changer has a scroll bar. I like having it in a tab by default, but it's a bit larger than what I usually need (mostly the stickers; I use those maybe twice per run -- it's great to have them there, but I rarely mind if they scroll off of the screen).
 

Grotfang

Developer
I also agree with this. My home computer isn't a problem, but on my smaller laptop mafia is so big that both top and bottom disappears. This means to move/resize/etc I have to click on the toolbar icon, right click KoLmafia, click maximize, and then I can play the way I want to.
 

Ethelred

Member
Add my vote for this feature. Futhermore, I'd like to see it extended to the gCLI window as well. I open that as a window and always have to resize it when I start mafia. Not a big deal, but not having to do it multiple times a day would save me a lot of needless repetition over time.

Also add me to the people who probably wouldn't play KoL anymore without mafia to ease the way. So thanks to all the people who do all the work to make KoL a more enjoyable experience.
 

Bale

Minion
Add my vote for this feature. Futhermore, I'd like to see it extended to the gCLI window as well. I open that as a window and always have to resize it when I start mafia. Not a big deal, but not having to do it multiple times a day would save me a lot of needless repetition over time.

Why, does it start off really tiny? You don't want to open it as a tab in the main interface?
 

fronobulax

Developer
Staff member
My laptop is my home computer and at 1200x800, which is the best resolution supported, the mafia window is as tall as the screen and positioned so that the bottom portion is obscured by the taskbar and partially off the screen.
 

tgetgel

Member
My vote is to remember and use the last main window size and allow scrollbars on the gear changer tab (since they show up there after I resize the window anyway).
 

tgetgel

Member
Please excuse my ignorance in how java handles this window size issue, but can the setting be like the frame settings in the prefs.txt file?
Code:
BuffRequestFrame=443,20
CakeArenaFrame=614,67
CharSheetFrame=269,85,-1
CoinmastersFrame=309,177,0
ContactListFrame=309,110
CouncilFrame=308,179,-1
DescriptionFrame=608,203,-1
ItemManageFrame=339,141,-1
KoLDesktop=80,13,-1
LoginFrame=273,121,0
MailboxFrame=258,175,0
MaximizerFrame=338,92
MeatManageFrame=529,115
MuseumFrame=-1,-1,2
OptionsFrame=406,93,6
ProfileFrame=506,187,-1
RecentEventsFrame=352,348
RequestFrame=515,160,-1
RequestSynchFrame=208,107,-1
SendMessageFrame=414,1,-1
StoreManageFrame=235,10,0
TabbedChatFrame=523,439,0
Are they like the same thing or is the window size different?
 
Last edited:

Veracity

Developer
Staff member
The third parameter says which tab to select on the frame. Frames with no tabs need only two parameters.
 

fronobulax

Developer
Staff member
The good news is it is a one line addition to hardwire the Desktop window size (and that works). The bad news is the right solution is to save the last size and restore the window to it and that is not quite as trivial. But I am poking at it...
 
Top