os-js / osjs-filemanager-application

OS.js File Manager Application

Home Page:https://manual.os-js.org/v3/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Global configuration option to change default window dimensions

josephjeno opened this issue · comments

It would be great to have an option in config to specify the default application window dimensions. On a large monitor the file manager is a wee baby window way up in the corner, necessitating a manual resize every time the application is opened.

image

I'll look into this after I've had my dinner :)

I've published a new version that supports adding the following to global config (src/client/config.js):

{
  filemanager: {
    defaultWindowSize: {width: 800, height: 600}
  }
}

Tip: Window dimensions supports percentages:

{
  filemanager: {
    defaultWindowSize: {width: 0.5, height: 0.5} // 50% of viewport
  }
}

I found a bug in this though. Using 100% (1.0) does not work, but anything below that is OK

Thanks so much man, this works great of course.