Changeset 210 for branches/highdpi/Packages/CevoComponents/ButtonN.pas
- Timestamp:
- May 9, 2020, 4:02:07 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Packages/CevoComponents/ButtonN.pas
r180 r210 4 4 5 5 uses 6 Classes, Graphics, Controls, LCLIntf, LCLType, UDpiControls;6 UDpiControls, Classes, Graphics, Controls, LCLIntf, LCLType, ScreenTools; 7 7 8 8 type 9 TButtonN = class(T GraphicControl)9 TButtonN = class(TDpiGraphicControl) 10 10 constructor Create(aOwner: TComponent); override; 11 11 private … … 40 40 procedure Register; 41 41 begin 42 RegisterComponents(' Samples', [TButtonN]);42 RegisterComponents('C-evo', [TButtonN]); 43 43 end; 44 44 … … 62 62 if FGraphic <> nil then 63 63 begin 64 DpiBit Blt(Canvas.Handle, 1, 1, 40, 40, FBackGraphic.Canvas.Handle,65 1 + 80 * BackIndex + 40 * byte(FPossible and FLit), 176 , SRCCOPY);64 DpiBitCanvas(Canvas, 1, 1, 40, 40, FBackGraphic.Canvas, 65 1 + 80 * BackIndex + 40 * byte(FPossible and FLit), 176); 66 66 if FPossible then 67 67 begin 68 DpiBit Blt(Canvas.Handle, 3, 3, 36, 36, FMask.Canvas.Handle,68 DpiBitCanvas(Canvas, 3, 3, 36, 36, FMask.Canvas, 69 69 195 + 37 * (FIndex mod 3), 21 + 37 * (FIndex div 3), SRCAND); 70 DpiBit Blt(Canvas.Handle, 3, 3, 36, 36, FGraphic.Canvas.Handle,70 DpiBitCanvas(Canvas, 3, 3, 36, 36, FGraphic.Canvas, 71 71 195 + 37 * (FIndex mod 3), 21 + 37 * (FIndex div 3), SRCPAINT); 72 end 72 end; 73 73 end; 74 74 MoveTo(0, 41); … … 79 79 LineTo(41, 41); 80 80 LineTo(0, 41); 81 end 81 end; 82 82 end; 83 83 … … 86 86 begin 87 87 if FPossible and (Button = mbLeft) and (@ChangeProc <> nil) then 88 ChangeProc(Self) 88 ChangeProc(Self); 89 89 end; 90 90 … … 98 98 else 99 99 Hint := ''; 100 Invalidate 101 end 100 Invalidate; 101 end; 102 102 end; 103 103 … … 107 107 begin 108 108 FLit := x; 109 Invalidate 110 end 109 Invalidate; 110 end; 111 111 end; 112 112 … … 120 120 else 121 121 BackIndex := 0; 122 Invalidate 123 end 122 Invalidate; 123 end; 124 124 end; 125 125 … … 131 131 if FPossible then 132 132 Hint := x; 133 end 133 end; 134 134 end; 135 135
Note:
See TracChangeset
for help on using the changeset viewer.