diff src/sys/win32/dark_theme.cpp @ 66:6481c5aed3e1

posters: add poster widget... why does AniList call these cover images? they're posters...
author Paper <mrpapersonic@gmail.com>
date Mon, 02 Oct 2023 05:56:32 -0400
parents cde8f67a7c7d
children
line wrap: on
line diff
--- a/src/sys/win32/dark_theme.cpp	Sun Oct 01 23:26:35 2023 -0400
+++ b/src/sys/win32/dark_theme.cpp	Mon Oct 02 05:56:32 2023 -0400
@@ -7,13 +7,8 @@
 bool DarkThemeAvailable() {
 	// dark mode supported Windows 10 1809 10.0.17763 onward
 	// https://stackoverflow.com/questions/53501268/win10-dark-theme-how-to-use-in-winapi
-	if (QOperatingSystemVersion::current().majorVersion() == 10) {
-		return QOperatingSystemVersion::current().microVersion() >= 17763;
-	} else if (QOperatingSystemVersion::current().majorVersion() > 10) {
-		return true;
-	} else {
-		return false;
-	}
+	const auto& ver = QOperatingSystemVersion::current();
+	return (ver.majorVersion() > 10) ? true : (ver.majorVersion() == 10 && ver.microVersion() >= 17763);
 }
 
 bool IsInDarkTheme() {