From 2e1acd478aaa68bcf86437101a8c67ce82176b93 Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:18:31 +1000 Subject: [PATCH] fix(windows): add flex-grow to control div It turns out flex-grow was the better way to insure the buttons are placed at the correct spot on the pop-up. --- .../Keyman.System.InstallKeyboards.pas | 34 +++++++++++++++++++ windows/src/desktop/kmshell/xml/config.css | 9 ++++- .../kmshell/xml/keyman_keyboardlist.xsl | 2 +- 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 windows/src/desktop/kmshell/install/Keyman.System.InstallKeyboards.pas diff --git a/windows/src/desktop/kmshell/install/Keyman.System.InstallKeyboards.pas b/windows/src/desktop/kmshell/install/Keyman.System.InstallKeyboards.pas new file mode 100644 index 0000000000..bc7306f9ea --- /dev/null +++ b/windows/src/desktop/kmshell/install/Keyman.System.InstallKeyboards.pas @@ -0,0 +1,34 @@ +unit Keyman.System.InstallKeyboards; + +interface + +implementation + +uses + System.WideStrUtils, + Vcl.Dialogs, + Winapi.ShellApi, + Winapi.Windows, + Winapi.WinINet, + + GlobalProxySettings, + KLog, + keymanapi_TLB; + + + function TOnlineUpdateCheck.DoInstallPackage(Package: TOnlineUpdateCheckParamsPackage): Boolean; +var + FPackage: IKeymanPackageFile2; +begin + Result := True; + + FPackage := kmcom.Packages.GetPackageFromFile(Package.SavePath) as IKeymanPackageFile2; + FPackage.Install2(True); // Force overwrites existing package and leaves most settings for it intact + FPackage := nil; + + kmcom.Refresh; + kmcom.Apply; + System.SysUtils.DeleteFile(Package.SavePath); +end; + +end. diff --git a/windows/src/desktop/kmshell/xml/config.css b/windows/src/desktop/kmshell/xml/config.css index 84096c0d30..ac9ddcee0c 100644 --- a/windows/src/desktop/kmshell/xml/config.css +++ b/windows/src/desktop/kmshell/xml/config.css @@ -614,6 +614,7 @@ table tr { display: flex; flex-direction: column; + height: 200px; gap: 4px; } .list_languages_title @@ -622,6 +623,11 @@ table tr } /* keyboard languages */ +.keyboard_language_list +{ + flex-grow:1 +} + .keyboard_language { display: flex; @@ -1199,7 +1205,8 @@ th } .list_languages_add { - padding: 110px 0px 0px 180px; + padding-bottom: 10px; + align-self: flex-end; } .modify .keyboard_language { diff --git a/windows/src/desktop/kmshell/xml/keyman_keyboardlist.xsl b/windows/src/desktop/kmshell/xml/keyman_keyboardlist.xsl index f61c1b3f7f..5f15a88d0a 100644 --- a/windows/src/desktop/kmshell/xml/keyman_keyboardlist.xsl +++ b/windows/src/desktop/kmshell/xml/keyman_keyboardlist.xsl @@ -394,7 +394,7 @@
-
+
1