MoleditPy 1.16.1__tar.gz → 1.16.1a1__tar.gz
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.
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/PKG-INFO +1 -1
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/pyproject.toml +1 -1
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/MoleditPy.egg-info/PKG-INFO +1 -1
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/MoleditPy.egg-info/SOURCES.txt +2 -1
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/constants.py +1 -1
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_main_init.py +26 -27
- moleditpy-1.16.1a1/tests/test_project_io_wrappers.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/README.md +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/setup.cfg +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/MoleditPy.egg-info/dependency_links.txt +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/MoleditPy.egg-info/entry_points.txt +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/MoleditPy.egg-info/requires.txt +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/MoleditPy.egg-info/top_level.txt +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/__init__.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/__main__.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/main.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/__init__.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/about_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/align_plane_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/alignment_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/analysis_window.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/angle_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/assets/icon.icns +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/assets/icon.ico +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/assets/icon.png +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/atom_item.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/bond_item.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/bond_length_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/calculation_worker.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/color_settings_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/constrained_optimization_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/custom_interactor_style.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/custom_qt_interactor.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/dialog3_d_picking_mixin.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/dihedral_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_app_state.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_compute.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_dialog_manager.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_edit_3d.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_edit_actions.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_export.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_molecular_parsers.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_project_io.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_string_importers.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_ui_manager.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_view_3d.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_view_loaders.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/mirror_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/molecular_data.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/molecule_scene.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/move_group_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/periodic_table_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/planarize_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/settings_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/template_preview_item.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/template_preview_view.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/translation_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/user_template_dialog.py +0 -0
- {moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/zoomable_view.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy
|
|
3
|
-
Version: 1.16.
|
|
3
|
+
Version: 1.16.1a1
|
|
4
4
|
Summary: A cross-platform, simple, and intuitive molecular structure editor built in Python. It allows 2D molecular drawing and 3D structure visualization. It supports exporting structure files for input to DFT calculation software.
|
|
5
5
|
Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/HiroYokoyama/python_molecular_editor
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy
|
|
3
|
-
Version: 1.16.
|
|
3
|
+
Version: 1.16.1a1
|
|
4
4
|
Summary: A cross-platform, simple, and intuitive molecular structure editor built in Python. It allows 2D molecular drawing and 3D structure visualization. It supports exporting structure files for input to DFT calculation software.
|
|
5
5
|
Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/HiroYokoyama/python_molecular_editor
|
|
@@ -60,4 +60,5 @@ src/moleditpy/modules/user_template_dialog.py
|
|
|
60
60
|
src/moleditpy/modules/zoomable_view.py
|
|
61
61
|
src/moleditpy/modules/assets/icon.icns
|
|
62
62
|
src/moleditpy/modules/assets/icon.ico
|
|
63
|
-
src/moleditpy/modules/assets/icon.png
|
|
63
|
+
src/moleditpy/modules/assets/icon.png
|
|
64
|
+
tests/test_project_io_wrappers.py
|
|
@@ -51,15 +51,16 @@ def detect_system_dark_mode():
|
|
|
51
51
|
macOS (defaults read), and GNOME/GTK-based Linux (gsettings). Return
|
|
52
52
|
None if no reliable information is available.
|
|
53
53
|
"""
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
try:
|
|
55
|
+
# Windows: read registry AppsUseLightTheme (0 = dark, 1 = light)
|
|
56
|
+
if platform.system() == 'Windows' and winreg is not None:
|
|
57
|
+
try:
|
|
58
|
+
with winreg.OpenKey(winreg.HKEY_CURRENT_USER,
|
|
59
|
+
r'Software\Microsoft\Windows\CurrentVersion\Themes\Personalize') as k:
|
|
60
|
+
val, _ = winreg.QueryValueEx(k, 'AppsUseLightTheme')
|
|
61
|
+
return False if int(val) == 0 else True
|
|
62
|
+
except Exception:
|
|
63
|
+
pass
|
|
63
64
|
|
|
64
65
|
def detect_system_theme():
|
|
65
66
|
"""OSの優先テーマ設定を 'dark', 'light', または None として返す。
|
|
@@ -79,8 +80,6 @@ def detect_system_theme():
|
|
|
79
80
|
|
|
80
81
|
# macOS: 'defaults read -g AppleInterfaceStyle'
|
|
81
82
|
if platform.system() == 'Darwin':
|
|
82
|
-
return 'light'
|
|
83
|
-
'''
|
|
84
83
|
try:
|
|
85
84
|
# 'defaults read ...' が成功すればダークモード
|
|
86
85
|
p = subprocess.run(
|
|
@@ -96,7 +95,6 @@ def detect_system_theme():
|
|
|
96
95
|
except Exception:
|
|
97
96
|
# その他のエラー
|
|
98
97
|
pass
|
|
99
|
-
'''
|
|
100
98
|
|
|
101
99
|
# Linux / GNOME: try color-scheme gsetting; fallback to gtk-theme detection
|
|
102
100
|
if platform.system() == 'Linux':
|
|
@@ -105,16 +103,16 @@ def detect_system_theme():
|
|
|
105
103
|
if p.returncode == 0:
|
|
106
104
|
out = p.stdout.strip().strip("'\n ")
|
|
107
105
|
if 'dark' in out.lower():
|
|
108
|
-
return
|
|
106
|
+
return True
|
|
109
107
|
if 'light' in out.lower():
|
|
110
|
-
return
|
|
108
|
+
return False
|
|
111
109
|
except Exception:
|
|
112
110
|
pass
|
|
113
111
|
|
|
114
112
|
try:
|
|
115
113
|
p = subprocess.run(['gsettings', 'get', 'org.gnome.desktop.interface', 'gtk-theme'], capture_output=True, text=True)
|
|
116
114
|
if p.returncode == 0 and '-dark' in p.stdout.lower():
|
|
117
|
-
return
|
|
115
|
+
return True
|
|
118
116
|
except Exception:
|
|
119
117
|
pass
|
|
120
118
|
except Exception:
|
|
@@ -238,8 +236,8 @@ class MainWindowMainInit(object):
|
|
|
238
236
|
self.atom_selection_mode = False
|
|
239
237
|
self.selected_atom_actors = []
|
|
240
238
|
|
|
241
|
-
# 3D編集用の原子選択状態
|
|
242
|
-
self.selected_atoms_3d = set()
|
|
239
|
+
# 3D編集用の原子選択状態
|
|
240
|
+
self.selected_atoms_3d = set() # 3Dビューで選択された原子のインデックス
|
|
243
241
|
|
|
244
242
|
# 3D編集ダイアログの参照を保持
|
|
245
243
|
self.active_3d_dialogs = []
|
|
@@ -497,10 +495,11 @@ class MainWindowMainInit(object):
|
|
|
497
495
|
def _icon_foreground_color():
|
|
498
496
|
"""Return a QColor for icon foreground.
|
|
499
497
|
|
|
500
|
-
NOTE:
|
|
501
|
-
(i.e.,
|
|
502
|
-
|
|
503
|
-
|
|
498
|
+
NOTE: this application inverts the usual foreground mapping so icons
|
|
499
|
+
will be the *opposite* color to the background (i.e., black on dark
|
|
500
|
+
backgrounds, white on light backgrounds). This intentionally reverses
|
|
501
|
+
the previous behavior so button icons don't blend into the 3D-view
|
|
502
|
+
background. Priority: explicit setting in 'icon_foreground' -> OS
|
|
504
503
|
theme preference -> configured 3D background -> application palette.
|
|
505
504
|
"""
|
|
506
505
|
try:
|
|
@@ -515,9 +514,9 @@ class MainWindowMainInit(object):
|
|
|
515
514
|
# 1) Prefer the system/OS dark-mode preference if available.
|
|
516
515
|
try:
|
|
517
516
|
os_pref = detect_system_dark_mode()
|
|
518
|
-
#
|
|
517
|
+
# Invert the color so in dark-pref OS we return black, in light we return white
|
|
519
518
|
if os_pref is not None:
|
|
520
|
-
return QColor('#
|
|
519
|
+
return QColor('#000000') if os_pref else QColor('#FFFFFF')
|
|
521
520
|
except Exception:
|
|
522
521
|
pass
|
|
523
522
|
|
|
@@ -529,8 +528,8 @@ class MainWindowMainInit(object):
|
|
|
529
528
|
bg = QColor(bg_hex)
|
|
530
529
|
if bg.isValid():
|
|
531
530
|
lum = 0.2126 * bg.redF() + 0.7152 * bg.greenF() + 0.0722 * bg.blueF()
|
|
532
|
-
#
|
|
533
|
-
return QColor('#
|
|
531
|
+
# Inverted: return black on dark (lum<0.5), white on light
|
|
532
|
+
return QColor('#000000') if lum < 0.5 else QColor('#FFFFFF')
|
|
534
533
|
except Exception:
|
|
535
534
|
pass
|
|
536
535
|
|
|
@@ -539,8 +538,8 @@ class MainWindowMainInit(object):
|
|
|
539
538
|
# palette.window() returns a QBrush; call color()
|
|
540
539
|
window_bg = pal.window().color()
|
|
541
540
|
lum = 0.2126 * window_bg.redF() + 0.7152 * window_bg.greenF() + 0.0722 * window_bg.blueF()
|
|
542
|
-
#
|
|
543
|
-
return QColor('#
|
|
541
|
+
# Inverted mapping for palette fallback
|
|
542
|
+
return QColor('#000000') if lum < 0.5 else QColor('#FFFFFF')
|
|
544
543
|
except Exception:
|
|
545
544
|
return QColor('#000000')
|
|
546
545
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/constrained_optimization_dialog.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_molecular_parsers.py
RENAMED
|
File without changes
|
|
File without changes
|
{moleditpy-1.16.1 → moleditpy-1.16.1a1}/src/moleditpy/modules/main_window_string_importers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|