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.
This commit is contained in:
rc-swag 2025-01-07 12:18:31 +10:00
parent 436a47351c
commit 2e1acd478a
3 changed files with 43 additions and 2 deletions

View file

@ -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.

View file

@ -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 {

View file

@ -394,7 +394,7 @@
<div class="list_languages">
<div class="popup_header"><xsl:value-of select="$locale/string[@name='S_Languages_Addremove']"/></div>
<div>
<div class="keyboard_language_list">
<xsl:apply-templates select="KeymanKeyboardLanguagesInstalled/KeymanKeyboardLanguageInstalled[isinstalled]">
<xsl:with-param name="modify">1</xsl:with-param>
</xsl:apply-templates>