ttkbootstrap 1.13.0__tar.gz → 1.13.2.dev0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ttkbootstrap-1.13.0/src/ttkbootstrap.egg-info → ttkbootstrap-1.13.2.dev0}/PKG-INFO +2 -7
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/README.md +0 -5
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/pyproject.toml +17 -2
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/dialogs/dialogs.py +7 -2
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/style.py +65 -5
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0/src/ttkbootstrap.egg-info}/PKG-INFO +2 -7
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/LICENSE +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/MANIFEST.in +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/README_zh.md +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/setup.cfg +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/__init__.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/__main__.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/colorutils.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/constants.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/dialogs/__init__.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/dialogs/colorchooser.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/dialogs/colordropper.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/icons.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/localization/__init__.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/localization/msgcat.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/localization/msgs.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/publisher.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/scrolled.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/tableview.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/themes/__init__.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/themes/standard.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/themes/user.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/toast.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/tooltip.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/utility.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/validation.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/widgets.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap/window.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap.egg-info/SOURCES.txt +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap.egg-info/dependency_links.txt +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap.egg-info/requires.txt +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap.egg-info/top_level.txt +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkcreator/__init__.py +0 -0
- {ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkcreator/__main__.py +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ttkbootstrap
|
|
3
|
-
Version: 1.13.
|
|
3
|
+
Version: 1.13.2.dev0
|
|
4
4
|
Summary: A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.
|
|
5
5
|
Author-email: Israel Dryer <israel.dryer@gmail.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/israel-dryer/ttkbootstrap
|
|
8
8
|
Project-URL: Documentation, https://ttkbootstrap.readthedocs.io/en/latest/
|
|
9
|
-
Keywords: tkinter,theme,bootstrap,gui
|
|
9
|
+
Keywords: tkinter,theme,ttk,bootstrap,gui,desktop,python3,ui,widgets,theming,cross-platform,modern,responsive,python-gui
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Environment :: Win32 (MS Windows)
|
|
12
12
|
Classifier: Environment :: X11 Applications :: GTK
|
|
@@ -45,11 +45,6 @@ ttkbootstrap is a Python library that enhances tkinter by providing modern, flat
|
|
|
45
45
|
👀 Check out the [documentation](https://ttkbootstrap.readthedocs.io/en/latest/).
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
> **1.0+ is a complete rebuild of the library.** If you are using [version 0.5](https://github.com/israel-dryer/ttkbootstrap/tree/version-0.5)
|
|
49
|
-
you may run into issues trying to import themes with the themes.json as this
|
|
50
|
-
has been removed from 1.0. You can now import and save themes directly using
|
|
51
|
-
the ttkcreator.
|
|
52
|
-
|
|
53
48
|

|
|
54
49
|
|
|
55
50
|
## Features
|
|
@@ -16,11 +16,6 @@ ttkbootstrap is a Python library that enhances tkinter by providing modern, flat
|
|
|
16
16
|
👀 Check out the [documentation](https://ttkbootstrap.readthedocs.io/en/latest/).
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
> **1.0+ is a complete rebuild of the library.** If you are using [version 0.5](https://github.com/israel-dryer/ttkbootstrap/tree/version-0.5)
|
|
20
|
-
you may run into issues trying to import themes with the themes.json as this
|
|
21
|
-
has been removed from 1.0. You can now import and save themes directly using
|
|
22
|
-
the ttkcreator.
|
|
23
|
-
|
|
24
19
|

|
|
25
20
|
|
|
26
21
|
## Features
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ttkbootstrap"
|
|
7
|
-
version = "1.13.
|
|
7
|
+
version = "1.13.2.dev0"
|
|
8
8
|
description = "A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -12,7 +12,22 @@ license = { text = "MIT" }
|
|
|
12
12
|
authors = [
|
|
13
13
|
{ name="Israel Dryer", email="israel.dryer@gmail.com" }
|
|
14
14
|
]
|
|
15
|
-
keywords = [
|
|
15
|
+
keywords = [
|
|
16
|
+
"tkinter",
|
|
17
|
+
"theme",
|
|
18
|
+
"ttk",
|
|
19
|
+
"bootstrap",
|
|
20
|
+
"gui",
|
|
21
|
+
"desktop",
|
|
22
|
+
"python3",
|
|
23
|
+
"ui",
|
|
24
|
+
"widgets",
|
|
25
|
+
"theming",
|
|
26
|
+
"cross-platform",
|
|
27
|
+
"modern",
|
|
28
|
+
"responsive",
|
|
29
|
+
"python-gui"
|
|
30
|
+
]
|
|
16
31
|
classifiers = [
|
|
17
32
|
"Development Status :: 5 - Production/Stable",
|
|
18
33
|
"Environment :: Win32 (MS Windows)",
|
|
@@ -578,8 +578,6 @@ class DatePickerDialog:
|
|
|
578
578
|
|
|
579
579
|
"""
|
|
580
580
|
|
|
581
|
-
locale.setlocale(locale.LC_ALL, locale.setlocale(locale.LC_TIME, ""))
|
|
582
|
-
|
|
583
581
|
def __init__(
|
|
584
582
|
self,
|
|
585
583
|
parent=None,
|
|
@@ -612,6 +610,13 @@ class DatePickerDialog:
|
|
|
612
610
|
the title and hover / pressed color -> primary,
|
|
613
611
|
secondary, info, warning, success, danger, light, dark.
|
|
614
612
|
"""
|
|
613
|
+
|
|
614
|
+
# Safe locale setup
|
|
615
|
+
try:
|
|
616
|
+
locale.setlocale(locale.LC_TIME, "")
|
|
617
|
+
except locale.Error:
|
|
618
|
+
pass # Fall back to default C locale or handle more gracefully
|
|
619
|
+
|
|
615
620
|
self.parent = parent
|
|
616
621
|
self.root = ttk.Toplevel(
|
|
617
622
|
title=title,
|
|
@@ -406,14 +406,14 @@ class ThemeDefinition:
|
|
|
406
406
|
name (str):
|
|
407
407
|
The name of the theme.
|
|
408
408
|
|
|
409
|
-
colors (Colors):
|
|
410
|
-
|
|
409
|
+
colors (Colors or dict):
|
|
410
|
+
A Colors instance or a dict of color values.
|
|
411
411
|
|
|
412
412
|
themetype (str):
|
|
413
413
|
Specifies whether the theme is **light** or **dark**.
|
|
414
414
|
"""
|
|
415
415
|
self.name = name
|
|
416
|
-
self.colors = Colors(**colors)
|
|
416
|
+
self.colors = colors if isinstance(colors, Colors) else Colors(**colors)
|
|
417
417
|
self.type = themetype
|
|
418
418
|
|
|
419
419
|
def __repr__(self):
|
|
@@ -594,6 +594,58 @@ class Style(ttk.Style):
|
|
|
594
594
|
else:
|
|
595
595
|
raise TclError(themename, "is not a valid theme.")
|
|
596
596
|
|
|
597
|
+
def theme_create(self, themename: str, parent: str = None, settings: dict = None) -> None:
|
|
598
|
+
"""
|
|
599
|
+
Create a new theme in the Tcl interpreter. If the parent is a registered
|
|
600
|
+
ttkbootstrap theme, the new theme will be registered with a copied
|
|
601
|
+
ThemeDefinition and builder. Duplicate registration is avoided.
|
|
602
|
+
|
|
603
|
+
Parameters:
|
|
604
|
+
|
|
605
|
+
themename (str):
|
|
606
|
+
The name of the new theme.
|
|
607
|
+
|
|
608
|
+
parent (str):
|
|
609
|
+
The name of the parent theme to inherit from.
|
|
610
|
+
|
|
611
|
+
settings (dict):
|
|
612
|
+
A dictionary of style settings (Tcl-style).
|
|
613
|
+
"""
|
|
614
|
+
from tkinter.ttk import _script_from_settings # type: ignore[attr-defined]
|
|
615
|
+
|
|
616
|
+
script = _script_from_settings(settings) if settings else ''
|
|
617
|
+
|
|
618
|
+
# Lazy-load parent if it's a known bootstrap theme
|
|
619
|
+
if parent:
|
|
620
|
+
if parent not in super().theme_names():
|
|
621
|
+
if parent in self._theme_names:
|
|
622
|
+
self.theme_use(parent)
|
|
623
|
+
else:
|
|
624
|
+
raise TclError(f"{parent!r} is not a valid theme name or parent theme.")
|
|
625
|
+
|
|
626
|
+
# Create the Tcl-level theme
|
|
627
|
+
if parent:
|
|
628
|
+
self.tk.call(self._name, "theme", "create", themename,
|
|
629
|
+
"-parent", parent, "-settings", script)
|
|
630
|
+
else:
|
|
631
|
+
self.tk.call(self._name, "theme", "create", themename,
|
|
632
|
+
"-settings", script)
|
|
633
|
+
|
|
634
|
+
# Register the new theme if copying from a ttkbootstrap theme
|
|
635
|
+
if parent in self._theme_definitions and themename not in self._theme_definitions:
|
|
636
|
+
parent_def = self._theme_definitions[parent]
|
|
637
|
+
copied_def = ThemeDefinition(
|
|
638
|
+
name=themename,
|
|
639
|
+
colors=parent_def.colors,
|
|
640
|
+
themetype=parent_def.type
|
|
641
|
+
)
|
|
642
|
+
self._theme_definitions[themename] = copied_def
|
|
643
|
+
self._theme_names.add(themename)
|
|
644
|
+
self._theme_styles[themename] = set()
|
|
645
|
+
|
|
646
|
+
if themename not in self._theme_objects:
|
|
647
|
+
self._theme_objects[themename] = StyleBuilderTTK(build=False)
|
|
648
|
+
|
|
597
649
|
def style_exists_in_theme(self, ttkstyle: str):
|
|
598
650
|
"""Check if a style exists in the current theme.
|
|
599
651
|
|
|
@@ -607,7 +659,13 @@ class Style(ttk.Style):
|
|
|
607
659
|
bool:
|
|
608
660
|
`True` if the style exists, otherwise `False`.
|
|
609
661
|
"""
|
|
662
|
+
if self.theme is None:
|
|
663
|
+
return False
|
|
664
|
+
|
|
610
665
|
theme_styles = self._theme_styles.get(self.theme.name)
|
|
666
|
+
if theme_styles is None:
|
|
667
|
+
return False
|
|
668
|
+
|
|
611
669
|
exists_in_theme = ttkstyle in theme_styles
|
|
612
670
|
exists_in_registry = ttkstyle in self._style_registry
|
|
613
671
|
return exists_in_theme and exists_in_registry
|
|
@@ -1067,11 +1125,13 @@ class StyleBuilderTTK:
|
|
|
1067
1125
|
user.
|
|
1068
1126
|
"""
|
|
1069
1127
|
|
|
1070
|
-
def __init__(self):
|
|
1128
|
+
def __init__(self, build: bool = True):
|
|
1071
1129
|
self.style: Style = Style.get_instance()
|
|
1072
1130
|
self.theme_images = {}
|
|
1073
1131
|
self.builder_tk = StyleBuilderTK()
|
|
1074
|
-
|
|
1132
|
+
|
|
1133
|
+
if build:
|
|
1134
|
+
self.create_theme()
|
|
1075
1135
|
|
|
1076
1136
|
@staticmethod
|
|
1077
1137
|
def name_to_method(method_name):
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ttkbootstrap
|
|
3
|
-
Version: 1.13.
|
|
3
|
+
Version: 1.13.2.dev0
|
|
4
4
|
Summary: A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.
|
|
5
5
|
Author-email: Israel Dryer <israel.dryer@gmail.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/israel-dryer/ttkbootstrap
|
|
8
8
|
Project-URL: Documentation, https://ttkbootstrap.readthedocs.io/en/latest/
|
|
9
|
-
Keywords: tkinter,theme,bootstrap,gui
|
|
9
|
+
Keywords: tkinter,theme,ttk,bootstrap,gui,desktop,python3,ui,widgets,theming,cross-platform,modern,responsive,python-gui
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Environment :: Win32 (MS Windows)
|
|
12
12
|
Classifier: Environment :: X11 Applications :: GTK
|
|
@@ -45,11 +45,6 @@ ttkbootstrap is a Python library that enhances tkinter by providing modern, flat
|
|
|
45
45
|
👀 Check out the [documentation](https://ttkbootstrap.readthedocs.io/en/latest/).
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
> **1.0+ is a complete rebuild of the library.** If you are using [version 0.5](https://github.com/israel-dryer/ttkbootstrap/tree/version-0.5)
|
|
49
|
-
you may run into issues trying to import themes with the themes.json as this
|
|
50
|
-
has been removed from 1.0. You can now import and save themes directly using
|
|
51
|
-
the ttkcreator.
|
|
52
|
-
|
|
53
48
|

|
|
54
49
|
|
|
55
50
|
## Features
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ttkbootstrap-1.13.0 → ttkbootstrap-1.13.2.dev0}/src/ttkbootstrap.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|