调整界面布局和样式

This commit is contained in:
halliday2023 2024-02-14 21:33:54 +08:00
parent 04867c9467
commit d9749e42ee
3 changed files with 645 additions and 533 deletions

View File

@ -9,15 +9,19 @@ from PySide6.QtGui import QIcon
from pathlib import Path
path = Path(__file__)
ui_file_patch = path.parent.parent / "images" / "bjx.png"
ico_file_patch = path.parent.parent / "images" / "bjx.png"
css_file_patch = path.parent.parent / "ui" / "style.qss"
if __name__ == '__main__':
app = QApplication([])
app.setStyle("Fusion")
app.setWindowIcon(QIcon(str(ui_file_patch)))
app.setWindowIcon(QIcon(str(ico_file_patch)))
# 样式
# print(QtWidgets.QStyleFactory.keys())
# print(app.style().name())
with open(css_file_patch,"r") as cssfile:
_style = cssfile.read()
app.setStyleSheet(_style)
win = Window()
win.ui.show()
sys.exit(app.exec())

30
ui/style.qss Normal file
View File

@ -0,0 +1,30 @@
*{
font-family: 宋体;
font-size: 15px;
}
#Log_Output{
margin: 10px 5px 5px 2px;
}
#groupBox{
margin: 5px 5px 5px 2px;
}
#filename_label{
margin: 5px 5px 10px 1px;
}
#output_label{
margin: 5px 5px 15px 2px;
}
#fileinit_label{
margin: 5px 5px 15px 2px;
}
#fileOutputText{
margin: 5px 5px 10px 2px;
}
#fileInitRowsText{
margin: 5px 5px 10px 2px;
}
#fileNameText{
margin: 5px 5px 5px 2px;
}

File diff suppressed because it is too large Load Diff