From a0eb46e1e895765aa9aff4048afff81557424615 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Tue, 17 Jan 2023 00:16:25 -0500 Subject: [PATCH] Update translations and changelog for 5.2.0 --- CHANGELOG.md | 8 ++++++++ scripts/i18n_download.py | 11 +++++++---- src/AcrylicUI.cs | 11 ++++++----- src/WinDynamicDesktop.csproj | 2 +- src/locale/el.mo | Bin 8806 -> 8643 bytes uwp/Package.appxmanifest | 2 +- 6 files changed, 23 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b06c68ad..c8a2322f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## `5.2.0` + +* Added dark UI theme using Mica (only for Windows 11 22H2) +* Added Burmese translation (thanks Febri) +* Fixed user-defined sunrise and sunset times being stored incorrectly for some locales ([#487](https://github.com/t1m0thyj/WinDynamicDesktop/issues/487)) +* Fixed IndexOutOfRangeException that could occur when Select Theme dialog is opened and there are multiple monitors ([#498](https://github.com/t1m0thyj/WinDynamicDesktop/issues/498)) +* Fixed error when PowerShell scripts run with blank imagePath parameter because there is no active theme + ## `5.1.0` **Note:** This version removes syncing wallpaper across virtual desktops in Windows 11 which used an experimental API that is too unstable to support. If you still want this functionality, install the [Sync Virtual Desktops](https://github.com/t1m0thyj/WDD-scripts/tree/master/experimental#synchronize-virtual-desktops) script. diff --git a/scripts/i18n_download.py b/scripts/i18n_download.py index fdc93190..7ec5bbce 100644 --- a/scripts/i18n_download.py +++ b/scripts/i18n_download.py @@ -20,8 +20,11 @@ projects = client.list_projects() project_id = [proj for proj in projects if proj["name"] == "WinDynamicDesktop"][0]["id"] languages = client.list_project_languages(project_id) -language_codes = [lang["code"] for lang in languages if lang["percentage"] >= 50] -for lc in language_codes: - print(f"Downloading translation for {lc}") - client.export(project_id, lc, file_type, local_file=f"{output_dir}/{lc}.{file_type}") +for lang in languages: + language_code = lang["code"] + output_file = f"{output_dir}/{language_code}.{file_type}" + if lang["percentage"] < 50 and not os.path.isfile(output_file): + continue + print(f"Downloading translation for {language_code}") + client.export(project_id, language_code, file_type, local_file=output_file) diff --git a/src/AcrylicUI.cs b/src/AcrylicUI.cs index 8d781c70..ab7ff729 100644 --- a/src/AcrylicUI.cs +++ b/src/AcrylicUI.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; +using WinDynamicDesktop.COM; namespace WinDynamicDesktop { @@ -24,13 +25,13 @@ public static void ThemeForm(Form form, bool onInit = true) return; } - COM.WinBlur.BlurType blurType = IsDark ? COM.WinBlur.BlurType.Mica : COM.WinBlur.BlurType.None; - COM.WinBlur.SetBlurStyle(form, blurType, COM.WinBlur.Mode.DarkMode); + WinBlur.BlurType blurType = IsDark ? WinBlur.BlurType.Mica : WinBlur.BlurType.None; + WinBlur.SetBlurStyle(form, blurType, WinBlur.Mode.DarkMode); form.ForeColor = IsDark ? Color.White : Control.DefaultForeColor; foreach (Control childControl in GetControls(form)) { - COM.WinBlur.SetBlurStyle(childControl, blurType, COM.WinBlur.Mode.DarkMode); + WinBlur.SetBlurStyle(childControl, blurType, WinBlur.Mode.DarkMode); childControl.ForeColor = IsDark ? Color.White : Control.DefaultForeColor; if (childControl is LinkLabel) @@ -42,7 +43,7 @@ public static void ThemeForm(Form form, bool onInit = true) { childControl.Paint += (object sender, PaintEventArgs e) => { - if (!childControl.Enabled) + if (IsDark && !childControl.Enabled) { TextRenderer.DrawText(e.Graphics, childControl.Text, childControl.Font, childControl.ClientRectangle, Color.Gray); @@ -79,7 +80,7 @@ internal static IEnumerable GetControls(Control form) private static bool IsSupported { - get { return Environment.OSVersion.Version.Major >= 10 && Environment.OSVersion.Version.Build >= 22000; } + get { return Environment.OSVersion.Version.Major >= 10 && Environment.OSVersion.Version.Build >= 22523; } } } } diff --git a/src/WinDynamicDesktop.csproj b/src/WinDynamicDesktop.csproj index 4d3aed0d..f99a9119 100644 --- a/src/WinDynamicDesktop.csproj +++ b/src/WinDynamicDesktop.csproj @@ -9,7 +9,7 @@ WinDynamicDesktop WinDynamicDesktop Copyright © 2023 Timothy Johnson - 5.1.0 + 5.2.0 resources\WinDynamicDesktop.ico true true diff --git a/src/locale/el.mo b/src/locale/el.mo index 7af1751027f5cfd2e1ec3fb2cec505fe53f31195..72054dee4f57d9efa56e74206ca713ad803cad09 100644 GIT binary patch delta 1043 zcmYMyO>9h27{>9Zb!R#hb+4(>qF<8fq(z1nAwkD9I@q`tEej>hG^wu?X(QFeY=l&Z zL@HuLEGp?j2pN$kU9ylcgar!;>7uov7Q{kA{NMB@oydC%8O`}1_}v*+9t zza2cQd7M&r3ke?6v1;Ikn9f*Imz+>9F-tRAzt0x#imyo;;w3D%Kc zMJhJ%EH<3(}=F zjF4X$D&&?QbR5D(#K&+DPvQZb!gsi7p>zcuUb6SDQ`k}Du@fKQTP!V?ZsB{}izmq5 zgHLfM##m)8O{J5{IOZ{myO&DqunQA-5!c{DY{FMKi@$LrPP06lK#Zar6UZEN8Lj;W z#bF#n)}X&Zd)T$}ry=Ifb!^2(;xswuL`&2<@T_zy)l_A7~f3m3_By z&f$8@qwT;;w3U0T(nmka{@aSiXlTYaXfywVmMBy?ch(+Se z*iN+s`dCHWkJUJW%t7~&6q?8dFBGw+MEZ)Obc9zjDdIaA!Cib!moi-4Ry>L`IEt_7 zALb?|FvBda(teh0{fPf?7(diWXYgP>MLgBhKRBRxy05noaT-brU7?}!!WK8_{s+yQ BXR!bP delta 1165 zcmYMzTS!zv7{KvaFKJ%VwKXkuJ??{=8fYcaMZ*-k5=kON7uxJZvDR9xiAXHbS`Z?X zZasw15~LeOY};aVlQ4QHnL{rLKKM`}l_W^^R?z=LAvrt0`DV_U@60#H@%ott|8!PD zQ1MsGFP~ppoJ30fiU031x_^nYFd<>l9Lyvx!yMd-op=xn@dGB}ELP$?$~rCvD{w7x z`Be*TF#|_Xa$ZHb@j6PvK1{|C%EAxPh3}C|{iG?yUrTX55APy&VKsWN2t&9E$8jZ2 zVIKL_936v!l%&Ol%dv!bKc?d)lm`PS3GX7CQ6ZFKJwT~k7`Na%loz(q)L{xr!hM*5 z$1x4tF^T-@G950}L&LkMKAFHErr;oU;4mIQ=W?Y!q8D#q9XH8+6Et!plh}ga(8BGh zO5MQ>vhKzqJc0A*mve7soAua_LpX^J^siVvs{t$}euD-01IsX(?abi@tU?#rQp(%d zh4;~i1=PC%Z($8iqO6n6uGV1Ms?DG0=nyC_8J+R;nD&qwHW1CDAa-na7sq zpW#vBuSikU4n7pwX%jke6s2OHmR!Kq#992yticLD9r-wRBDvLJlpEU7Y2$oxfH<7X z?ucudOvcYV&01TYZ6GQ8(nO~Y+;nx-e3o7kP29@H=NBOTSR zt$>d8PZv5j8#-e3SOKe7zoZw?5rfWSu&(Jb>xv#R7#!8F3?0)?^iw^?^aw_xH#67U F{{bLPu4DiJ diff --git a/uwp/Package.appxmanifest b/uwp/Package.appxmanifest index 55a68fdd..d24320dc 100644 --- a/uwp/Package.appxmanifest +++ b/uwp/Package.appxmanifest @@ -1,6 +1,6 @@  - + WinDynamicDesktop Timothy Johnson