Dimensions for window not working.
Hi. When setting fullscreen, width, or height, it does not render in the window that is opened.
from flask import Flask
from flask import render_template
from flaskwebgui import FlaskUI
app = Flask(__name__)
ui = FlaskUI(app, fullscreen=True)
@app.route('/')
def hello():
return render_template('index.jinja')
if __name__ == '__main__':
ui.run()
I still get the default dimensions opened. Is this happening to anyone else? Any fix? I am using the latest version. By the way, this library is super useful! Thanks for making this.
Yes, not sure why this issue appears... the --window-size flag is ignored, there may be the case of sistem defaults which I mentioned here: https://github.com/ClimenteA/flaskwebgui/issues/23, I saw this is an issue also on chromium (on which chrome is based).
The line which should set the window size is here, feel free to take a look, I didn't found a solution for this issue.
Hi @ClimenteA. Thanks for your reply. I'll take a look, but am not an expert, so I don't know if I can solve the issue. Also, I think it might be a good idea to add a note of this to the README or something, because I spent quite some time debugging before realizing that this was a problem with the library.
The readme and code examples probably should remove mentions of width, height and fullscreen etc. because they don't work - so why confuse people and say that they are a feature of this library? I too spent quite some time chasing this.
@gadhagod @abulka Are you still having problems on implementing the window size? if so can you provide de OS you're using and the version of chromium/chrome.
I added script to base template:
.And it works for me.
Updated docs to point out that issue may appear in some cases