MoleditPy 1.16.1__py3-none-any.whl → 1.16.1a2__py3-none-any.whl
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/modules/constants.py +1 -1
- moleditpy/modules/main_window_main_init.py +11 -13
- {moleditpy-1.16.1.dist-info → moleditpy-1.16.1a2.dist-info}/METADATA +1 -1
- {moleditpy-1.16.1.dist-info → moleditpy-1.16.1a2.dist-info}/RECORD +7 -7
- {moleditpy-1.16.1.dist-info → moleditpy-1.16.1a2.dist-info}/WHEEL +0 -0
- {moleditpy-1.16.1.dist-info → moleditpy-1.16.1a2.dist-info}/entry_points.txt +0 -0
- {moleditpy-1.16.1.dist-info → moleditpy-1.16.1a2.dist-info}/top_level.txt +0 -0
moleditpy/modules/constants.py
CHANGED
|
@@ -79,8 +79,6 @@ def detect_system_theme():
|
|
|
79
79
|
|
|
80
80
|
# macOS: 'defaults read -g AppleInterfaceStyle'
|
|
81
81
|
if platform.system() == 'Darwin':
|
|
82
|
-
return 'light'
|
|
83
|
-
'''
|
|
84
82
|
try:
|
|
85
83
|
# 'defaults read ...' が成功すればダークモード
|
|
86
84
|
p = subprocess.run(
|
|
@@ -96,7 +94,6 @@ def detect_system_theme():
|
|
|
96
94
|
except Exception:
|
|
97
95
|
# その他のエラー
|
|
98
96
|
pass
|
|
99
|
-
'''
|
|
100
97
|
|
|
101
98
|
# Linux / GNOME: try color-scheme gsetting; fallback to gtk-theme detection
|
|
102
99
|
if platform.system() == 'Linux':
|
|
@@ -497,10 +494,11 @@ class MainWindowMainInit(object):
|
|
|
497
494
|
def _icon_foreground_color():
|
|
498
495
|
"""Return a QColor for icon foreground.
|
|
499
496
|
|
|
500
|
-
NOTE:
|
|
501
|
-
(i.e.,
|
|
502
|
-
|
|
503
|
-
|
|
497
|
+
NOTE: this application inverts the usual foreground mapping so icons
|
|
498
|
+
will be the *opposite* color to the background (i.e., black on dark
|
|
499
|
+
backgrounds, white on light backgrounds). This intentionally reverses
|
|
500
|
+
the previous behavior so button icons don't blend into the 3D-view
|
|
501
|
+
background. Priority: explicit setting in 'icon_foreground' -> OS
|
|
504
502
|
theme preference -> configured 3D background -> application palette.
|
|
505
503
|
"""
|
|
506
504
|
try:
|
|
@@ -515,9 +513,9 @@ class MainWindowMainInit(object):
|
|
|
515
513
|
# 1) Prefer the system/OS dark-mode preference if available.
|
|
516
514
|
try:
|
|
517
515
|
os_pref = detect_system_dark_mode()
|
|
518
|
-
#
|
|
516
|
+
# Invert the color so in dark-pref OS we return black, in light we return white
|
|
519
517
|
if os_pref is not None:
|
|
520
|
-
return QColor('#
|
|
518
|
+
return QColor('#000000') if os_pref else QColor('#FFFFFF')
|
|
521
519
|
except Exception:
|
|
522
520
|
pass
|
|
523
521
|
|
|
@@ -529,8 +527,8 @@ class MainWindowMainInit(object):
|
|
|
529
527
|
bg = QColor(bg_hex)
|
|
530
528
|
if bg.isValid():
|
|
531
529
|
lum = 0.2126 * bg.redF() + 0.7152 * bg.greenF() + 0.0722 * bg.blueF()
|
|
532
|
-
#
|
|
533
|
-
return QColor('#
|
|
530
|
+
# Inverted: return black on dark (lum<0.5), white on light
|
|
531
|
+
return QColor('#000000') if lum < 0.5 else QColor('#FFFFFF')
|
|
534
532
|
except Exception:
|
|
535
533
|
pass
|
|
536
534
|
|
|
@@ -539,8 +537,8 @@ class MainWindowMainInit(object):
|
|
|
539
537
|
# palette.window() returns a QBrush; call color()
|
|
540
538
|
window_bg = pal.window().color()
|
|
541
539
|
lum = 0.2126 * window_bg.redF() + 0.7152 * window_bg.greenF() + 0.0722 * window_bg.blueF()
|
|
542
|
-
#
|
|
543
|
-
return QColor('#
|
|
540
|
+
# Inverted mapping for palette fallback
|
|
541
|
+
return QColor('#000000') if lum < 0.5 else QColor('#FFFFFF')
|
|
544
542
|
except Exception:
|
|
545
543
|
return QColor('#000000')
|
|
546
544
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy
|
|
3
|
-
Version: 1.16.
|
|
3
|
+
Version: 1.16.1a2
|
|
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
|
|
@@ -12,7 +12,7 @@ moleditpy/modules/bond_item.py,sha256=zjQHa4vb8xhS9B7cYPRM0nak-f7lr5NQ1uAj_J78ah
|
|
|
12
12
|
moleditpy/modules/bond_length_dialog.py,sha256=xlx-bU3tVeLfShdVRw6_Geo5Gl9mztlIfTdT9tJ6WMA,14579
|
|
13
13
|
moleditpy/modules/calculation_worker.py,sha256=detE48BW08a2tvmKjMgz8zCShgARzsRH-ABmWrPcqZA,42055
|
|
14
14
|
moleditpy/modules/color_settings_dialog.py,sha256=h4AOKU8dCTenecI8zOM9GfnmKDm7jfe5C4Fa23Budvs,15205
|
|
15
|
-
moleditpy/modules/constants.py,sha256=
|
|
15
|
+
moleditpy/modules/constants.py,sha256=rncfyD-EbegEYA8IeIGYrFm2KHAMKPfiEUQKbA3st1o,4436
|
|
16
16
|
moleditpy/modules/constrained_optimization_dialog.py,sha256=MlWnPze0JJvnqmHx9n3qZWG_h-2kZymT0PQ6lALbCro,29861
|
|
17
17
|
moleditpy/modules/custom_interactor_style.py,sha256=K_uGM6FezY0kZ3zPqoR6f0nowG40ytt-L4UCAbPlwGM,38184
|
|
18
18
|
moleditpy/modules/custom_qt_interactor.py,sha256=6mzaVb3Mhp-4nryG5AraEvPPgBJpotrzVYwrpCAKmVo,2186
|
|
@@ -25,7 +25,7 @@ moleditpy/modules/main_window_dialog_manager.py,sha256=5WU6mFABB0aI4XCywP-cLFPkN
|
|
|
25
25
|
moleditpy/modules/main_window_edit_3d.py,sha256=FStBWVeDVAM2MoO-JCTjPM-G7iT8QZUHxsb0dS4MEAI,19553
|
|
26
26
|
moleditpy/modules/main_window_edit_actions.py,sha256=8tR0rYfgWYgdKTxBP4snzpxhiD2DExSKyf4jzSWb6sE,64598
|
|
27
27
|
moleditpy/modules/main_window_export.py,sha256=f_Z4qVYKBTe06lGTFqjd3deluUdkQvHhZYa81h7UpBM,34465
|
|
28
|
-
moleditpy/modules/main_window_main_init.py,sha256=
|
|
28
|
+
moleditpy/modules/main_window_main_init.py,sha256=igIxiBiC707QlI6v69GilZ4kmPLjFMNoGH62fENqUxA,75293
|
|
29
29
|
moleditpy/modules/main_window_molecular_parsers.py,sha256=8JAIgr1axzmJqX_Ue-Adkl8e_8B2Th9yutQbau8EEWQ,43401
|
|
30
30
|
moleditpy/modules/main_window_project_io.py,sha256=2ArkW23L4ahQIiktCCXlNsJphU0awO5YzJGihIJsn1c,17021
|
|
31
31
|
moleditpy/modules/main_window_string_importers.py,sha256=yrZblvPG840qnqVEJf__XVfNnWl_r3vt68Abfs2aYDQ,10674
|
|
@@ -47,8 +47,8 @@ moleditpy/modules/zoomable_view.py,sha256=ZgAmmWXIKtx7AhMjs6H6PCyvb_kpYuankf8Uxs
|
|
|
47
47
|
moleditpy/modules/assets/icon.icns,sha256=wD5R6-Vw7K662tVKhu2E1ImN0oUuyAP4youesEQsn9c,139863
|
|
48
48
|
moleditpy/modules/assets/icon.ico,sha256=RfgFcx7-dHY_2STdsOQCQziY5SNhDr3gPnjO6jzEDPI,147975
|
|
49
49
|
moleditpy/modules/assets/icon.png,sha256=kCFN1WacYIdy0GN6SFEbNA00ef39pCczBnFdkkBI8Bs,147110
|
|
50
|
-
moleditpy-1.16.
|
|
51
|
-
moleditpy-1.16.
|
|
52
|
-
moleditpy-1.16.
|
|
53
|
-
moleditpy-1.16.
|
|
54
|
-
moleditpy-1.16.
|
|
50
|
+
moleditpy-1.16.1a2.dist-info/METADATA,sha256=GzsY-cXS8zmxVPIwqhNILAi5lReW3gLO6r__RVYZMWs,17358
|
|
51
|
+
moleditpy-1.16.1a2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
52
|
+
moleditpy-1.16.1a2.dist-info/entry_points.txt,sha256=yH1h9JjALhok1foXT3-hYrC4ufoZt8b7oiBcsdnGNNM,54
|
|
53
|
+
moleditpy-1.16.1a2.dist-info/top_level.txt,sha256=ARICrS4ihlPXqywlKl6o-oJa3Qz3gZRWu_VZsQ3_c44,10
|
|
54
|
+
moleditpy-1.16.1a2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|