Book Image

Kivy Blueprints

By : Vasilkov
Book Image

Kivy Blueprints

By: Vasilkov

Overview of this book

This book is intended for programmers who are comfortable with the Python language and who want to build desktop and mobile applications with rich GUI in Python with minimal hassle. Knowledge of Kivy is not strictly required—every aspect of the framework is described when it's first used.
Table of Contents (12 chapters)
10
A. The Python Ecosystem
11
Index

Fine-tuning the looks

First, let's tweak the appearance of our app. This isn't exactly a critical functionality, but bear with me here, as these customizations are commonly requested and also pretty easy to set up. I'll briefly describe the properties that we covered in the previous chapter, and we'll add a number of new tweaks, such as window size and change of the mouse cursor.

Visual appearance

I strongly believe that the background color of any Paint app should initially be white. You're probably already familiar with this setting from the first chapter. Here's the line of code we add after the __name__ == '__main__' line to achieve the desired effect:

from kivy.core.window import Window
from kivy.utils import get_color_from_hex

Window.clearcolor = get_color_from_hex('#FFFFFF')

You may want to put most of the import lines where they usually belong, near the beginning of a program file. As you will learn shortly, some imports in Kivy are...