Jump to content

ULIK

Members
  • Content Count

    82
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by ULIK


  1. Curious, this problem is not restricted on Delphi 12 Athens, You can also see it on (at least) Delphi 11.3 Alexandria. It not necessary to install all that 3rd party libraries. Just DevExpress or ImageEN should be enough to see a relevant delay when opening standard actions. This makes me wonder why none of that vendors have already reported this to Embarcadero.  


  2. I played around with this expert and added two things:

    - display with gutter:

     

    instant_grep_gutter.thumb.png.79a9053987d2b4c33ea633d5d3929f77.png

     

    - two buttons to refresh or clear results: refresh can be used, when typing something on editor itself that modifies the result positions.

     

    If you like it, feel free to add it to repository. Please note: all modifications were only tested on Delphi XE11, but they should run on earlier versions too. As I'm not familiar with GX development: I have simply assigned two icons from GX Icon folder to speedbutton glyph, which probably is not the common way for GX. So you might change this to better fit the GX universe.

     

    Attached is a patch file with my changes:

    InstantGrepWithGutter.patch

    • Thanks 2

  3. Minor glitch: label l_PressEsc should set Layout to tlCenter to align it with checkbox (but I'm not sure, if this property is available back to Delphi 7).

     

    A suggestion for an interim solution for the missing 'Original Position':

    procedure PaintFileHeader(_Rect: TRect);
    ...
    LineText := Format(SLine, [Res.Idx + 1]);
        
    // Add additional text for original position, which is always the very first entry on listbox
    if _Index = 0 then
      LineText := LineText + ' (' + Module + ')';
    ...

    You might also use a different color for original position:

     

    procedure PaintLines(_Rect: TRect);
    ...
        if odSelected in _State then begin
          BGNormal := clHighLight;
          LbCanvas.Font.Color := clHighLightText;
          BGMatch := BGNormal;
        end else if _Index = 0 then begin  // as original position is not a real result, just let it gray
          BGNormal := clBtnFace;
          LbCanvas.Font.Color := clWindowText;
          BGMatch := BGNormal;
        end else begin
          BGNormal := clWindow;
          LbCanvas.Font.Color := clWindowText;
          BGMatch := RGB(250, 255, 230);
        end;

     

    IG_newmods.png.33f2536c22d87b895f632c5adbeada6f.png

     

    Just some ideas, but a gutter would be much better. Feel free to add what you like.

    • Thanks 1

  4. Next thing I noticed: I placed the window on a second monitor right beside the maximized IDE main window on first monitor. No problem. Now I closed Instant Grep and opened it again: the Window is placed on my first monitor instead of second one.

     

    And how do I clear a former hit list? Entering a blank search phrase does not clear it. Also closing and reopening does not clear it.

    • Thanks 1

  5. Doing a first short test: I was irritated as every hit is divided be the filename. As Instant Grep displays it's result only based on current editor file, why not just add the filename only to caption (see attached image)?

     

    instant_grep.thumb.png.1df98eb468e4c31fee5cdd1f29affa06.png

     

    Second: I compiled the current source, closed Delphi 11.3 and installed the new DLL. Now the first start showed that error:

     

    error_IG.thumb.png.652fe5a1f7362c8fca3cedd1c0a9ce73.png

     

    Following starts do not show it anymore. And why is the roaming profile? Shouldn't this be stored on LOCAL_APP_DATA?

     

    Third, if there is no hit I would not show the entry 'Original Position'. At first I wondered, if this was a wrong hit of grep search, because I see something on result list I do not expect. If you want to show the original position, make it more clearer that this is *not* a search result.

     

     

    kind regards,

    Ulrich

    • Thanks 1

  6. I finally found a solution for this problem: the PNG images I printed had no pHYs chunks set (as they were initially created during runtime). As soon as the missing chucks were added, printing from high DPI systems works fine. The point is: it doesn't matter what exact values you are using, it's just that those chunks had to be set to a somewhat reasonable value.

     

    function TPaImageStrokeHelper.FixPNGPixelInformation(APNGImage: TPngImage): Boolean;
    begin
      Result := False;
    
      if not Assigned(APNGImage) then exit;
    
      if not APNGImage.HasPixelInformation then
      begin
        APNGImage.PixelInformation.PPUnitX := 3780;  // relates to 96 DPI:   3780 Points / Meter
        APNGImage.PixelInformation.PPUnitY := 3780;
        APNGImage.PixelInformation.UnitType := utMeter;
        Result := True;
      end;
    end;

     

    • Like 2
  7. pdfDoc


    Hi,

     

    if you need to get a working solution, you have to use a third party solution for creating a PDF. Why not use SynPDF  as suggested? Easy to use, they offer sample code (read their start page til the end!) and there is even a forum where you can ask.


  8. D11.2, latest MMX Build 2540:

     

    I have a problem when closing a running app inside IDE: Editor layout switches back from debug desktop to standard desktop. and then an access violation occurs inside MMX code explorer (which is hidden on debug, but docked in standard desktop). The AV does not happened every time but frequently enough for a report 😉 . And I have seen this on several different projects over the last months.

     

    bug_MMX_IDE.thumb.png.dec45bb742057d41e93d2f23bc3fcc68.png

     

    Do you have an idea what could cause this? Attached is part of written full bug report.

     

     

    Thank you!

     

     

    bugreport_IDE_MMX.txt


  9. What do you mean by nope!? Definitely HitTest = False is the reason, why ObjectAtPoint  will not recognize the button. You had to step through all the inherited calls down to TControl. ObjectAtPoint. Here the line

    if PointInObject(LP.X, LP.Y) and CheckHitTest(HitTest) then

    is the critical part. The first condition is true if over a button, but the second one makes it always fail.

     

    Btw: you had to call ObjectAtPoint with Screen coordinates:

    LIControl := ObjectAtPoint(ClientToScreen(LPointF));

     


  10. Hi,

     

    Delphi XE11.1 on a current Windows 10 system: I have a bunch of problems when moving a maximized windows between monitors of different scales:

    - regular size changes

    - depending on border style setting, application behaves different

     

    Steps to reproduce:

    - compile attached application perMonitorV2 aware

    - set up multiple monitors:

      * M1 100% 2560x1440 (primary)

      * M2 200% 3840 x 2160

      * M1 left of M2

     

    1. problem:

    - run app on M1

    - maximize window

    - send it to second monitor using WIN + Shift + Arrow right

    - send it back to first monitor

    - change back maximized state

    --> size of regular window has changed

     

    2. problem

    - modify the app and remove comments to set the BorderStyles:

      if cbToggleFullscreen.Checked then
      begin
        BorderStyle := bsNone;
        WindowState := wsMaximized;
      end
      else
      begin
        WindowState := wsNormal;
        BorderStyle := bsSizeable;
      end;

    - again run on M1

    - click check box (to maximize and set the border style)

    - send it to second monitor using WIN + Shift + Arrow right

    --> this does not work the first time and you have to do it again to move the window to second screen! ????

    - send it to second monitor using WIN + Shift + Arrow right  (second time)

    --> now the app is on second screen but no longer maximized

     

    3. Problem (related to second)

    - start app from problem (2) say on M2

    Snag_578d93f.thumb.png.074bdf4a3a66b88771a89413802cb2fe.png

    - click check box to maximize and change the border style

    - change DPI scaling for M2

    - click check box again to get normal sized window: size has changed!

    Snag_578eb21.thumb.png.467c1ed0bf84802f118ac23c5b1b74fd.png

     

    Problem 3 seems to depend on BorderStyle change. If I test it with original app, the size persists.

    Can someone confirm that problems? And is there a solution for it, especially for the second/third?

     

    Thank you,

    Uli

     

    TestDPIFullscreen.zip

×