tksheet 7.5.0__tar.gz → 7.5.1__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.
- {tksheet-7.5.0/tksheet.egg-info → tksheet-7.5.1}/PKG-INFO +1 -1
- {tksheet-7.5.0 → tksheet-7.5.1}/pyproject.toml +1 -1
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/__init__.py +1 -1
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/constants.py +22 -22
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/main_table.py +23 -8
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/sheet.py +7 -2
- {tksheet-7.5.0 → tksheet-7.5.1/tksheet.egg-info}/PKG-INFO +1 -1
- {tksheet-7.5.0 → tksheet-7.5.1}/LICENSE.txt +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/README.md +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/setup.cfg +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/colors.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/column_headers.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/find_window.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/formatters.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/functions.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/other_classes.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/row_index.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/sheet_options.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/sorting.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/text_editor.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/themes.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/tksheet_types.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet/top_left_rectangle.py +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet.egg-info/SOURCES.txt +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet.egg-info/dependency_links.txt +0 -0
- {tksheet-7.5.0 → tksheet-7.5.1}/tksheet.egg-info/top_level.txt +0 -0
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
6
6
|
name = "tksheet"
|
7
7
|
description = "Tkinter table / sheet and treeview widget"
|
8
8
|
readme = "README.md"
|
9
|
-
version = "7.5.
|
9
|
+
version = "7.5.1"
|
10
10
|
authors = [{ name = "ragardner", email = "github@ragardner.simplelogin.com" }]
|
11
11
|
requires-python = ">=3.8"
|
12
12
|
license = {file = "LICENSE.txt"}
|
@@ -427,31 +427,31 @@ ICON_PASTE = (
|
|
427
427
|
|
428
428
|
|
429
429
|
ICON_CLEAR = (
|
430
|
-
"""
|
431
|
-
"""
|
432
|
-
"""
|
433
|
-
"""
|
434
|
-
"""
|
435
|
-
"""
|
436
|
-
"""
|
437
|
-
"""
|
438
|
-
"""
|
439
|
-
"""
|
440
|
-
"""
|
430
|
+
"""iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAjRJREFUSEuNVotx"""
|
431
|
+
"""wjAMleC6R9gkTEIzBiF2yAcYo3QS2KSeozRxT/4kcuIAuYMzlqPPe3oyCOxBANDm97iiNYJ2+6GFvzt7"""
|
432
|
+
"""zRnJE1ta98+eMPQkIW70Xvle1ZyOiLgDgORZRnrmaKhSQd9XUhZXnrZZ1/XpE1b4FWQfSTdeQQg09n0m"""
|
433
|
+
"""5MEEQf9C3Z5vAJB2uttWQtyXoOM8jdzY3bK8JOsP+EHQShT5xrNpmKubsyFAFjlOqYxAO6FpPFG3F03B"""
|
434
|
+
"""rB/ryULU8gBLNL8ONQQQOYJGDlEYOd6CYcvGGmFWgckpApHHl7ihM38PzKpqr2gtDdbaNIQs8u0A6cxP"""
|
435
|
+
"""SDLjYMy/bi83AJ0CgOoeuCWLdY60d5Vinw0qdFBTEsJzwLooGsB2hqYOI20o80FIQYOS1CkTWkIOYiQb"""
|
436
|
+
"""csK+LsszD0JG63z6cIg8yZ6ounEkO4MfAmR3VRDmBAulpbpf3BInXLGUF1VAGYogQKRNfeWhc1QucAKA"""
|
437
|
+
"""qntAEGSupyckj9yMJBMsIyeYAGglRb55k+S4DmgArhB3gjlyQUrCShb7jCv/TSW7/L1IKEW35ndDXGjh"""
|
438
|
+
"""RLCjIiKQsI+sGN2XM0VUvcDlMIu4QOLT6MVNZxLlXTQZ1wiQ6l5n9sLwYliaP/PBVzZNusY1ifJuRwgX"""
|
439
|
+
"""WuzCmeG0NGUn+5Rkebh66ozVdMa6T2FFVybNGU/sADnX3ugxRE3pXn+X4nDkAhwO89sq7m2pJAfjrBEY"""
|
440
|
+
"""RGGRr29ej+/i/xAX7B9y8mgsRjNIxAAAAABJRU5ErkJggg=="""
|
441
441
|
)
|
442
442
|
|
443
443
|
ICON_DEL = (
|
444
|
-
"""
|
445
|
-
"""
|
446
|
-
"""+
|
447
|
-
"""
|
448
|
-
"""
|
449
|
-
"""
|
450
|
-
"""
|
451
|
-
"""
|
452
|
-
"""
|
453
|
-
"""
|
454
|
-
"""
|
444
|
+
"""iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAiJJREFUSEuNVdFh"""
|
445
|
+
"""ozAMlWCQdhQySZsxDIkJpuAxLpvQUTpIG9/ZFljGojl/JIAlPz1JT0bYFgKCA4cA9JO2xKdgCEB/R8Z+"""
|
446
|
+
"""+1cjM9n3fyf1APCaH+K+EHC4durOYgyYfKEcQGQzfNh3QPcnvsXF7f3z9wNOw1V9ysS95+bFKROAtQs8"""
|
447
|
+
"""oPmhQzhAP9qmrmABhE/dqtMeeE11BBBiCwwmGwLXnSI7qhPZm2mm/RZTbnKojYGZ7AIOmgjm/cgHhRLR"""
|
448
|
+
"""9mEXEKuVcThhMNOtqqp+V6PijCdNs9rf9UWdQ5MlB8p7kZasJ2IrC0k13s8B6Aulk5U0i9J8WAfoQHc+"""
|
449
|
+
"""r2wVVcxT9x8A8YRguBZWOPQo778DMDpS55h59u0IWqmTBzCzXUIQbXz3a5ys85FF5qmSmdA8TgRw0Hct"""
|
450
|
+
"""rmbcObVvnsZko3Z15erx0Qkp4t9SEKQPknDSBAfIuihSzQBIUOM0E/3oPIRG4ALM/fLOZAzk6Lhzi7LC"""
|
451
|
+
"""c5s0ZbNZdMxgPxJKlrzIlKJMB2wUSjoIBWQiijYAfae2RpBAQ3L20o+GeYcM43TDqnrRnTp7+xt7j7wR"""
|
452
|
+
"""eJGTVtYUMfWskaTo8purmEW8iwLLfLIW94FEX1ZvLnO5TXdFDl3kVepcA4Bnza9DYcCtEP04N3WFdPm0"""
|
453
|
+
"""pzQQBQBtbFPXbpHvA34RiM9FUMWo0Na+1g9oEOHNbRfQ0Yjbvn958vqi7vtZXt7JT896XhFu8RczqWgy"""
|
454
|
+
"""PKwKugAAAABJRU5ErkJggg=="""
|
455
455
|
)
|
456
456
|
|
457
457
|
|
@@ -286,19 +286,24 @@ class MainTable(tk.Canvas):
|
|
286
286
|
self.align = kwargs["align"]
|
287
287
|
self.PAR.ops.table_font = FontTuple(
|
288
288
|
self.PAR.ops.table_font[0],
|
289
|
-
max(1, int(self.PAR.ops.table_font[1] * kwargs["zoom"] / 100)),
|
289
|
+
max(1, int(round(self.PAR.ops.table_font[1]) * kwargs["zoom"] / 100)),
|
290
290
|
self.PAR.ops.table_font[2],
|
291
291
|
)
|
292
292
|
self.PAR.ops.index_font = FontTuple(
|
293
293
|
self.PAR.ops.index_font[0],
|
294
|
-
max(1, int(self.PAR.ops.index_font[1] * kwargs["zoom"] / 100)),
|
294
|
+
max(1, int(round(self.PAR.ops.index_font[1]) * kwargs["zoom"] / 100)),
|
295
295
|
self.PAR.ops.index_font[2],
|
296
296
|
)
|
297
297
|
self.PAR.ops.header_font = FontTuple(
|
298
298
|
self.PAR.ops.header_font[0],
|
299
|
-
max(1, int(self.PAR.ops.header_font[1] * kwargs["zoom"] / 100)),
|
299
|
+
max(1, int(round(self.PAR.ops.header_font[1]) * kwargs["zoom"] / 100)),
|
300
300
|
self.PAR.ops.header_font[2],
|
301
301
|
)
|
302
|
+
self.PAR.ops.popup_menu_font = FontTuple(
|
303
|
+
self.PAR.ops.popup_menu_font[0],
|
304
|
+
max(1, int(round(self.PAR.ops.popup_menu_font[1]) * kwargs["zoom"] / 100)),
|
305
|
+
self.PAR.ops.popup_menu_font[2],
|
306
|
+
)
|
302
307
|
self.txt_measure_canvas = tk.Canvas(self)
|
303
308
|
self.txt_measure_canvas_text = self.txt_measure_canvas.create_text(0, 0, text="", font=self.PAR.ops.table_font)
|
304
309
|
|
@@ -4277,16 +4282,23 @@ class MainTable(tk.Canvas):
|
|
4277
4282
|
(self.PAR.ops.table_font[0], self.PAR.ops.table_font[1] + 1, self.PAR.ops.table_font[2]),
|
4278
4283
|
(self.PAR.ops.index_font[0], self.PAR.ops.index_font[1] + 1, self.PAR.ops.index_font[2]),
|
4279
4284
|
(self.PAR.ops.header_font[0], self.PAR.ops.header_font[1] + 1, self.PAR.ops.header_font[2]),
|
4285
|
+
(self.PAR.ops.popup_menu_font[0], self.PAR.ops.popup_menu_font[1] + 1, self.PAR.ops.popup_menu_font[2]),
|
4280
4286
|
"in",
|
4281
4287
|
)
|
4282
4288
|
|
4283
4289
|
def zoom_out(self, event: Any = None) -> None:
|
4284
|
-
if
|
4290
|
+
if (
|
4291
|
+
self.PAR.ops.table_font[1] < 2
|
4292
|
+
or self.PAR.ops.index_font[1] < 2
|
4293
|
+
or self.PAR.ops.header_font[1] < 2
|
4294
|
+
or self.PAR.ops.popup_menu_font[1] < 2
|
4295
|
+
):
|
4285
4296
|
return
|
4286
4297
|
self.zoom_font(
|
4287
4298
|
(self.PAR.ops.table_font[0], self.PAR.ops.table_font[1] - 1, self.PAR.ops.table_font[2]),
|
4288
4299
|
(self.PAR.ops.index_font[0], self.PAR.ops.index_font[1] - 1, self.PAR.ops.index_font[2]),
|
4289
4300
|
(self.PAR.ops.header_font[0], self.PAR.ops.header_font[1] - 1, self.PAR.ops.header_font[2]),
|
4301
|
+
(self.PAR.ops.popup_menu_font[0], self.PAR.ops.popup_menu_font[1] - 1, self.PAR.ops.popup_menu_font[2]),
|
4290
4302
|
"out",
|
4291
4303
|
)
|
4292
4304
|
|
@@ -4295,6 +4307,7 @@ class MainTable(tk.Canvas):
|
|
4295
4307
|
table_font: FontTuple,
|
4296
4308
|
index_font: FontTuple,
|
4297
4309
|
header_font: FontTuple,
|
4310
|
+
popup_font: FontTuple,
|
4298
4311
|
zoom: Literal["in", "out"],
|
4299
4312
|
) -> None:
|
4300
4313
|
self.saved_column_widths = {}
|
@@ -4317,6 +4330,7 @@ class MainTable(tk.Canvas):
|
|
4317
4330
|
self.set_table_font(table_font, row_heights=False)
|
4318
4331
|
self.set_index_font(index_font, row_heights=False)
|
4319
4332
|
self.set_header_font(header_font)
|
4333
|
+
self.PAR.ops.popup_menu_font = FontTuple(*popup_font)
|
4320
4334
|
if self.PAR.ops.set_cell_sizes_on_zoom:
|
4321
4335
|
self.set_all_cell_sizes_to_text()
|
4322
4336
|
self.main_table_redraw_grid_and_text(redraw_header=True, redraw_row_index=True)
|
@@ -4336,6 +4350,7 @@ class MainTable(tk.Canvas):
|
|
4336
4350
|
r_pc=r_pc,
|
4337
4351
|
c_pc=c_pc,
|
4338
4352
|
)
|
4353
|
+
self.create_rc_menus()
|
4339
4354
|
|
4340
4355
|
def get_txt_w(self, txt: str, font: None | FontTuple = None) -> int:
|
4341
4356
|
self.txt_measure_canvas.itemconfig(
|
@@ -4414,7 +4429,7 @@ class MainTable(tk.Canvas):
|
|
4414
4429
|
not isinstance(newfont, tuple)
|
4415
4430
|
or len(newfont) != 3
|
4416
4431
|
or not isinstance(newfont[0], str)
|
4417
|
-
or not isinstance(newfont[1], int)
|
4432
|
+
or not isinstance(newfont[1], (int, float))
|
4418
4433
|
or not isinstance(newfont[2], str)
|
4419
4434
|
):
|
4420
4435
|
raise ValueError(font_value_error)
|
@@ -4422,7 +4437,7 @@ class MainTable(tk.Canvas):
|
|
4422
4437
|
def set_table_font(self, newfont: tuple | None = None, row_heights: bool = True) -> tuple[str, int, str]:
|
4423
4438
|
if newfont:
|
4424
4439
|
self.check_font(newfont)
|
4425
|
-
self.PAR.ops.table_font = FontTuple(*newfont)
|
4440
|
+
self.PAR.ops.table_font = FontTuple(*(newfont[0], int(round(newfont[1])), newfont[2]))
|
4426
4441
|
old_min_row_height = int(self.min_row_height)
|
4427
4442
|
old_default_row_height = int(self.get_default_row_height())
|
4428
4443
|
self.set_table_font_help()
|
@@ -4463,7 +4478,7 @@ class MainTable(tk.Canvas):
|
|
4463
4478
|
def set_index_font(self, newfont: tuple | None = None, row_heights: bool = True) -> tuple[str, int, str]:
|
4464
4479
|
if newfont:
|
4465
4480
|
self.check_font(newfont)
|
4466
|
-
self.PAR.ops.index_font = FontTuple(*newfont)
|
4481
|
+
self.PAR.ops.index_font = FontTuple(*(newfont[0], int(round(newfont[1])), newfont[2]))
|
4467
4482
|
old_min_row_height = int(self.min_row_height)
|
4468
4483
|
old_default_row_height = int(self.get_default_row_height())
|
4469
4484
|
self.set_index_font_help()
|
@@ -4507,7 +4522,7 @@ class MainTable(tk.Canvas):
|
|
4507
4522
|
def set_header_font(self, newfont: tuple | None = None) -> tuple[str, int, str]:
|
4508
4523
|
if newfont:
|
4509
4524
|
self.check_font(newfont)
|
4510
|
-
self.PAR.ops.header_font = FontTuple(*newfont)
|
4525
|
+
self.PAR.ops.header_font = FontTuple(*(newfont[0], int(round(newfont[1])), newfont[2]))
|
4511
4526
|
self.set_header_font_help()
|
4512
4527
|
self.recreate_all_selection_boxes()
|
4513
4528
|
return self.PAR.ops.header_font
|
@@ -2703,6 +2703,11 @@ class Sheet(tk.Frame):
|
|
2703
2703
|
def index_font(self, newfont: tuple[str, int, str] | None = None) -> tuple[str, int, str]:
|
2704
2704
|
return self.MT.set_index_font(newfont)
|
2705
2705
|
|
2706
|
+
def popup_menu_font(self, newfont: tuple[str, int, str] | None = None) -> tuple[str, int, str]:
|
2707
|
+
if newfont:
|
2708
|
+
self.ops.popup_menu_font = FontTuple(*(newfont[0], int(round(newfont[1])), newfont[2]))
|
2709
|
+
return self.ops.popup_menu_font
|
2710
|
+
|
2706
2711
|
def table_align(
|
2707
2712
|
self,
|
2708
2713
|
align: str | None = None,
|
@@ -4142,7 +4147,7 @@ class Sheet(tk.Frame):
|
|
4142
4147
|
if "show_top_left" in kwargs:
|
4143
4148
|
self.show("top_left")
|
4144
4149
|
if "popup_menu_font" in kwargs:
|
4145
|
-
self.
|
4150
|
+
self.popup_menu_font(self.ops.popup_menu_font)
|
4146
4151
|
if "font" in kwargs:
|
4147
4152
|
self.MT.set_table_font(kwargs["font"])
|
4148
4153
|
elif "table_font" in kwargs:
|
@@ -4176,10 +4181,10 @@ class Sheet(tk.Frame):
|
|
4176
4181
|
)
|
4177
4182
|
if any(k in kwargs for k in scrollbar_options_keys):
|
4178
4183
|
self.set_scrollbar_options()
|
4179
|
-
self.MT.create_rc_menus()
|
4180
4184
|
if "treeview" in kwargs:
|
4181
4185
|
self.index_align("nw", redraw=False)
|
4182
4186
|
self.ops.paste_can_expand_y = False
|
4187
|
+
self.MT.create_rc_menus()
|
4183
4188
|
return self.set_refresh_timer(redraw)
|
4184
4189
|
|
4185
4190
|
def set_scrollbar_options(self) -> Sheet:
|
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
|