Skip to content

Commit

Permalink
help and about windows will show where the main form is.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-audio91 committed Apr 4, 2019
1 parent edbdcb9 commit c5d1de4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fasubrip.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<MajorVersionNr Value="1"/>
<MinorVersionNr Value="2"/>
<RevisionNr Value="1"/>
<BuildNr Value="16"/>
<BuildNr Value="22"/>
<StringTable Comments="http://mohammadrezab.blogsky.com" CompanyName="MohammadReza Bahrami" FileDescription="FaSubrip: autodetects and converts encoding of farsi (persian) subrip files. with additional functionalities." InternalName="FaSubrip" LegalCopyright="MohammadReza Bahrami" OriginalFilename="fasubrip" ProductName="FaSubrip" ProductVersion="1.2.1.0"/>
</VersionInfo>
<BuildModes Count="6">
Expand Down
Binary file modified fasubrip.res
Binary file not shown.
4 changes: 3 additions & 1 deletion uabout.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ object FaSubripAbout: TFaSubripAbout
ClientHeight = 97
ClientWidth = 360
OnCreate = FormCreate
Position = poScreenCenter
OnShow = FormShow
Position = poMainFormCenter
LCLVersion = '2.1.0.0'
object Header: TPanel
Left = 0
Height = 96
Expand Down
11 changes: 11 additions & 0 deletions uabout.pas
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ TFaSubripAbout = class(TForm)
Logo: TImage;
LinksBox: TPanel;
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
private

public
Expand Down Expand Up @@ -106,6 +107,16 @@ procedure TFaSubripAbout.FormCreate(Sender: TObject);
end;
end;

procedure TFaSubripAbout.FormShow(Sender: TObject);
begin
if Top<0 then
Top := 0;
if Left<0 then
Left := 0;
if Left+Width > Screen.Width then
Left := Left - ((Left+Width)-Screen.Width);
end;


end.

2 changes: 1 addition & 1 deletion uhelp.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object FaSubripHelp: TFaSubripHelp
Constraints.MinHeight = 480
Constraints.MinWidth = 500
OnShow = FormShow
Position = poScreenCenter
Position = poMainFormCenter
LCLVersion = '2.1.0.0'
object Header: TPanel
Left = 0
Expand Down
6 changes: 6 additions & 0 deletions uhelp.pas
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ implementation

procedure TFaSubripHelp.FormShow(Sender: TObject);
begin
if Top<0 then
Top := 0;
if Left<0 then
Left := 0;
if Left+Width > Screen.Width then
Left := Left - ((Left+Width)-Screen.Width);
ContentsContainer.VertScrollBar.Position := 0;
if not HelpsAreSet then
FHelpsAreSet := True;
Expand Down

0 comments on commit c5d1de4

Please sign in to comment.