rhysd / Mstdn

Tiny web-based mastodon client for your desktop
MIT License
389 stars 15 forks source link

Window size for docked app in config.json #12

Open greenmanspirit opened 7 years ago

greenmanspirit commented 7 years ago

Hello!

I noticed that I can increase the size of the window that opens when I click on the icon by editing window-state.json. I changed that file to make the window twice the size and thought it would might be useful for other users if these dimensions were made available in config.json along with the zoom_factor. For me and my large monitor, the ideal is a windows size of 640x840 with a zoom_factor of 1.1.

greenmanspirit commented 7 years ago

I can write a PR if you want.

rhysd commented 7 years ago

Thank you for suggestion. Let me confirm what you want to do.

Currently this app remembers its window state. So app writes window state (e.g. width, height, x, y,...) to window-state.json on quitting. Then app will restore the state on starting again.

You want to stop restoring the last state and to write your favorite window state to config.json like below, right?

{
  ...
  "window": {
    "height": 840,
    "width": 640
  }
}

Please note that zoom factor already can be changed with zoom_factor option.

greenmanspirit commented 7 years ago

I think it would be a nice option if the user wants a static size. It could be commented out by default and only used by users who want to use it. To be entirely honest, I didn't notice that the window that opens when you click on the tray icon could be resized as my window border didn't render (I am using Mate). This made me think that the windows was a static size and is what made me think of this option.

I am using the zoom_factor option.