Add application icon and desktop entry

- SVG and PNG icon (256x256)
- Desktop entry for application menu
- Window icon set in main.py

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Eduard Wisch 2026-02-02 13:29:08 +01:00
parent 58a31ea901
commit 9295fe9a6c
4 changed files with 58 additions and 0 deletions

9
filebrowser.desktop Normal file
View file

@ -0,0 +1,9 @@
[Desktop Entry]
Name=FileBrowser
Comment=Dateimanager mit Vorschau-Funktion
Exec=python3 /mnt/17 - Entwicklungen/20 - Projekte/FileBrowser/main.py
Icon=/mnt/17 - Entwicklungen/20 - Projekte/FileBrowser/resources/icon.png
Terminal=false
Type=Application
Categories=Utility;FileManager;
StartupNotify=true

View file

@ -2,8 +2,10 @@
"""FileBrowser - Ein Dateimanager mit Vorschau-Funktion in PyQt6.""" """FileBrowser - Ein Dateimanager mit Vorschau-Funktion in PyQt6."""
import sys import sys
import os
from PyQt6.QtWidgets import QApplication from PyQt6.QtWidgets import QApplication
from PyQt6.QtCore import Qt from PyQt6.QtCore import Qt
from PyQt6.QtGui import QIcon
from src.main_window import MainWindow from src.main_window import MainWindow
@ -18,6 +20,12 @@ def main():
app.setApplicationName("FileBrowser") app.setApplicationName("FileBrowser")
app.setOrganizationName("FileBrowser") app.setOrganizationName("FileBrowser")
# Icon setzen
script_dir = os.path.dirname(os.path.abspath(__file__))
icon_path = os.path.join(script_dir, 'resources', 'icon.png')
if os.path.exists(icon_path):
app.setWindowIcon(QIcon(icon_path))
# Hauptfenster erstellen und anzeigen # Hauptfenster erstellen und anzeigen
window = MainWindow() window = MainWindow()
window.show() window.show()

BIN
resources/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

41
resources/icon.svg Normal file
View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="256" height="256" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="folderGrad" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color:#60a5fa;stop-opacity:1" />
<stop offset="100%" style="stop-color:#3b82f6;stop-opacity:1" />
</linearGradient>
<linearGradient id="previewGrad" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color:#f1f5f9;stop-opacity:1" />
<stop offset="100%" style="stop-color:#e2e8f0;stop-opacity:1" />
</linearGradient>
</defs>
<!-- Hintergrund -->
<rect x="16" y="16" width="224" height="224" rx="24" fill="#1e293b"/>
<!-- Ordner -->
<path d="M40 70 L40 190 Q40 200 50 200 L150 200 Q160 200 160 190 L160 90 Q160 80 150 80 L100 80 L90 65 Q85 60 80 60 L50 60 Q40 60 40 70 Z" fill="url(#folderGrad)"/>
<!-- Ordner Tab -->
<path d="M40 70 L40 75 Q40 65 50 65 L78 65 L88 78 L100 78 L90 65 Q85 60 80 60 L50 60 Q40 60 40 70 Z" fill="#93c5fd"/>
<!-- Preview Panel -->
<rect x="170" y="60" width="70" height="140" rx="8" fill="url(#previewGrad)"/>
<!-- Preview Linien (Text) -->
<rect x="180" y="80" width="50" height="6" rx="3" fill="#94a3b8"/>
<rect x="180" y="95" width="40" height="6" rx="3" fill="#94a3b8"/>
<rect x="180" y="110" width="45" height="6" rx="3" fill="#94a3b8"/>
<!-- Preview Bild Placeholder -->
<rect x="180" y="130" width="50" height="35" rx="4" fill="#3b82f6" opacity="0.3"/>
<circle cx="190" cy="145" r="6" fill="#3b82f6" opacity="0.5"/>
<path d="M180 160 L195 150 L205 158 L215 148 L230 165 L180 165 Z" fill="#3b82f6" opacity="0.5"/>
<!-- Dateien im Ordner -->
<rect x="55" y="100" width="90" height="12" rx="3" fill="#ffffff" opacity="0.9"/>
<rect x="55" y="120" width="90" height="12" rx="3" fill="#ffffff" opacity="0.7"/>
<rect x="55" y="140" width="90" height="12" rx="3" fill="#ffffff" opacity="0.5"/>
<rect x="55" y="160" width="90" height="12" rx="3" fill="#ffffff" opacity="0.3"/>
</svg>

After

Width:  |  Height:  |  Size: 2 KiB