tksheet 7.2.22__py3-none-any.whl → 7.2.23__py3-none-any.whl
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/__init__.py +1 -1
- tksheet/column_headers.py +15 -19
- tksheet/functions.py +16 -4
- tksheet/main_table.py +50 -31
- tksheet/other_classes.py +14 -13
- tksheet/row_index.py +15 -20
- tksheet/sheet.py +67 -18
- tksheet/sheet_options.py +1 -72
- tksheet/text_editor.py +11 -0
- tksheet/themes.py +366 -296
- tksheet/vars.py +4 -1
- {tksheet-7.2.22.dist-info → tksheet-7.2.23.dist-info}/METADATA +1 -1
- tksheet-7.2.23.dist-info/RECORD +20 -0
- {tksheet-7.2.22.dist-info → tksheet-7.2.23.dist-info}/WHEEL +1 -1
- tksheet-7.2.22.dist-info/RECORD +0 -20
- {tksheet-7.2.22.dist-info → tksheet-7.2.23.dist-info}/LICENSE.txt +0 -0
- {tksheet-7.2.22.dist-info → tksheet-7.2.23.dist-info}/top_level.txt +0 -0
tksheet/sheet_options.py
CHANGED
@@ -16,6 +16,7 @@ from .vars import (
|
|
16
16
|
def new_sheet_options() -> DotDict:
|
17
17
|
return DotDict(
|
18
18
|
{
|
19
|
+
**theme_light_blue,
|
19
20
|
"popup_menu_font": FontTuple(
|
20
21
|
"Calibri",
|
21
22
|
13 if USER_OS == "darwin" else 11,
|
@@ -136,78 +137,6 @@ def new_sheet_options() -> DotDict:
|
|
136
137
|
"next_bindings": [
|
137
138
|
"<Next>",
|
138
139
|
],
|
139
|
-
"popup_menu_fg": theme_light_blue["popup_menu_fg"],
|
140
|
-
"popup_menu_bg": theme_light_blue["popup_menu_bg"],
|
141
|
-
"popup_menu_highlight_bg": theme_light_blue["popup_menu_highlight_bg"],
|
142
|
-
"popup_menu_highlight_fg": theme_light_blue["popup_menu_highlight_fg"],
|
143
|
-
"index_hidden_rows_expander_bg": theme_light_blue["index_hidden_rows_expander_bg"],
|
144
|
-
"header_hidden_columns_expander_bg": theme_light_blue["header_hidden_columns_expander_bg"],
|
145
|
-
"header_bg": theme_light_blue["header_bg"],
|
146
|
-
"header_border_fg": theme_light_blue["header_border_fg"],
|
147
|
-
"header_grid_fg": theme_light_blue["header_grid_fg"],
|
148
|
-
"header_fg": theme_light_blue["header_fg"],
|
149
|
-
"header_selected_cells_bg": theme_light_blue["header_selected_cells_bg"],
|
150
|
-
"header_selected_cells_fg": theme_light_blue["header_selected_cells_fg"],
|
151
|
-
"index_bg": theme_light_blue["index_bg"],
|
152
|
-
"index_border_fg": theme_light_blue["index_border_fg"],
|
153
|
-
"index_grid_fg": theme_light_blue["index_grid_fg"],
|
154
|
-
"index_fg": theme_light_blue["index_fg"],
|
155
|
-
"index_selected_cells_bg": theme_light_blue["index_selected_cells_bg"],
|
156
|
-
"index_selected_cells_fg": theme_light_blue["index_selected_cells_fg"],
|
157
|
-
"top_left_bg": theme_light_blue["top_left_bg"],
|
158
|
-
"top_left_fg": theme_light_blue["top_left_fg"],
|
159
|
-
"top_left_fg_highlight": theme_light_blue["top_left_fg_highlight"],
|
160
|
-
"table_bg": theme_light_blue["table_bg"],
|
161
|
-
"table_grid_fg": theme_light_blue["table_grid_fg"],
|
162
|
-
"table_fg": theme_light_blue["table_fg"],
|
163
|
-
"tree_arrow_fg": theme_light_blue["tree_arrow_fg"],
|
164
|
-
"selected_cells_tree_arrow_fg": theme_light_blue["selected_cells_tree_arrow_fg"],
|
165
|
-
"selected_rows_tree_arrow_fg": theme_light_blue["selected_rows_tree_arrow_fg"],
|
166
|
-
"table_selected_box_cells_fg": theme_light_blue["table_selected_box_cells_fg"],
|
167
|
-
"table_selected_box_rows_fg": theme_light_blue["table_selected_box_rows_fg"],
|
168
|
-
"table_selected_box_columns_fg": theme_light_blue["table_selected_box_columns_fg"],
|
169
|
-
"table_selected_cells_border_fg": theme_light_blue["table_selected_cells_border_fg"],
|
170
|
-
"table_selected_cells_bg": theme_light_blue["table_selected_cells_bg"],
|
171
|
-
"table_selected_cells_fg": theme_light_blue["table_selected_cells_fg"],
|
172
|
-
"resizing_line_fg": theme_light_blue["resizing_line_fg"],
|
173
|
-
"drag_and_drop_bg": theme_light_blue["drag_and_drop_bg"],
|
174
|
-
"outline_color": theme_light_blue["outline_color"],
|
175
|
-
"header_selected_columns_bg": theme_light_blue["header_selected_columns_bg"],
|
176
|
-
"header_selected_columns_fg": theme_light_blue["header_selected_columns_fg"],
|
177
|
-
"index_selected_rows_bg": theme_light_blue["index_selected_rows_bg"],
|
178
|
-
"index_selected_rows_fg": theme_light_blue["index_selected_rows_fg"],
|
179
|
-
"table_selected_rows_border_fg": theme_light_blue["table_selected_rows_border_fg"],
|
180
|
-
"table_selected_rows_bg": theme_light_blue["table_selected_rows_bg"],
|
181
|
-
"table_selected_rows_fg": theme_light_blue["table_selected_rows_fg"],
|
182
|
-
"table_selected_columns_border_fg": theme_light_blue["table_selected_columns_border_fg"],
|
183
|
-
"table_selected_columns_bg": theme_light_blue["table_selected_columns_bg"],
|
184
|
-
"table_selected_columns_fg": theme_light_blue["table_selected_columns_fg"],
|
185
|
-
"vertical_scroll_background": theme_light_blue["vertical_scroll_background"],
|
186
|
-
"horizontal_scroll_background": theme_light_blue["horizontal_scroll_background"],
|
187
|
-
"vertical_scroll_troughcolor": theme_light_blue["vertical_scroll_troughcolor"],
|
188
|
-
"horizontal_scroll_troughcolor": theme_light_blue["horizontal_scroll_troughcolor"],
|
189
|
-
"vertical_scroll_lightcolor": theme_light_blue["vertical_scroll_lightcolor"],
|
190
|
-
"horizontal_scroll_lightcolor": theme_light_blue["horizontal_scroll_lightcolor"],
|
191
|
-
"vertical_scroll_darkcolor": theme_light_blue["vertical_scroll_darkcolor"],
|
192
|
-
"horizontal_scroll_darkcolor": theme_light_blue["horizontal_scroll_darkcolor"],
|
193
|
-
"vertical_scroll_relief": theme_light_blue["vertical_scroll_relief"],
|
194
|
-
"horizontal_scroll_relief": theme_light_blue["horizontal_scroll_relief"],
|
195
|
-
"vertical_scroll_troughrelief": theme_light_blue["vertical_scroll_troughrelief"],
|
196
|
-
"horizontal_scroll_troughrelief": theme_light_blue["horizontal_scroll_troughrelief"],
|
197
|
-
"vertical_scroll_bordercolor": theme_light_blue["vertical_scroll_bordercolor"],
|
198
|
-
"horizontal_scroll_bordercolor": theme_light_blue["horizontal_scroll_bordercolor"],
|
199
|
-
"vertical_scroll_active_bg": theme_light_blue["vertical_scroll_active_bg"],
|
200
|
-
"horizontal_scroll_active_bg": theme_light_blue["horizontal_scroll_active_bg"],
|
201
|
-
"vertical_scroll_not_active_bg": theme_light_blue["vertical_scroll_not_active_bg"],
|
202
|
-
"horizontal_scroll_not_active_bg": theme_light_blue["horizontal_scroll_not_active_bg"],
|
203
|
-
"vertical_scroll_pressed_bg": theme_light_blue["vertical_scroll_pressed_bg"],
|
204
|
-
"horizontal_scroll_pressed_bg": theme_light_blue["horizontal_scroll_pressed_bg"],
|
205
|
-
"vertical_scroll_active_fg": theme_light_blue["vertical_scroll_active_fg"],
|
206
|
-
"horizontal_scroll_active_fg": theme_light_blue["horizontal_scroll_active_fg"],
|
207
|
-
"vertical_scroll_not_active_fg": theme_light_blue["vertical_scroll_not_active_fg"],
|
208
|
-
"horizontal_scroll_not_active_fg": theme_light_blue["horizontal_scroll_not_active_fg"],
|
209
|
-
"vertical_scroll_pressed_fg": theme_light_blue["vertical_scroll_pressed_fg"],
|
210
|
-
"horizontal_scroll_pressed_fg": theme_light_blue["horizontal_scroll_pressed_fg"],
|
211
140
|
"vertical_scroll_borderwidth": 1,
|
212
141
|
"horizontal_scroll_borderwidth": 1,
|
213
142
|
"vertical_scroll_gripcount": 0,
|
tksheet/text_editor.py
CHANGED
@@ -52,6 +52,8 @@ class TextEditorTkText(tk.Text):
|
|
52
52
|
font: tuple,
|
53
53
|
bg: str,
|
54
54
|
fg: str,
|
55
|
+
select_bg: str,
|
56
|
+
select_fg: str,
|
55
57
|
state: str,
|
56
58
|
text: str = "",
|
57
59
|
) -> None:
|
@@ -61,6 +63,8 @@ class TextEditorTkText(tk.Text):
|
|
61
63
|
foreground=fg,
|
62
64
|
insertbackground=fg,
|
63
65
|
state=state,
|
66
|
+
selectbackground=select_bg,
|
67
|
+
selectforeground=select_fg,
|
64
68
|
)
|
65
69
|
self.editor_del_key = sheet_ops.editor_del_key
|
66
70
|
self.align = align
|
@@ -148,6 +152,7 @@ class TextEditorTkText(tk.Text):
|
|
148
152
|
|
149
153
|
def cut(self, event: object = None) -> Literal["break"]:
|
150
154
|
self.event_generate(f"<{ctrl_key}-x>")
|
155
|
+
self.event_generate("<KeyRelease>")
|
151
156
|
return "break"
|
152
157
|
|
153
158
|
def copy(self, event: object = None) -> Literal["break"]:
|
@@ -156,10 +161,12 @@ class TextEditorTkText(tk.Text):
|
|
156
161
|
|
157
162
|
def paste(self, event: object = None) -> Literal["break"]:
|
158
163
|
self.event_generate(f"<{ctrl_key}-v>")
|
164
|
+
self.event_generate("<KeyRelease>")
|
159
165
|
return "break"
|
160
166
|
|
161
167
|
def undo(self, event: object = None) -> Literal["break"]:
|
162
168
|
self.event_generate(f"<{ctrl_key}-z>")
|
169
|
+
self.event_generate("<KeyRelease>")
|
163
170
|
return "break"
|
164
171
|
|
165
172
|
|
@@ -207,6 +214,8 @@ class TextEditor(tk.Frame):
|
|
207
214
|
sheet_ops: DotDict,
|
208
215
|
bg: str,
|
209
216
|
fg: str,
|
217
|
+
select_bg: str,
|
218
|
+
select_fg: str,
|
210
219
|
align: str,
|
211
220
|
state: str,
|
212
221
|
r: int = 0,
|
@@ -222,6 +231,8 @@ class TextEditor(tk.Frame):
|
|
222
231
|
font=menu_kwargs.font,
|
223
232
|
bg=bg,
|
224
233
|
fg=fg,
|
234
|
+
select_bg=select_bg,
|
235
|
+
select_fg=select_fg,
|
225
236
|
state=state,
|
226
237
|
text=text,
|
227
238
|
)
|