From b47c79f67ec546d9bb43955e4b1c3d0ef0ee8a49 Mon Sep 17 00:00:00 2001 From: dazedcat19 <59296763+dazedcat19@users.noreply.github.com> Date: Fri, 28 Feb 2020 18:22:27 +0800 Subject: [PATCH] dialogyn, added label caption --- mangadownloader/forms/frmDialogYesNo.lfm | 22 +++++++++++++------ mangadownloader/forms/frmDialogYesNo.lrj | 3 ++- mangadownloader/forms/frmDialogYesNo.pas | 1 + .../forms/frmLuaModulesUpdater.pas | 10 +++++---- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/mangadownloader/forms/frmDialogYesNo.lfm b/mangadownloader/forms/frmDialogYesNo.lfm index 90ea83ae..48b0dd4f 100644 --- a/mangadownloader/forms/frmDialogYesNo.lfm +++ b/mangadownloader/forms/frmDialogYesNo.lfm @@ -11,9 +11,8 @@ object frmDialogYN: TfrmDialogYN ChildSizing.VerticalSpacing = 6 ClientHeight = 325 ClientWidth = 437 - Color = clWindow Position = poMainFormCenter - LCLVersion = '2.0.6.0' + LCLVersion = '2.1.0.0' object btYes: TButton AnchorSideRight.Control = btNo AnchorSideBottom.Control = btNo @@ -46,20 +45,29 @@ object frmDialogYN: TfrmDialogYN end object mMessages: TMemo AnchorSideLeft.Control = Owner - AnchorSideTop.Control = Owner + AnchorSideTop.Control = lbMessage + AnchorSideTop.Side = asrBottom AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = btNo Left = 6 - Height = 282 - Top = 6 + Height = 261 + Top = 27 Width = 425 Anchors = [akTop, akLeft, akRight, akBottom] - BorderStyle = bsNone - Color = clWindow ReadOnly = True ScrollBars = ssAutoBoth TabOrder = 2 WordWrap = False end + object lbMessage: TLabel + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Owner + Left = 6 + Height = 15 + Top = 6 + Width = 56 + Caption = 'lbMessage' + ParentColor = False + end end diff --git a/mangadownloader/forms/frmDialogYesNo.lrj b/mangadownloader/forms/frmDialogYesNo.lrj index 7ba8043b..5a5c075a 100644 --- a/mangadownloader/forms/frmDialogYesNo.lrj +++ b/mangadownloader/forms/frmDialogYesNo.lrj @@ -1,5 +1,6 @@ {"version":1,"strings":[ {"hash":78611287,"name":"tfrmdialogyn.caption","sourcebytes":[68,105,97,108,111,103],"value":"Dialog"}, {"hash":180163,"name":"tfrmdialogyn.btyes.caption","sourcebytes":[38,89,101,115],"value":"&Yes"}, -{"hash":11087,"name":"tfrmdialogyn.btno.caption","sourcebytes":[38,78,111],"value":"&No"} +{"hash":11087,"name":"tfrmdialogyn.btno.caption","sourcebytes":[38,78,111],"value":"&No"}, +{"hash":63628709,"name":"tfrmdialogyn.lbmessage.caption","sourcebytes":[108,98,77,101,115,115,97,103,101],"value":"lbMessage"} ]} diff --git a/mangadownloader/forms/frmDialogYesNo.pas b/mangadownloader/forms/frmDialogYesNo.pas index db2c506c..15569f2b 100644 --- a/mangadownloader/forms/frmDialogYesNo.pas +++ b/mangadownloader/forms/frmDialogYesNo.pas @@ -14,6 +14,7 @@ type TfrmDialogYN = class(TForm) btYes: TButton; btNo: TButton; + lbMessage: TLabel; mMessages: TMemo; private diff --git a/mangadownloader/forms/frmLuaModulesUpdater.pas b/mangadownloader/forms/frmLuaModulesUpdater.pas index aea29aa4..600a0e85 100644 --- a/mangadownloader/forms/frmLuaModulesUpdater.pas +++ b/mangadownloader/forms/frmLuaModulesUpdater.pas @@ -153,9 +153,9 @@ resourcestring RS_StartDownloading = 'Downloading...'; RS_FinishDownload = 'Finish download'; RS_NewUpdateFoundTitle = 'Modules update found!'; - RS_NewUpdateFoundLostChanges = 'Modules update found, any local changes will be lost, procced?'#13#10#13#10'%s'; + RS_NewUpdateFoundLostChanges = 'Modules update found, any local changes will be lost, procced?'; RS_ModulesUpdatedTitle = 'Modules updated!'; - RS_ModulesUpdatedRestart = 'Modules updated, restart now?'#13#10#13#10'%s'; + RS_ModulesUpdatedRestart = 'Modules updated, restart now?'; RS_StatusNew = '%s NEW*'; RS_StatusUpdate = '%s UPDATE*'; RS_StatusRedownloaded = '%s REDOWNLOAD*'; @@ -461,7 +461,8 @@ begin with TfrmDialogYN.Create(FOwner) do try Caption := RS_NewUpdateFoundTitle; - mMessages.Lines.Text := Format(RS_NewUpdateFoundLostChanges, [Trim(FStatusList.Text)]); + lbMessage.Caption := RS_NewUpdateFoundLostChanges; + mMessages.Lines.AddStrings(FStatusList); FProceed := ShowModal = mrYes; finally free; @@ -505,7 +506,8 @@ begin with TfrmDialogYN.Create(FOwner) do try Caption := RS_ModulesUpdatedTitle; - mMessages.Lines.Text := Format(RS_ModulesUpdatedRestart, [Trim(FStatusList.Text)]); + lbMessage.Caption := RS_ModulesUpdatedRestart; + mMessages.Lines.AddStrings(FStatusList); yesRestart := ShowModal = mrYes; finally free;