Skip to content

Commit

Permalink
Move themes and images back to src/ncvue
Browse files Browse the repository at this point in the history
  • Loading branch information
mcuntz committed Mar 3, 2024
1 parent 29a04e0 commit 53d7100
Show file tree
Hide file tree
Showing 230 changed files with 23 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
---------

v4.4.1 (Feb 2024)
* Move themes and images back to src/ncvue.

v4.4 (Feb 2024)
* Added borders, rivers, and lakes checkbuttons in map.
* Bugfix formatted string used wrong data type in `analyse_netcdf`.
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prune **
include src/ncvue/*.py
graft src/images/*.png
graft src/themes/azure-2.0
include src/ncvue/images/*.png
graft src/ncvue/themes/azure-2.0
graft tests

include AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst LICENSE pyproject.toml setup.cfg
Expand Down
1 change: 1 addition & 0 deletions src/ncvue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
* v4.3, allow multiple netcdf files, Jan 2024, Matthias Cuntz
* v4.4, Add borders, rivers, and lakes checkbuttons in map,
Feb 2024, Matthias Cuntz
* v4.4.1 Move themes and images back to src/ncvue, Feb 2024, Matthias Cuntz
"""
# helper functions
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
3 changes: 2 additions & 1 deletion src/ncvue/ncvcontour.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* Allow multiple netcdf files, Jan 2024, Matthias Cuntz
* Move images/ directory from src/ncvue/ to src/ directory,
Jan 2024, Matthias Cuntz
* Move themes/ and images/ back to src/ncvue/, Feb 2024, Matthias Cuntz
"""
import os
Expand Down Expand Up @@ -145,7 +146,7 @@ def __init__(self, master, **kwargs):
bundle_dir = getattr(sys, '_MEIPASS',
os.path.abspath(os.path.dirname(__file__)))
self.imaps = [ tk.PhotoImage(file=bundle_dir +
'/../images/' + i + '.png')
'/images/' + i + '.png')
for i in self.cmaps ]

# 1. row
Expand Down
3 changes: 2 additions & 1 deletion src/ncvue/ncvmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* Move images/ directory from src/ncvue/ to src/ directory,
Jan 2024, Matthias Cuntz
* Added borders, rivers, and lakes checkbuttons, Feb 2024, Matthias Cuntz
* Move themes/ and images/ back to src/ncvue/, Feb 2024, Matthias Cuntz
"""
import os
Expand Down Expand Up @@ -166,7 +167,7 @@ def __init__(self, master, **kwargs):
bundle_dir = getattr(sys, '_MEIPASS',
os.path.abspath(os.path.dirname(__file__)))
self.imaps = [ tk.PhotoImage(file=bundle_dir +
'/../images/' + i + '.png')
'/images/' + i + '.png')
for i in self.cmaps ]

# only projections with keyword: central_longitude
Expand Down
1 change: 1 addition & 0 deletions src/ncvue/ncvscatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* Address fi.variables[name] directly by fi[name], Jan 2024, Matthias Cuntz
* Allow groups in netcdf files, Jan 2024, Matthias Cuntz
* Allow multiple netcdf files, Jan 2024, Matthias Cuntz
* Move themes/ and images/ back to src/ncvue/, Feb 2024, Matthias Cuntz
"""
import tkinter as tk
Expand Down
20 changes: 12 additions & 8 deletions src/ncvue/ncvue.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* Allow multiple netcdf files, Jan 2024, Matthias Cuntz
* Move themes/ and images/ directories from src/ncvue/ to src/ directory,
Jan 2024, Matthias Cuntz
* Move themes/ and images/ back to src/ncvue/, Feb 2024, Matthias Cuntz
"""
import os
Expand Down Expand Up @@ -90,6 +91,9 @@ def ncvue(ncfile=[], miss=np.nan):
style.theme_use(theme)
except:
pass
# top.tk.call('source', bundle_dir + '/themes/azure-2.0/azure.tcl')
# theme = 'light' # light, dark
# top.tk.call("set_theme", theme)
elif ios == 'Windows':
top.option_add("*Font", "Helvetica 10")
plt.rc('font', size=13)
Expand All @@ -103,28 +107,28 @@ def ncvue(ncfile=[], miss=np.nan):
# style packages
# Download from https://sourceforge.net/projects/tcl-awthemes/
# top.tk.call('lappend', 'auto_path',
# bundle_dir + '/../themes/awthemes-10.3.2')
# bundle_dir + '/themes/awthemes-10.3.2')
# theme = 'awdark' # 'awlight', 'awdark'
# top.tk.call('package', 'require', theme)
# style = ttk.Style()
# style.theme_use(theme)

# single file styles
# 'azure' and 'azure-dark' v1.x, 'Breeze'
# top.tk.call('source', bundle_dir + '/../themes/breeze/breeze.tcl')
# top.tk.call('source', bundle_dir + '/themes/breeze/breeze.tcl')
# theme = 'Breeze'
# top.tk.call('source', bundle_dir + '/../themes/azure-1.3/azure.tcl')
# top.tk.call('source', bundle_dir + '/themes/azure-1.3/azure.tcl')
# theme = 'azure'
# top.tk.call('source', bundle_dir +
# '/../themes/azure-1.3/azure-dark.tcl')
# '/themes/azure-1.3/azure-dark.tcl')
# theme = 'azure-dark'
# style = ttk.Style()
# style.theme_use(theme)

# 'azure' v2.x, 'sun-valley', 'forest' of rdbende
top.tk.call('source', bundle_dir + '/../themes/azure-2.0/azure.tcl')
top.tk.call('source', bundle_dir + '/themes/azure-2.0/azure.tcl')
# top.tk.call('source', bundle_dir +
# '/../themes/sun-valley-1.0/sun-valley.tcl')
# '/themes/sun-valley-1.0/sun-valley.tcl')
theme = 'light' # light, dark
top.tk.call("set_theme", theme)
elif ios == 'Linux':
Expand All @@ -134,7 +138,7 @@ def ncvue(ncfile=[], miss=np.nan):
# style.theme_use(theme)

# 'azure' v2.x, 'sun-valley', 'forest' of rdbende
top.tk.call('source', bundle_dir + '/../themes/azure-2.0/azure.tcl')
top.tk.call('source', bundle_dir + '/themes/azure-2.0/azure.tcl')
theme = 'light' # light, dark
top.tk.call("set_theme", theme)

Expand All @@ -145,7 +149,7 @@ def ncvue(ncfile=[], miss=np.nan):
except NameError:
whichpy = ''
if not whichpy:
icon = tk.PhotoImage(file=bundle_dir + '/../images/ncvue_icon.png')
icon = tk.PhotoImage(file=bundle_dir + '/images/ncvue_icon.png')
top.iconphoto(True, icon) # True: apply to all future toplevels
else:
icon = None
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 53d7100

Please sign in to comment.