Akascape / py-window-styles

Customize your python UI window with awesome pre-built windows 11 themes.
Creative Commons Zero v1.0 Universal
257 stars 15 forks source link

The title bar is not displayed properly under dark theme #32

Closed Xiaokang2022 closed 3 weeks ago

Xiaokang2022 commented 3 weeks ago

When using the dark theme, the title bar of the window is not dark, but looks like this:

1

When the window has undergone some operations, such as losing focus and regaining focus, or zooming, the title bar of the window will display normally:

2
Akascape commented 3 weeks ago

@Xiaokang2022 Try the optimised mode, or maybe add root.update() or root.focus_set().

Xiaokang2022 commented 3 weeks ago

I tried the three methods you said, but they didn't work

Xiaokang2022 commented 3 weeks ago

I have two computers, one with Windows 10 and the other with Windows 11. This issue doesn't occur on my Windows 11 computer. So this could be system-related? I want my program to work the same on both computers.

Akascape commented 3 weeks ago

@Xiaokang2022 Yes, it can be issue related to windows 10. But try different methods to solve this.

Xiaokang2022 commented 3 weeks ago

@Xiaokang2022 Yes, it can be issue related to windows 10. But try different methods to solve this.

  • root.withdraw() and root.deiconify()
  • root.update_idletasks()

Maybe it's not a good solution, but it works, thanks!

littlewhitecloud commented 3 weeks ago

@Akascape It may cause by ExtendFrameIntoClientArea so the titlebar's color was mixed with the backrgound forcely.

I also have this issue on Windows 10.