diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/fpg_base.pas | 2 | ||||
-rw-r--r-- | src/corelib/gdi/fpg_gdi.pas | 12 | ||||
-rw-r--r-- | src/gui/fpg_panel.pas | 5 | ||||
-rw-r--r-- | src/gui/fpg_scrollbar.pas | 11 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas index eee90d4a..6fcb95e4 100644 --- a/src/corelib/fpg_base.pas +++ b/src/corelib/fpg_base.pas @@ -2246,7 +2246,7 @@ begin FMasked := False; FWidth := 0; FHeight := 0; -// DoFreeImage; + DoFreeImage; end; procedure TfpgImageBase.AllocateImage(acolordepth, awidth, aheight: integer); diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas index 93d3a9ed..f1372928 100644 --- a/src/corelib/gdi/fpg_gdi.pas +++ b/src/corelib/gdi/fpg_gdi.pas @@ -2255,8 +2255,10 @@ var c: longword; begin c := Windows.GetPixel(FWinGC, X, Y); + {$IFDEF DEBUG} if c = CLR_INVALID then - Writeln('fpGFX/GDI: TfpgGDICanvas.GetPixel returned an invalid color'); + SendDebug('fpGFX/GDI: TfpgGDICanvas.GetPixel returned an invalid color'); + {$ENDIF} Result := WinColorTofpgColor(c); end; @@ -2972,7 +2974,7 @@ end; destructor TfpgGDIDrag.Destroy; begin {$IFDEF DND_DEBUG} - writeln('TfpgGDIDrag.Destroy '); + SendDebug('TfpgGDIDrag.Destroy '); {$ENDIF} inherited Destroy; end; @@ -2994,14 +2996,14 @@ begin if FDragging then begin {$IFDEF DND_DEBUG} - writeln('TfpgGDIDrag.Execute (already dragging)'); + SendDebug('TfpgGDIDrag.Execute (already dragging)'); {$ENDIF} Result := daIgnore; end else begin {$IFDEF DND_DEBUG} - writeln('TfpgGDIDrag.Execute (new drag)'); + SendDebug('TfpgGDIDrag.Execute (new drag)'); {$ENDIF} FDragging := True; wapplication.Drag := self; @@ -3016,7 +3018,7 @@ begin {$Note OLE DND: We are only handling strings at the moment, this needs to be extended to other types too } itm := FMimeData[i]; {$IFDEF DND_DEBUG} - writeln(' Processing mime-type: ', itm.Format); + SendDebug(' Processing mime-type: ', itm.Format); {$ENDIF} { description of data we are sending } diff --git a/src/gui/fpg_panel.pas b/src/gui/fpg_panel.pas index 2054959d..aedb7ace 100644 --- a/src/gui/fpg_panel.pas +++ b/src/gui/fpg_panel.pas @@ -308,8 +308,8 @@ type constructor Create(AOwner: TComponent); override; destructor Destroy; override; property Image: TfpgImage read FImage write SetImage; - property OwnsImage: Boolean read FOwnsImage write FOwnsImage; - property ScaleImage: Boolean read FScaleImage write SetScaleImage; + property OwnsImage: Boolean read FOwnsImage write FOwnsImage default False; + property ScaleImage: Boolean read FScaleImage write SetScaleImage default False; end; @@ -1110,6 +1110,7 @@ begin inherited Create(AOwner); FImage := nil; FOwnsImage := False; + FScaleImage := False; end; destructor TfpgImagePanel.Destroy; diff --git a/src/gui/fpg_scrollbar.pas b/src/gui/fpg_scrollbar.pas index 6f99588a..1ec78952 100644 --- a/src/gui/fpg_scrollbar.pas +++ b/src/gui/fpg_scrollbar.pas @@ -134,7 +134,6 @@ end; procedure TfpgScrollBar.HandlePaint; begin - Canvas.BeginDraw; // Do not remove - Scrollbars do painting outside HandlePaint as well! if Orientation = orVertical then begin DrawButton(0, 0, Width, Width, 'sys.sb.up', (FScrollbarDownPart = sbpUpBack) and (FPosition <> FMin), (FPosition <> FMin) and (Parent.Enabled)); @@ -145,9 +144,7 @@ begin DrawButton(0, 0, Height, Height, 'sys.sb.left', (FScrollbarDownPart = sbpUpBack) and (FPosition <> FMin), (FPosition <> FMin) and (Parent.Enabled)); DrawButton(Width-Height, 0, Height, Height, 'sys.sb.right', (FScrollbarDownPart = sbpDownForward) and (FPosition <> FMax), (FPosition <> FMax) and (Parent.Enabled)); end; - DrawSlider(FRecalc); - Canvas.EndDraw; // Do not remove - Scrollbars do painting outside HandlePaint as well! FRecalc := False; end; @@ -162,7 +159,7 @@ begin if not HasHandle then Exit; //==> FRecalc := True; - Invalidate;// DrawSlider(True); + Invalidate; end; procedure TfpgScrollBar.LineUp; @@ -219,7 +216,7 @@ begin FPosition := AValue; if HasHandle then - Invalidate;// DrawSlider(False); + Invalidate; end; procedure TfpgScrollBar.Step(ASteps: Integer); @@ -576,7 +573,7 @@ begin FSliderPos := area; if ppos <> FSliderPos then - Invalidate; // DrawSlider(False); + Invalidate; if area <> 0 then newp := FMin + Trunc((FMax - FMin) * (FSliderPos / area)) @@ -609,7 +606,7 @@ begin if Visible then begin FRecalc := True; - Invalidate; // DrawSlider(True); + Invalidate; end; if Assigned(FOnScroll) then |