Eel icon indicating copy to clipboard operation
Eel copied to clipboard

Unable to set the window size

Open thakreyn opened this issue 4 years ago • 4 comments

The browser window for the application always opens in full-screen mode despite specifying the size and position. How do I get around this and set the appropriate size.

Code snippet(s) Here is some code that can be easily used to reproduce the problem or understand what I need help with. Python file:

import eel

eel.init('web')

eel.start('index.html', size=(1280, 720))

HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Game layout test</title>
</head>
<body bgcolor="red">
    <h1>Test</h1>
</body>
</html>

Desktop:

  • OS: Windows 10
  • Browser: Chrome (Version 91.0.4472.77 (Official Build) (64-bit))

thakreyn avatar May 31 '21 04:05 thakreyn

Before you need to install "Google chrome browser".

import eel

eel.init('web')

eel.start('index.html', size=(1280, 720), mode='chrome')

evheniu avatar May 31 '21 11:05 evheniu

Before you need to install "Google chrome browser".

import eel

eel.init('web')

eel.start('index.html', size=(1280, 720), mode='chrome')

Thank you for your response, I already have Google Chrome installed on my system. It still does not work. I tried using 'edge' but its still the same.

thakreyn avatar May 31 '21 15:05 thakreyn

The browser window for the application always opens in full-screen mode despite specifying the size and position. How do I get around this and set the appropriate size.

Code snippet(s) Here is some code that can be easily used to reproduce the problem or understand what I need help with. Python file:

import eel

eel.init('web')

eel.start('index.html', size=(1280, 720))

HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Game layout test</title>
</head>
<body bgcolor="red">
    <h1>Test</h1>
</body>
</html>

Desktop:

  • OS: Windows 10
  • Browser: Chrome (Version 91.0.4472.77 (Official Build) (64-bit))

To solve this problem, you can try: Add to head index.html even though eel.js file doesn't exist

chmandzhiev avatar Jun 26 '21 13:06 chmandzhiev

To solve this problem, you can try: Add to head index.html even though eel.js file doesn't exist

Thank you.

@chmandzhiev answer should be added to the documentation somewhere.

omarcostahamido avatar Apr 26 '22 18:04 omarcostahamido