techartorg / bqt

A Blender add-on to support & manage Qt Widgets in Blender (PySide2)
https://github.com/techartorg/bqt/wiki
Mozilla Public License 2.0
172 stars 25 forks source link

add dark bar option #53

Closed hannesdelbeke closed 1 year ago

hannesdelbeke commented 1 year ago

default blender window has a dark bar in latest blender version image

qt default widgets don't

TODO add support to match blender's style

hannesdelbeke commented 1 year ago

believe pyside6 does this automatically

hannesdelbeke commented 1 year ago

set bar to black. note this freezes blender main window if run on it on startup. need to test with qt widgets

style = ctypes.windll.user32.GetWindowLongPtrW(process_windows[0].hwnd, -20)
new_style = style | 0x00080000 | 0x00000008
# ctypes.windll.user32.SetWindowLongPtrW(process_windows[0].hwnd, -20, new_style) # freezes main blender window, not needed for black bar
ctypes.windll.user32.SetLayeredWindowAttributes(process_windows[0].hwnd, 0, 0, 2)
print(process_windows[0].hwnd)
hannesdelbeke commented 1 year ago

done with https://github.com/techartorg/bqt/commit/c78934b6335f07eada9c4077cc4ecf689ae1e8d7