feat: added sound effects support to themes
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
@ -9,12 +9,13 @@
|
||||
- [Metadata](#metadata)
|
||||
- [Screenshots](#screenshots)
|
||||
- [Fonts and Icons](#fonts-and-icons)
|
||||
- [Sound Effects](#sound-effects)
|
||||
|
||||
---
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
Themes in `PortProtonQT` allow customizing the UI appearance. Themes are stored under:
|
||||
Themes in `PortProtonQT` allow customizing the UI appearance and sounds. Themes are stored under:
|
||||
|
||||
- `~/.local/share/PortProtonQT/themes`.
|
||||
|
||||
@ -34,6 +35,12 @@ Create a `styles.py` in the theme root. It should define variables or functions
|
||||
|
||||
**Example:**
|
||||
```python
|
||||
# Sound effects mapping
|
||||
SOUNDS = {
|
||||
"app_start": "app_start.wav", # Application startup
|
||||
"app_exit": "app_exit.wav", # Application exit
|
||||
}
|
||||
|
||||
def custom_button_style(color1, color2):
|
||||
return f"""
|
||||
QPushButton {{
|
||||
@ -69,3 +76,19 @@ Folder: `images/screenshots/` — place UI screenshots there.
|
||||
- Icons: `images/icons/*.svg/.png`
|
||||
|
||||
---
|
||||
|
||||
## 🔊 Sound Effects (optional)
|
||||
|
||||
Folder: `sounds/` — place interface sound effects here.
|
||||
|
||||
Supported formats:
|
||||
- `.wav` - Wave audio files
|
||||
|
||||
Available sound events:
|
||||
- Interface sounds:
|
||||
- `app_start.wav` - Application startup
|
||||
- `app_exit.wav` - Application exit
|
||||
|
||||
If a sound file is missing in a custom theme, the default sound from the standard theme will be used.
|
||||
|
||||
---
|
||||
|
Reference in New Issue
Block a user