fix: resolve official Overwatch 2 game logo icon for taskbar

This commit is contained in:
Sho 2026-08-02 14:35:55 +09:00
parent 4f634ab263
commit ae631a8e63
2 changed files with 16 additions and 3 deletions

View File

@ -376,8 +376,11 @@ Item {
return mapped.startsWith("file://") ? mapped : "file://" + mapped
}
// 2. Hardcoded fallback overrides for common system apps
// 2. Hardcoded fallback overrides for common system apps & games
let themeDir = Theme.iconTheme
if (clean.includes("overwatch") || clean.includes("2357570")) {
return "file:///usr/share/icons/" + themeDir + "/64x64/apps/overwatch.svg"
}
if (clean.includes("alacritty")) return "file:///usr/share/icons/" + themeDir + "/32x32/apps/Alacritty.svg"
if (clean.includes("dolphin")) return "file:///usr/share/icons/" + themeDir + "/32x32/apps/org.kde.dolphin.svg"
if (clean.includes("firefox")) return "file:///usr/share/icons/" + themeDir + "/32x32/apps/firefox.svg"
@ -390,12 +393,13 @@ Item {
// Helper: Formatted Program Name Cleaner
function getCleanProgramName(app) {
if (!app) return "Application";
if (app.name && app.name !== "" && app.name !== app.appId) return app.name;
if (app.name && app.name !== "" && app.name !== app.appId && app.name !== "Steam Game (2357570)") return app.name;
let id = app.appId || "";
if (!id) return "Application";
let raw = id.includes(".") ? id.split(".").pop() : id;
raw = raw.replace(/[-_]/g, " ");
let lower = raw.toLowerCase();
if (lower.includes("overwatch") || lower.includes("2357570")) return "Overwatch 2";
if (lower === "alacritty") return "Alacritty";
if (lower === "dolphin") return "Dolphin";
if (lower === "firefox") return "Firefox";

View File

@ -155,7 +155,16 @@ def resolve_game_info(app_lower):
if steam_id == '2357570':
if not game_name: game_name = "Overwatch 2"
if not game_icon or game_icon == "com.valvesoftware.Steam": game_icon = "overwatch"
ow_full = None
for d in _search_dirs:
if not os.path.exists(d): continue
for ext in ['.svg', '.png']:
t = os.path.join(d, "overwatch" + ext)
if os.path.exists(t): ow_full = t; break
t2 = os.path.join(d, "lutris_overwatch" + ext)
if os.path.exists(t2): ow_full = t2; break
if ow_full: break
game_icon = ow_full or "overwatch"
if not game_name:
game_name = f"Steam Game ({steam_id})"