Ignore:
Timestamp:
Apr 6, 2021, 8:11:02 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Merged trunk branch version r348 into highdpi branch.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Packages/CevoComponents/EOTButton.pas

    r210 r349  
    7474begin
    7575  with Canvas do
    76     if FGraphic <> nil then
    77     begin
    78       // TODO: For some reason BitBlt is not working with gray background here
    79       //DpiBitCanvas(Buffer.Canvas, 0, 0, 48, 48, Back.Canvas, 0, 0);
    80       Buffer.Canvas.Draw(0, 0, Back);
     76    if FGraphic <> nil then begin
     77      UnshareBitmap(Buffer);
     78      DpiBitCanvas(Buffer.Canvas, 0, 0, 48, 48, Back.Canvas, 0, 0);
    8179      ImageOp_CBC(Buffer, Template, 0, 0, 133, 149 + 48 * Byte(FDown), 48, 48,
    8280        $000000, $FFFFFF);
     
    8583          $000000, $FFFFFF);
    8684      DpiBitCanvas(Canvas, 0, 0, 48, 48, Buffer.Canvas, 0, 0);
    87     end
    88     else
    89     begin
     85    end else begin
    9086      Brush.Color := $0000FF;
    9187      FrameRect(Rect(0, 0, 48, 48))
     
    9591procedure TEOTButton.SetIndex(x: integer);
    9692begin
    97   if x <> FIndex then
    98   begin
     93  if x <> FIndex then begin
    9994    FIndex := x;
    10095    Invalidate;
     
    10499procedure TEOTButton.SetButtonIndexFast(x: integer);
    105100begin
    106   if Visible and (x <> FIndex) then
    107   begin
     101  if Visible and (x <> FIndex) then begin
    108102    FIndex := x;
    109103    try
    110       Paint
     104      Paint;
    111105    except
    112106    end;
Note: See TracChangeset for help on using the changeset viewer.