|
@@ -254,6 +254,7 @@ type
|
|
UpdatePanel: TPanel;
|
|
UpdatePanel: TPanel;
|
|
UpdateLinkLabel: TLinkLabel;
|
|
UpdateLinkLabel: TLinkLabel;
|
|
UpdatePanelClosePaintBox: TPaintBox;
|
|
UpdatePanelClosePaintBox: TPaintBox;
|
|
|
|
+ UpdatePanelDonateImage: TImage;
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
procedure FExitClick(Sender: TObject);
|
|
procedure FExitClick(Sender: TObject);
|
|
procedure FOpenMainFileClick(Sender: TObject);
|
|
procedure FOpenMainFileClick(Sender: TObject);
|
|
@@ -380,6 +381,7 @@ type
|
|
LinkType: TSysLinkType);
|
|
LinkType: TSysLinkType);
|
|
procedure UpdatePanelClosePaintBoxPaint(Sender: TObject);
|
|
procedure UpdatePanelClosePaintBoxPaint(Sender: TObject);
|
|
procedure UpdatePanelClosePaintBoxClick(Sender: TObject);
|
|
procedure UpdatePanelClosePaintBoxClick(Sender: TObject);
|
|
|
|
+ procedure UpdatePanelDonateImageClick(Sender: TObject);
|
|
private
|
|
private
|
|
{ Private declarations }
|
|
{ Private declarations }
|
|
FMemos: TList<TIDEScintEdit>; { FMemos[0] is the main memo and FMemos[1] the preprocessor output memo - also see MemosTabSet comment above }
|
|
FMemos: TList<TIDEScintEdit>; { FMemos[0] is the main memo and FMemos[1] the preprocessor output memo - also see MemosTabSet comment above }
|
|
@@ -591,6 +593,7 @@ type
|
|
procedure UpdateEditModePanel;
|
|
procedure UpdateEditModePanel;
|
|
procedure UpdatePreprocMemos;
|
|
procedure UpdatePreprocMemos;
|
|
procedure UpdateLineMarkers(const AMemo: TIDEScintFileEdit; const Line: Integer);
|
|
procedure UpdateLineMarkers(const AMemo: TIDEScintFileEdit; const Line: Integer);
|
|
|
|
+ procedure UpdateImages;
|
|
procedure UpdateMarginsAndAutoCompleteIcons;
|
|
procedure UpdateMarginsAndAutoCompleteIcons;
|
|
procedure UpdateMarginsAndSquigglyAndCaretWidths;
|
|
procedure UpdateMarginsAndSquigglyAndCaretWidths;
|
|
procedure UpdateMemosTabSetVisibility;
|
|
procedure UpdateMemosTabSetVisibility;
|
|
@@ -937,6 +940,9 @@ begin
|
|
ToolBarPanel.ParentBackground := False;
|
|
ToolBarPanel.ParentBackground := False;
|
|
UpdatePanel.ParentBackground := False;
|
|
UpdatePanel.ParentBackground := False;
|
|
UpdatePanel.Color := $add6ad; //MGreen, 6 tints lightened using color-hex.com - also OK for dark mode
|
|
UpdatePanel.Color := $add6ad; //MGreen, 6 tints lightened using color-hex.com - also OK for dark mode
|
|
|
|
+ UpdatePanelDonateImage.Hint := RemoveAccelChar(HDonate.Caption);
|
|
|
|
+
|
|
|
|
+ UpdateImages;
|
|
|
|
|
|
FMemos := TList<TIDEScintEdit>.Create;
|
|
FMemos := TList<TIDEScintEdit>.Create;
|
|
FMainMemo := InitializeMainMemo(TIDEScintFileEdit.Create(Self), PopupMenu);
|
|
FMainMemo := InitializeMainMemo(TIDEScintFileEdit.Create(Self), PopupMenu);
|
|
@@ -1110,8 +1116,9 @@ end;
|
|
procedure TMainForm.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI,
|
|
procedure TMainForm.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI,
|
|
NewDPI: Integer);
|
|
NewDPI: Integer);
|
|
begin
|
|
begin
|
|
- UpdateMarginsAndSquigglyAndCaretWidths;
|
|
|
|
|
|
+ UpdateImages;
|
|
UpdateMarginsAndAutoCompleteIcons;
|
|
UpdateMarginsAndAutoCompleteIcons;
|
|
|
|
+ UpdateMarginsAndSquigglyAndCaretWidths;
|
|
UpdateOutputTabSetListsItemHeightAndDebugTimeWidth;
|
|
UpdateOutputTabSetListsItemHeightAndDebugTimeWidth;
|
|
UpdateStatusPanelHeight(StatusPanel.Height);
|
|
UpdateStatusPanelHeight(StatusPanel.Height);
|
|
end;
|
|
end;
|
|
@@ -3864,6 +3871,16 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TMainForm.UpdateImages;
|
|
|
|
+{ Should be called at startup and after DPI changes }
|
|
|
|
+begin
|
|
|
|
+ var WH := MulDiv(16, CurrentPPI, 96);
|
|
|
|
+ var Images := ImagesModule.LightToolBarImageCollection;
|
|
|
|
+
|
|
|
|
+ var Image := Images.GetSourceImage(Images.GetIndexByName('heart-filled'), WH, WH);
|
|
|
|
+ UpdatePanelDonateImage.Picture.Graphic:= Image;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TMainForm.UpdateOutputTabSetListsItemHeightAndDebugTimeWidth;
|
|
procedure TMainForm.UpdateOutputTabSetListsItemHeightAndDebugTimeWidth;
|
|
{ Should be called at startup and after DPI changes }
|
|
{ Should be called at startup and after DPI changes }
|
|
begin
|
|
begin
|
|
@@ -7498,6 +7515,11 @@ begin
|
|
UpdateBevel1Visibility;
|
|
UpdateBevel1Visibility;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TMainForm.UpdatePanelDonateImageClick(Sender: TObject);
|
|
|
|
+begin
|
|
|
|
+ HDonate.Click;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TMainForm.UpdatePanelClosePaintBoxPaint(Sender: TObject);
|
|
procedure TMainForm.UpdatePanelClosePaintBoxPaint(Sender: TObject);
|
|
const
|
|
const
|
|
MENU_SYSTEMCLOSE = 17;
|
|
MENU_SYSTEMCLOSE = 17;
|
|
@@ -7508,10 +7530,9 @@ begin
|
|
if FMenuThemeData <> 0 then begin
|
|
if FMenuThemeData <> 0 then begin
|
|
var Offset := MulDiv(1, CurrentPPI, 96);
|
|
var Offset := MulDiv(1, CurrentPPI, 96);
|
|
Inc(R.Left, Offset);
|
|
Inc(R.Left, Offset);
|
|
- Inc(R.Top, Offset);
|
|
|
|
DrawThemeBackground(FMenuThemeData, Canvas.Handle, MENU_SYSTEMCLOSE, MSYSC_NORMAL, R, nil);
|
|
DrawThemeBackground(FMenuThemeData, Canvas.Handle, MENU_SYSTEMCLOSE, MSYSC_NORMAL, R, nil);
|
|
end else begin
|
|
end else begin
|
|
- InflateRect(R, -MulDiv(3, CurrentPPI, 96), -MulDiv(6, CurrentPPI, 96));
|
|
|
|
|
|
+ InflateRect(R, -MulDiv(6, CurrentPPI, 96), -MulDiv(6, CurrentPPI, 96));
|
|
Canvas.Pen.Color := Canvas.Font.Color;
|
|
Canvas.Pen.Color := Canvas.Font.Color;
|
|
Canvas.MoveTo(R.Left, R.Top);
|
|
Canvas.MoveTo(R.Left, R.Top);
|
|
Canvas.LineTo(R.Right, R.Bottom);
|
|
Canvas.LineTo(R.Right, R.Bottom);
|