{"id":26894505,"url":"https://github.com/rdbende/Forest-ttk-theme","last_synced_at":"2025-04-01T00:01:51.929Z","repository":{"id":41428758,"uuid":"382330344","full_name":"rdbende/Forest-ttk-theme","owner":"rdbende","description":"A beautiful modern theme for ttk, inspired by MS Excel's look 🌲🌳","archived":false,"fork":false,"pushed_at":"2024-08-02T15:19:16.000Z","size":1544,"stargazers_count":367,"open_issues_count":13,"forks_count":95,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-29T20:08:57.308Z","etag":null,"topics":["awesome","beautiful","dark-theme","forest","forest-theme","gorgeous","green","modern","python","python-gui","stunning","tcl","theme","tk","tkinter","tkinter-gui","ttk"],"latest_commit_sha":null,"homepage":"","language":"Tcl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rdbende.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-02T11:50:20.000Z","updated_at":"2024-10-29T13:14:13.000Z","dependencies_parsed_at":"2022-08-10T02:23:06.004Z","dependency_job_id":"cc03e679-84ac-483c-85c7-63125d5888fa","html_url":"https://github.com/rdbende/Forest-ttk-theme","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"4fdde9530267ffd42443622ce55c5aea2d8c8188"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdbende%2FForest-ttk-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdbende%2FForest-ttk-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdbende%2FForest-ttk-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdbende%2FForest-ttk-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdbende","download_url":"https://codeload.github.com/rdbende/Forest-ttk-theme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246395595,"owners_count":20770242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awesome","beautiful","dark-theme","forest","forest-theme","gorgeous","green","modern","python","python-gui","stunning","tcl","theme","tk","tkinter","tkinter-gui","ttk"],"created_at":"2025-04-01T00:01:49.000Z","updated_at":"2025-04-01T00:01:51.904Z","avatar_url":"https://github.com/rdbende.png","language":"Tcl","funding_links":[],"categories":["Tcl","Wanna see more?"],"sub_categories":["Dark mode title bar on Windows"],"readme":"# Forest theme for ttk\n\n#### Partially based on my [Azure theme](https://github.com/rdbende/Azure-ttk-theme)\n\n![image](Forest-light%20screenshot.png)\n![image](Forest-dark%20screenshot.png)\n\n\n## How to use\n### Python / tkinter\nTo use the theme just import the **forest-light.tcl**, or the **forest-dark.tcl** file, and call the `theme_use` method to set the theme:\n```python\n# Import the tcl file\nroot.tk.call('source', 'forest-light.tcl / forest-dark.tcl')\n\n# Set the theme with the theme_use method\nttk.Style().theme_use('forest-light / forest-dark')\n```\n\n### Tcl / tk\nTo use the theme just import the **forest-light.tcl**, or the **forest-dark.tcl** file, and call the `theme use` method to set the theme:\n```tcl\n# Import the tcl file\nsource \"forest-light.tcl / forest-dark.tcl\"\n\n# Set theme using the theme use method\nttk::style theme use forest-light / forest-dark\n```\n\n## New style elements\nThe Forest theme similar to my [Azure theme](https://github.com/rdbende/Azure-ttk-theme) has some **new** widget styles, such as an accent button, toggle switch, toggle button and card. You can apply these with the style option.\n\nIf you need a highlighted button, use `Accent.TButton`:\n```python\nbutton = ttk.Button(root, text='Accent button', style='Accent.TButton', command=callback)\n```\n\nTo create a toggle button you need a checkbutton, to which you can apply the `ToggleButton` style:\n```python\ntogglebutton = ttk.Checkbutton(root, text='Toggle button', style='ToggleButton', variable=var)\n```\n\nThe use of switches is becoming more common these days, so this theme has a `Switch` style, that can be applied to checkbuttons:\n```python\nswitch = ttk.Checkbutton(root, text='Switch', style='Switch', variable=var)\n```\n\nIf you only want a border around your widgets, not an entire LabelFrame then apply the `Card` style to a Frame:\n```python\ncard = ttk.Frame(root, style='Card', padding=(5, 6, 7, 8))\n```\n\n## A short example\nfor Python...\n```python\nimport tkinter as tk\nfrom tkinter import ttk\n\nroot = tk.Tk()\n\n# Import the tcl file\nroot.tk.call('source', 'forest-dark.tcl')\n\n# Set the theme with the theme_use method\nttk.Style().theme_use('forest-dark')\n\n# A themed (ttk) button\nbutton = ttk.Button(root, text=\"I'm a themed button\")\nbutton.pack(pady=20)\n\nroot.mainloop()\n```\n...and for Tcl\n```tcl\npackage require Tk 8.6\n\n# Import the tcl file\nsource \"forest-dark.tcl\"\n\n# Set theme using the theme use method\nttk::style theme use forest-dark\n\n# A themed (ttk) button\nttk::button .button -text \"I'm a themed button\"\npack .button -pady 20\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdbende%2FForest-ttk-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdbende%2FForest-ttk-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdbende%2FForest-ttk-theme/lists"}