Skip to content

Theme/langpack cleaning #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions pysimplesql/pysimplesql.py
Original file line number Diff line number Diff line change
Expand Up @@ -3942,11 +3942,7 @@ def __init__(self, title: str, config: dict = None):
"green": {"value_start": 0, "value_range": 255, "period": 3, "offset": 120},
"blue": {"value_start": 0, "value_range": 255, "period": 4, "offset": 240},
# phrases to display and the number of seconds to elapse between phrases
# TODO: move to languagepack
"phrases": [
"Please wait...",
"Still working...",
],
"phrases": lang.animate_phrases,
"phrase_delay": 5,
}
if config is None:
Expand Down Expand Up @@ -4999,11 +4995,11 @@ def update_headings(
# Load in our marker characters. We will use them to both display the
# sort direction and to detect current direction
try:
asc = themepack.sort_asc_marker
asc = themepack.marker_sort_asc
except AttributeError:
asc = "\u25BC"
try:
desc = themepack.sort_desc_marker
desc = themepack.marker_sort_desc
except AttributeError:
desc = "\u25B2"

Expand Down Expand Up @@ -5131,8 +5127,8 @@ class ThemePack:
"marker_required_color": "red2",
# Sorting icons
# ----------------------------------------
"sort_asc_marker": "\u25BC",
"sort_desc_marker": "\u25B2",
"marker_sort_asc": "\u25BC",
"marker_sort_desc": "\u25B2",
# Info Popup defaults
# ----------------------------------------
"popup_info_auto_close_seconds": 1,
Expand Down Expand Up @@ -5191,8 +5187,8 @@ def __call__(self, tp_dict: Dict[str, str] = {}) -> None:
'marker_virtual' : string eg '', f'', unicode
'marker_required' : string eg '', f'', unicode
'marker_required_color': string eg 'red', Tuple eg (255,0,0)
'sort_asc_marker': string eg '', f'', unicode
'sort_desc_marker': string eg '', f'', unicode
'marker_sort_asc': string eg '', f'', unicode
'marker_sort_desc': string eg '', f'', unicode
}
For Base64, you can convert a whole folder using https://github.com/PySimpleGUI/PySimpleGUI-Base64-Encoder # fmt: skip
Remember to us b'' around the string.
Expand Down Expand Up @@ -5260,7 +5256,14 @@ class LanguagePack:
# ------------------------------------------------------------------------------
"sqldriver_init": "{name} connection",
"sqldriver_connecting": "Connecting to database",
"sqldriver_execute": "executing SQL commands",
"sqldriver_execute": "Executing SQL commands",
# ------------------------------------------------------------------------------
# Default ProgressAnimate Phrases
# ------------------------------------------------------------------------------
"animate_phrases": [
"Please wait...",
"Still working...",
],
# ------------------------------------------------------------------------------
# Info Popups - no buttons
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -6965,7 +6968,7 @@ def __init__(
self.database = database
self.con = self.connect()

self.win_pb.update("Executing SQL commands", 50)
self.win_pb.update(lang.sqldriver_execute, 50)
if sql_commands is not None:
# run SQL script if the database does not yet exist
logger.info("Executing sql commands passed in")
Expand Down
25 changes: 7 additions & 18 deletions pysimplesql/theme_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,17 @@
# ======================================================================================================================
# Change the look and feel of your database application all in one place.
tp_text = {
"ttk_theme": "default",
"edit_protect": "\U0001F512",
"quick_edit": "\u270E",
"save": "\U0001f4be",
"first": "\u2770",
"previous": "\u276C",
"next": "\u276D",
"last": "\u2771",
"quick_edit": "\u270F",
"save": "\u2714",
"first": "|<",
"previous": "<",
"next": ">",
"last": ">|",
"insert": "\u271A",
"delete": "\u274E",
"duplicate": "\u274F",
"search": "Search",
"marker_virtual": "\u2731",
"marker_required": "\u2731",
"marker_required_color": "red2",
"sort_asc_marker": "\u25BC",
"sort_desc_marker": "\u25B2",
"popup_info_auto_close_seconds": 1,
"popup_info_alpha_channel": 0.85,
"default_label_size": (15, 1),
"default_element_size": (30, 1),
"default_mline_size": (30, 7),
"search": "\U0001f50d",
}
# fmt: off
tp_large = {
Expand Down