question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: Transparent window or even transparent + shaped

See original GitHub issue

A long ago I saw LiLi USB creator and its Window kind of surprised me. Not only it’s transparent, it’s based on a bitmap(or at least another type of image) too. Since then it kind of bugs me how to make it - now with Kivy, but still no success. However I found some scraps, that may help someone who would like to code it.

On irc @dessant pointed me to these links wiki.libsdl.org, SDL-mirror

LiLi provides a portable package, where is its source available. In Graphics.au3 you can see that the guy uses Win32API, which probably isn’t desired when there is sdl2 and still a little bit of pygame present with Android, but it may give you a picture what it is exactly. This type of Window might drag new users to Kivy if it’d be at least on these commercial platforms such as Windows and Mac.

Links:

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Fuzzymacommented, Oct 15, 2016

To make a window transparent in windows (the whole - not the background) you need to use the win32 api. The code for this would be as follows:

import win32gui
import win32con
import win32api

# Get the window
handle = win32gui.FindWindow(None, "TitleOfYourWindow")

# Make it a layered window
win32gui.SetWindowLong(handle, win32con.GWL_EXSTYLE, win32gui.GetWindowLong(self.handle, win32con.GWL_EXSTYLE) | win32con.WS_EX_LAYERED)

# make it transparent (alpha between 0 and 255)
win32gui.SetLayeredWindowAttributes(handle, win32api.RGB(0, 0, 0), alpha, win32con.LWA_ALPHA)

That said, doing a PR is no fun if

it probably won’t be merged

However: I am also not capable of doing it because I am not familiar with the kivy code.

I found no way to make the background transparent and allowing custom shapes as windows

0reactions
KeyWeeUsrcommented, Dec 17, 2017

Closed by #5252

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create Translucent and Shaped Windows - Oracle
The article describes a feature that allows creating applications with translucent and shaped windows.
Read more >
Transparent Window - Etsy
Check out our transparent window selection for the very best in unique or custom, handmade pieces from our shops.
Read more >
Remove transparency and just leave shape - 10580771
Hi. That PNG does not have a transparent background, just select the white part then go to Select > Modify and Contract by...
Read more >
Transparent Windows in WPF - InterKnowlogy/ Blogs
You may want only a partially transparent window, but keep in mind that the window's area is rectangular so rounded corners or other...
Read more >
Transparent Matlab figure window
Semi-transparent (translucent) Matlab figure (click to enlarge) ... mouth to start drooling: shaped windows, per-pixel transparency values, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found