-2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import tkinter as tk
from tkinter import ttk
from ttkthemes import ThemedStyle

class MainProgram():
    def __init(self):
            self.root = tk.Tk(className='Papinhio player')
            self.root.title("Papinhio player")
            self.max_width = self.root.winfo_screenwidth()
            self.max_height = self.root.winfo_screenheight()
            self.root.geometry("%dx%d+0+0" % (self.max_width,self.max_height))

            self.style = ThemedStyle(self.root)
            self.style.set_theme_advanced("arc",advanced_name="arc_modified")
            self.style.set_theme("arc_modified")
            self.root.mainloop()

I want to change some features of ttkthemes (such as background colour, font size, font colour).

Is that possible?

Chris P
  • 2,059
  • 4
  • 34
  • 68
  • Does this answer your question? [create-custom-ttk-style-same-as-clam-ttk-theme-button-widget-specific](https://stackoverflow.com/questions/42931533) – stovfl Jun 17 '20 at 12:01

1 Answers1

0

self.style.configure('.', background='green',foreground="blue",font=('Ubuntu', 30))

It was really simple.

Note: This doesn't apply to root widget. You can overwrite root style like: self.root.configure(bg="white")

Note2: ttk.Label(self.root,text="Test text").pack() will work, but

tk.Label(self.root,text="Test text").pack() don't.

I don't know why.

Chris P
  • 2,059
  • 4
  • 34
  • 68