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

Widgets look change when opening new window with different theme #579

Open
Roey1234560 opened this issue May 27, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Roey1234560
Copy link

Roey1234560 commented May 27, 2024

Desktop (please complete the following information):

ttkbootstrap Version 1.10.1
OS: Windows 11

Describe the bug

When I create each window separately it's work like it should be, but when I open second window the theme and the widgets looks weird.

Screenshot 2024-05-27 184318

Screenshot 2024-05-27 184335

This is the code for first_window.py

import ttkbootstrap as ttk
from ttkbootstrap.constants import *
import second_window

def open_window2():
    second_window.create_second_window()


window1 = ttk.Window(themename='morph')
window1.title("Window 1")

frame1 = ttk.Frame(window1)
frame1.pack()

label1 = ttk.Label(frame1, text="This is Window 1")
label1.pack(pady=20)

open_button = ttk.Button(frame1, text="Open window2", command=open_window2, bootstyle="info")
open_button.pack(pady=20)

window1.mainloop()

This is the code for second_window.py

import ttkbootstrap as ttk

def create_second_window():
    window2 = ttk.Window(themename='cyborg')
    window2.title("Window 2")

    label2 = ttk.Label(window2, text="This is Window 2")
    label2.pack(pady=20)


    window2.mainloop()

**Edit: Even when both windows have the same theme, I get the same bug.

Screenshot 2024-05-27 190021

To Reproduce

No response

Expected behavior

No response

Screenshots

No response

Additional context

No response

@Roey1234560 Roey1234560 added the bug Something isn't working label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant