fix(interface): 修复 CSS_PATH 导致的样式覆写问题

This commit is contained in:
2026-04-22 06:55:58 +08:00
parent b9d88383f9
commit c2a1867c49
2 changed files with 10 additions and 8 deletions

View File

@@ -2,14 +2,10 @@
align-vertical: bottom;
}
Switch {
.setting-switch {
dock: right;
}
Label {
width: auto
}
Select {
width: 55%;
dock: right;
@@ -20,7 +16,7 @@ Input {
dock: right;
}
Horizontal {
.setting-item {
width: 100%;
height: 4;
padding: 0 0 1 0;

View File

@@ -46,7 +46,6 @@ class SettingScreen(Screen):
@on(events.ScreenResume)
def post_active(self, event):
from heurams.interface import shim
shim.set_term_title(f"{self.app.TITLE} - {self.SUB_TITLE}")
def compose(self) -> ComposeResult:
@@ -113,6 +112,7 @@ class SettingScreen(Screen):
prompt=f'{parent.get(f"{i}", "")}',
id=domize(f"{parent_epath}.{i}"),
),
classes="setting-item"
)
)
elif isinstance(parent[f"_{i}_candidate"], list):
@@ -124,6 +124,7 @@ class SettingScreen(Screen):
prompt=f'{parent.get(f"{i}", "")}',
id=domize(f"{parent_epath}.{i}"),
),
classes="setting-item"
)
)
else:
@@ -137,6 +138,7 @@ class SettingScreen(Screen):
type="number",
id=domize(f"{parent_epath}.{i}"),
),
classes="setting-item"
)
)
elif isinstance(parent[i], str):
@@ -149,6 +151,7 @@ class SettingScreen(Screen):
type="text",
id=domize(f"{parent_epath}.{i}"),
),
classes="setting-item"
)
)
elif isinstance(parent[i], bool):
@@ -156,8 +159,10 @@ class SettingScreen(Screen):
Horizontal(
Label(i + f'\n[d]{parent.get(f"_{i}_desc", "")}[/d]'),
Switch(
value=parent[i], id=domize(f"{parent_epath}.{i}")
value=parent[i], id=domize(f"{parent_epath}.{i}"),
classes="setting-switch",
),
classes="setting-item"
)
)
elif isinstance(parent[i], int):
@@ -170,6 +175,7 @@ class SettingScreen(Screen):
type="integer",
id=domize(f"{parent_epath}.{i}"),
),
classes="setting-item"
)
)
elif isinstance(parent[i], list):