fix: v0.4.2 串口日志清空按钮并入标题行对齐;恢复光机命令快捷按钮排(开/关光机等7个, v0.4.0 重写时丢失);重打包
This commit is contained in:
@@ -63,7 +63,7 @@ import edid_parse
|
||||
import patterns
|
||||
|
||||
APP_NAME = "DLPilot"
|
||||
APP_VERSION = "0.4.1"
|
||||
APP_VERSION = "0.4.2"
|
||||
REPO_URL = "https://gitea.hulk.wang/hulk/HW-Debug-Tools"
|
||||
MONO = QFont("Consolas", 10)
|
||||
CHIP_IDLE = "#666666"
|
||||
@@ -210,7 +210,7 @@ class App(QMainWindow):
|
||||
button.clicked.connect(callback)
|
||||
return button
|
||||
|
||||
def _card(self, title, parent):
|
||||
def _card(self, title, parent, trailing=None):
|
||||
card = CardWidget(parent)
|
||||
layout = QVBoxLayout(card)
|
||||
layout.setContentsMargins(14, 12, 14, 14)
|
||||
@@ -218,6 +218,8 @@ class App(QMainWindow):
|
||||
row = QHBoxLayout()
|
||||
row.addWidget(StrongBodyLabel(title, card))
|
||||
row.addStretch(1)
|
||||
if trailing is not None:
|
||||
row.addWidget(trailing)
|
||||
layout.addLayout(row)
|
||||
return card, layout
|
||||
|
||||
@@ -434,11 +436,8 @@ class App(QMainWindow):
|
||||
body.addLayout(params)
|
||||
layout.addWidget(card)
|
||||
|
||||
card, body = self._card("串口数据 · 收发日志(译码 + 原始 hex)", self)
|
||||
row = QHBoxLayout()
|
||||
row.addStretch(1)
|
||||
row.addWidget(self._button("清空", self._dlpc_clear))
|
||||
body.addLayout(row)
|
||||
card, body = self._card("串口数据 · 收发日志(译码 + 原始 hex)", self,
|
||||
trailing=self._button("清空", self._dlpc_clear))
|
||||
self.txt_dlpc = self._text()
|
||||
self.txt_dlpc.setMinimumHeight(230)
|
||||
body.addWidget(self.txt_dlpc)
|
||||
@@ -472,6 +471,14 @@ class App(QMainWindow):
|
||||
row.addStretch(1)
|
||||
row.addWidget(self._button("查电流", self._query_current))
|
||||
body.addLayout(row)
|
||||
# 快捷命令行: v0.4.0 重写时从旧版 app_gui.py 丢失, 开关光机等一发命令
|
||||
# 不应只能走预设下拉
|
||||
quick = QHBoxLayout()
|
||||
for name, cmd in (("开光机", "M730S0"), ("关光机", "M730S1"), ("查版本", "M999"),
|
||||
("软件重启", "M888"), ("开TEC", "M7S0"), ("关TEC", "M7S1"),
|
||||
("TEC33.0°C", "M8S330")):
|
||||
quick.addWidget(self._button(name, lambda checked=False, c=cmd: self._dlpc_send(c)))
|
||||
body.addLayout(quick)
|
||||
preset_row = QHBoxLayout()
|
||||
self._dlpc_presets = [(n, cmd) for n, cmd, _ in dlpc_rs485.PRESETS]
|
||||
self.cbo_dlpc_cmd = ComboBox(card)
|
||||
|
||||
Reference in New Issue
Block a user