Pārlūkot izejas kodu

Fix DPI >= 150% issue.

Martijn Laan 1 gadu atpakaļ
vecāks
revīzija
7b848be8b1
2 mainītis faili ar 6 papildinājumiem un 2 dzēšanām
  1. 4 1
      Projects/Src/CompForm.pas
  2. 2 1
      Projects/Src/CompScintEdit.pas

+ 4 - 1
Projects/Src/CompForm.pas

@@ -3376,8 +3376,11 @@ begin
             NM(mmIconStep, 'symbol-arrow-right'),
             NM(mmIconBreakpointStep, 'debug-breakpoint-filled-ok2-symbol-arrow-right')];
 
-        for var NamedMarker in NamedMarkers do
+        for var NamedMarker in NamedMarkers do begin
+          if (NamedMarker.Key = mmIconBreakpointStep) and (ImageList.Width >= 18) then
+            Continue; { Has too many colors at 150% DPI or higher for current XPM usage }
           AddMarkerBitmap(MarkerBitmaps, DC, BitmapInfo, NamedMarker.Key, BkBrush, ImageList, NamedMarker.Value);
+        end;
 
         var Pixmap := TScintPixmap.Create;
         try

+ 2 - 1
Projects/Src/CompScintEdit.pas

@@ -153,7 +153,8 @@ begin
     -2.2.4: Update TCompForm.MemoUpdateUI to check the type of update sent by SCN_UPDATEUI
     -2.2.6: Replace: INDIC_ROUNDBOX -> INDIC_STRAIGHTBOX
     -2.2.8: Review using SCI_MARKERDEFINERGBAIMAGE instead of SCI_MARKERDEFINEPIXMAP,
-            but note INDIC_SQUIGGLEPIXMAP below
+            If succesful remove TCompileForm.UpdateMemoMarkerColumns' DPI limitation
+            for mmIconBreakpointStep
     -3.3.2: Review using INDIC_SQUIGGLEPIXMAP instead of INDIC_SQUIGGLE
     -3.4.2: Removes support for style byte indicators but ScintStylerInnoSetup uses those
     -3.4.4: Add: Call(SCI_AUTOSGETMULTI, SC_MULTIAUTOC_EACH, 0)