Skip to content

Commit

Permalink
Set defaul theme to System
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadlaxa committed Sep 12, 2024
1 parent bc29fd4 commit a1d0793
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions OU Dictionary Editor/OpenUtau_Dictionary_Editor.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class Dictionary(TkinterDnD.Tk):

config = configparser.ConfigParser()
config.read('settings.ini')
selected_theme = config.get('Settings', 'theme', fallback='Dark')
selected_theme = config.get('Settings', 'theme', fallback='System')
selected_accent = config.get('Settings', 'accent', fallback='Mint')
self.theme_var = tk.StringVar(value=selected_theme)
self.accent_var = tk.StringVar(value=selected_accent)
Expand Down Expand Up @@ -595,8 +595,10 @@ class Dictionary(TkinterDnD.Tk):
if theme_key in theme_map:
ttk.Style().theme_use(theme_map[theme_key])
except (configparser.NoSectionError, configparser.NoOptionError):
sv_ttk.set_theme("dark")
ttk.Style().theme_use("mint_dark")
system_theme = darkdetect.theme().lower()
theme_key = (f"mint_{system_theme}")
sv_ttk.set_theme(system_theme)
ttk.Style().theme_use(theme_key)

def load_cmudict(self, filepath=None):
if filepath is None:
Expand Down Expand Up @@ -3948,6 +3950,7 @@ class Dictionary(TkinterDnD.Tk):

self.cache_b = ttk.Button(cache_frame, text="Cache", style='Accent.TButton', command=self.clear_cache)
self.cache_b.grid(row=2, column=0, padx=10, pady=10, sticky="ew")
self.create_tooltip(self.cache_b, 'tp_cache_b', 'Clears out the Cache folder')
self.observer = Observer()
self.handler = CacheHandler(update_callback=self.update_cache_button_text)
self.observer.schedule(self.handler, CACHE, recursive=True)
Expand Down
1 change: 1 addition & 0 deletions OU Dictionary Editor/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Add Tooltips and Tooltips toggle
- Add cache cleaner
- Update Localizations
- Fixes to Copy and paste function to validate YAML entries first

**`(8/03/24)`**
- Add file drag and drop file support to open them directly
Expand Down
1 change: 1 addition & 0 deletions OU Dictionary Editor/Templates/Localizations/en_US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,4 @@ tp_append_json: "Appends Synthv JSON Dictionaries"
tp_append_d: "Append or merge dictionary files to the editor"
tp_btn_see: "Directs to the Github Repository for more information"
tp_chk_show_whats_new: "Do not show this window on startup (Checkbox resets once you open again this window)"
tp_cache_b: "Clears out the Cache folder"

0 comments on commit a1d0793

Please sign in to comment.