Skip to content

Commit 53d7100

Browse files
committed
Move themes and images back to src/ncvue
1 parent 29a04e0 commit 53d7100

File tree

230 files changed

+23
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+23
-12
lines changed

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
prune **
22
include src/ncvue/*.py
3-
graft src/images/*.png
4-
graft src/themes/azure-2.0
3+
include src/ncvue/images/*.png
4+
graft src/ncvue/themes/azure-2.0
55
graft tests
66

77
include AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst LICENSE pyproject.toml setup.cfg

src/ncvue/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
* v4.3, allow multiple netcdf files, Jan 2024, Matthias Cuntz
6363
* v4.4, Add borders, rivers, and lakes checkbuttons in map,
6464
Feb 2024, Matthias Cuntz
65+
* v4.4.1 Move themes and images back to src/ncvue, Feb 2024, Matthias Cuntz
6566
6667
"""
6768
# helper functions
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.

src/ncvue/ncvcontour.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* Allow multiple netcdf files, Jan 2024, Matthias Cuntz
3030
* Move images/ directory from src/ncvue/ to src/ directory,
3131
Jan 2024, Matthias Cuntz
32+
* Move themes/ and images/ back to src/ncvue/, Feb 2024, Matthias Cuntz
3233
3334
"""
3435
import os
@@ -145,7 +146,7 @@ def __init__(self, master, **kwargs):
145146
bundle_dir = getattr(sys, '_MEIPASS',
146147
os.path.abspath(os.path.dirname(__file__)))
147148
self.imaps = [ tk.PhotoImage(file=bundle_dir +
148-
'/../images/' + i + '.png')
149+
'/images/' + i + '.png')
149150
for i in self.cmaps ]
150151

151152
# 1. row

src/ncvue/ncvmap.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* Move images/ directory from src/ncvue/ to src/ directory,
3535
Jan 2024, Matthias Cuntz
3636
* Added borders, rivers, and lakes checkbuttons, Feb 2024, Matthias Cuntz
37+
* Move themes/ and images/ back to src/ncvue/, Feb 2024, Matthias Cuntz
3738
3839
"""
3940
import os
@@ -166,7 +167,7 @@ def __init__(self, master, **kwargs):
166167
bundle_dir = getattr(sys, '_MEIPASS',
167168
os.path.abspath(os.path.dirname(__file__)))
168169
self.imaps = [ tk.PhotoImage(file=bundle_dir +
169-
'/../images/' + i + '.png')
170+
'/images/' + i + '.png')
170171
for i in self.cmaps ]
171172

172173
# only projections with keyword: central_longitude

src/ncvue/ncvscatter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* Address fi.variables[name] directly by fi[name], Jan 2024, Matthias Cuntz
3030
* Allow groups in netcdf files, Jan 2024, Matthias Cuntz
3131
* Allow multiple netcdf files, Jan 2024, Matthias Cuntz
32+
* Move themes/ and images/ back to src/ncvue/, Feb 2024, Matthias Cuntz
3233
3334
"""
3435
import tkinter as tk

src/ncvue/ncvue.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
* Allow multiple netcdf files, Jan 2024, Matthias Cuntz
3232
* Move themes/ and images/ directories from src/ncvue/ to src/ directory,
3333
Jan 2024, Matthias Cuntz
34+
* Move themes/ and images/ back to src/ncvue/, Feb 2024, Matthias Cuntz
3435
3536
"""
3637
import os
@@ -90,6 +91,9 @@ def ncvue(ncfile=[], miss=np.nan):
9091
style.theme_use(theme)
9192
except:
9293
pass
94+
# top.tk.call('source', bundle_dir + '/themes/azure-2.0/azure.tcl')
95+
# theme = 'light' # light, dark
96+
# top.tk.call("set_theme", theme)
9397
elif ios == 'Windows':
9498
top.option_add("*Font", "Helvetica 10")
9599
plt.rc('font', size=13)
@@ -103,28 +107,28 @@ def ncvue(ncfile=[], miss=np.nan):
103107
# style packages
104108
# Download from https://sourceforge.net/projects/tcl-awthemes/
105109
# top.tk.call('lappend', 'auto_path',
106-
# bundle_dir + '/../themes/awthemes-10.3.2')
110+
# bundle_dir + '/themes/awthemes-10.3.2')
107111
# theme = 'awdark' # 'awlight', 'awdark'
108112
# top.tk.call('package', 'require', theme)
109113
# style = ttk.Style()
110114
# style.theme_use(theme)
111115

112116
# single file styles
113117
# 'azure' and 'azure-dark' v1.x, 'Breeze'
114-
# top.tk.call('source', bundle_dir + '/../themes/breeze/breeze.tcl')
118+
# top.tk.call('source', bundle_dir + '/themes/breeze/breeze.tcl')
115119
# theme = 'Breeze'
116-
# top.tk.call('source', bundle_dir + '/../themes/azure-1.3/azure.tcl')
120+
# top.tk.call('source', bundle_dir + '/themes/azure-1.3/azure.tcl')
117121
# theme = 'azure'
118122
# top.tk.call('source', bundle_dir +
119-
# '/../themes/azure-1.3/azure-dark.tcl')
123+
# '/themes/azure-1.3/azure-dark.tcl')
120124
# theme = 'azure-dark'
121125
# style = ttk.Style()
122126
# style.theme_use(theme)
123127

124128
# 'azure' v2.x, 'sun-valley', 'forest' of rdbende
125-
top.tk.call('source', bundle_dir + '/../themes/azure-2.0/azure.tcl')
129+
top.tk.call('source', bundle_dir + '/themes/azure-2.0/azure.tcl')
126130
# top.tk.call('source', bundle_dir +
127-
# '/../themes/sun-valley-1.0/sun-valley.tcl')
131+
# '/themes/sun-valley-1.0/sun-valley.tcl')
128132
theme = 'light' # light, dark
129133
top.tk.call("set_theme", theme)
130134
elif ios == 'Linux':
@@ -134,7 +138,7 @@ def ncvue(ncfile=[], miss=np.nan):
134138
# style.theme_use(theme)
135139

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

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

0 commit comments

Comments
 (0)