Explorar el Código

Fix DPI >= 150% issue.

Martijn Laan hace 1 año
padre
commit
7b848be8b1
Se han modificado 2 ficheros con 6 adiciones y 2 borrados
  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(mmIconStep, 'symbol-arrow-right'),
             NM(mmIconBreakpointStep, 'debug-breakpoint-filled-ok2-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);
           AddMarkerBitmap(MarkerBitmaps, DC, BitmapInfo, NamedMarker.Key, BkBrush, ImageList, NamedMarker.Value);
+        end;
 
 
         var Pixmap := TScintPixmap.Create;
         var Pixmap := TScintPixmap.Create;
         try
         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.4: Update TCompForm.MemoUpdateUI to check the type of update sent by SCN_UPDATEUI
     -2.2.6: Replace: INDIC_ROUNDBOX -> INDIC_STRAIGHTBOX
     -2.2.6: Replace: INDIC_ROUNDBOX -> INDIC_STRAIGHTBOX
     -2.2.8: Review using SCI_MARKERDEFINERGBAIMAGE instead of SCI_MARKERDEFINEPIXMAP,
     -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.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.2: Removes support for style byte indicators but ScintStylerInnoSetup uses those
     -3.4.4: Add: Call(SCI_AUTOSGETMULTI, SC_MULTIAUTOC_EACH, 0)
     -3.4.4: Add: Call(SCI_AUTOSGETMULTI, SC_MULTIAUTOC_EACH, 0)