SagitSri
SagitSri

Reputation: 521

How to get back to default screen size in kivy?

Unfortunately I used the following:

Config.set('graphics','width',850)
Config.set('graphics','height',850)
Config.write()

in my of kivy file. My kivy application's window(screen) is opening in 'ipad' screen size(denoted in Screen module). From that instance in 'config.ini' system added '[module] screen = ipad'. Help me get through this and how to restore my screen size to normal?

Upvotes: 2

Views: 1249

Answers (2)

The default values for height and width is (600, 800)

To rest you can either do

  1. Rerun Configer.set with default values.
 Config.set('graphics','width',800)
 Config.set('graphics','height',600)
 Config.write()
  1. Or manual edit the config file
[graphics]
height = 600
width = 800
  1. Or you can just remove the config.ini. On the next run it will automatically be created with default values

The config file will be here:
  • Windows: C:\Users\<UserName>\.kivy\config.ini
  • Linus: /home/<UserName>/.kivy/config.ini
  • macOS: /Users/<UserName>/.kivy/config.ini

Reference: kivy doc

Upvotes: 1

ikolim
ikolim

Reputation: 16041

  1. The default settings for height and width is as follow. Edit the config file located in ~/.kivy/config.ini.

    [graphics]
    height = 600
    width = 800
    
  2. In your kivy app, either remove / comment off the write statement, or write the new config into your app directory.

Upvotes: 2

Related Questions