Skip to content

Commit

Permalink
💄 icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Littlefean committed Sep 18, 2024
1 parent 6b0dc64 commit 4c72bed
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
.venv/
output/
output/

assets/assets.py

__pycache__/
*.pyc
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,21 @@

## 使用方法

需要自行安装ffmpeg并配置环境变量
需要自行安装ffmpeg并配置环境变量

## 开发相关:

此项目为LiRen团队开源项目,贡献代码前建议阅读开发规范文档中的python内容:https://liren.zty012.de/

更新 assets 资源文件指令

```commandline
pyrcc5 -o assets/assets.py assets/image.qrc
```

打包指令

```commandline
windows:
pyinstaller --onefile --windowed --icon=./assets/favicon.ico main.py -n timelapse-recorder
```
Binary file added assets/favicon.ico
Binary file not shown.
5 changes: 5 additions & 0 deletions assets/image.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<RCC>
<qresource>
<file>favicon.ico</file>
</qresource>
</RCC>
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
QLabel,
QComboBox,
)
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import QTimer

from assets import assets # noqa: F401


class ScreenshotApp(QWidget):
def __init__(self):
Expand All @@ -36,6 +39,7 @@ def __init__(self):

def init_ui(self):
self.setWindowTitle("延时录屏")
self.setWindowIcon(QIcon(":/favicon.ico"))
# 设置最小宽度大小
self.setMinimumWidth(500)
layout = QVBoxLayout()
Expand Down

0 comments on commit 4c72bed

Please sign in to comment.