Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the background of main panel? #12

Open
carlosporta opened this issue Nov 20, 2016 · 2 comments
Open

How to change the background of main panel? #12

carlosporta opened this issue Nov 20, 2016 · 2 comments

Comments

@carlosporta
Copy link

I can't change the background of the main panel using canvas. How can I do that?

@maltfield
Copy link

maltfield commented Sep 2, 2020

So before I was using this NavigationDrawer in my app, I was setting the background color of my app using:

from kivy.core.window import Window

# red background color
Window.clearcolor = (1, 0, 0, 1)

But since I added NavigationDrawer, my whole app's background color is back to the default black. I'm guessing that this is some bug that overrides the Window in some way?

See also:

@maltfield
Copy link

maltfield commented Sep 2, 2020

This does appear to be a bug caused by "black" being hard-coded in three places.

The fix, I guess, would be for NavigationDrawer to go up the widget stack and determine what the background is (maybe with Window or Rectangle?) rather than hard-code "black"

It appears that the background of the sidebar in the nav drawer is set to black on this line, so change this line to change the background color of the drawer itself:

It appears that the background of the rest of the app is set to black on this line, so change this line to change the background color of the main panel:

There's also this other line that hard-codes "black," but it's not immediately obvious to me what it's for:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants