Jump to content

PeterPanettone

Members
  • Content Count

    1354
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by PeterPanettone


  1. 31 minutes ago, dummzeuch said:

    Sorry, but I cannot accept this as a patch. This is not compatible to older Delphi versions.

    I clearly said this is for Delphi 12 Athens. Using just a few compiler conditional directives, you can restrict any code to specific newer Delphi versions, for example:

    {$IF CompilerVersion >= 36.1}
      // Code for Delphi 12.1 or later
      {$MESSAGE WARN 'Only for modern Delphi versions'}
    {$ELSE}
      // code for older Delphi versions
    {$IFEND}

     


  2. On my HighDPI monitor the CodeLibrarian Search dialog was still broken in r4431, so I fixed it:

     

    image.thumb.png.ad86cd5ee744561960125c698563ef71.png

     

    This should now work with all DPI settings on the end user side, as it now uses a Manifest in modern Delphi 12 Athens instead of a custom "InitDpiScaler":

    constructor TfmCodeSearch.Create(_Owner: TComponent);
    begin
      inherited;
      //InitDpiScaler; // now using Manifest in Delphi 12
    end;
    
    fmCodeSearch.Scaled := True; // Set in Object Inspector

    image.thumb.png.8db890799a82cc4e53eb1db7f917a08d.png

     

    I've also modernized the LAYOUT from StoneAge Layout (simply place components anywhere without layout considerations) to Modern Layout (use Align and AlignWithMargins properties).

     

    Here is the new source of the Search dialog:

     

    GX_CodeSrch.zip

     


  3. In r4431, the Rename Expert is now finally fixed:

     

    image.thumb.png.7f894834b7eb205ea6f09674f13f717e.png

     

    However, it would be LOGICAL to place the Buttons (OK, Cancel, Settings) at the BOTTOM: Clicking the OK button affects not only the newName setting but also the Align/Anchors and Margin settings.


  4. 20 minutes ago, dummzeuch said:

    It is yet another bloody per monitor scaling issue and depends on how the monitor(s) is/are configured:

    It does not occur if there is one monitor with scaling set to 100, even if another monitor is set to scaling > 100. It also does not occur over Remote Desktop (at least not in my tests).

    Since I have got a High DPI monitor and a HD monitor, it does not happen on my system. I had to turn off the HD monitor to reproduce the problem.

    Dear Thomas, you are completely right! But all these DPI problems can be OVERRIDDEN by using an optimal LAYOUT. The logical error is to focus only on one issue (the DPI settings) while ignoring the broader context of responsive design and layout adaptability.


  5. I use Delphi 12.2 in Windows 11 and have just now downloaded and compiled version r-4418:

     

    image.thumb.png.50fa6cc611a1c7b8baf0e331e099846a.png

     

    1. you should not trust the GExperts users to use the same DPI settings as you when they compile the GExperts source code.
    2. you should prioritize LAYOUT over blindly trusting that your DPI settings will work for the users when they compile the GExperts source code.

     

    Following rule #2, I have now moved the main dialog buttons down to the bottom into a separate panel, which creates a more logical layout:

     

    image.png.0b5a68c9f3c8677a0dd5a6f8a7a354c8.png

     

    In the next step, I will adjust the layout logic for multiple properties.


  6. 32 minutes ago, dummzeuch said:

    As far as I am aware this dialog should work with multiple additional properties.

    Dear Thomas! Can you please post a screenshot with multiple properties? Thank you! And a happy new year! 🎈🙋‍♂️


  7. image.thumb.png.4d230477f4b51ea245cbad5c385dcf3b.png

     

    I want to achieve this design time automation: Whenever a new object is created (either from the Palette or by pasting an object from the clipboard), the Quick Edit dialog for the new object is automatically shown. Is there a way to achieve this with GExperts?


  8. Better display of tabs in the SourceCode editor (OPTIONAL):


    1. Marking of the MainForm unit in bold font
    2. Marking files that do not belong to the current project in italics

     

    This would lead to more visual consistency and transparency in the presentation of the tabs in the SourceCode editor.

     

    What do you think?

     

    Thanks to everyone for taking part in this BRAIN TEST!


  9. Using KeyPreview, I have even tried the following trick:

    procedure TformTextEditor.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    begin
      if (Key = Ord('I')) and (Shift = [ssCtrl]) then
      begin
        CodeSite.Send('TformTextEditor.FormKeyDown: ');
        Key := 255;
      end
    end;

    And then in RichEditKeyDown:

      if (Key = 255) and (Shift = [ssCtrl]) then
      begin
        CodeSite.Send('RichEditKeyDown: ');    
        Key := 0;
        // does not prevent TAB output!
      end

     


  10. Even when KeyPreview = True, setting Key := 0; in FormKeyDown does not prevent this strange effect:

     

    procedure TformTextEditor.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    begin
      if (Key = Ord('I')) and (Shift = [ssCtrl]) then
      begin
        CodeSite.Send('TformTextEditor.FormKeyDown: ');
        Key := 0;
      end
    end;

     


  11. At run-time, select any text in a TRichEdit and press CTRL+IThe selected text will be replaced by a TAB "character," which has the same effect as pressing the TAB key.

     

    BTW, the same effect occurs in Notepad.

     

    Is there a way to prevent this?

     

    Delphi 12.2

    Windows 11 x64

×