Changeset 378 for branches/highdpi/Packages/CevoComponents/ScreenTools.pas
- Timestamp:
- Apr 24, 2021, 11:41:07 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Packages/CevoComponents/ScreenTools.pas
r361 r378 54 54 procedure EditFrame(ca: TDpiCanvas; p: TRect; T: TTexture); 55 55 function HexStringToColor(S: string): integer; 56 function ExtractFileNameWithoutExt(const Filename: string): string; 56 57 function LoadGraphicFile(Bmp: TDpiBitmap; FileName: string; Options: TLoadGraphicFileOptions = []): boolean; 57 58 function LoadGraphicSet(const Name: string): TGraphicSet; … … 124 125 procedure DarkenImage(Bitmap: TDpiBitmap; Change: Integer); 125 126 procedure UnshareBitmap(Bitmap: TDpiBitmap); 127 procedure Gtk2Fix; 126 128 127 129 const … … 488 490 if (not (gfNoGamma in Options)) and (Gamma <> 100) then 489 491 ApplyGammaToBitmap(Bmp); 492 end; 493 494 function ExtractFileNameWithoutExt(const Filename: string): string; 495 var 496 P: Integer; 497 begin 498 Result := Filename; 499 P := Length(Result); 500 while P > 0 do begin 501 case Result[P] of 502 PathDelim: Exit; 503 {$ifdef windows} 504 '/': if ('/' in AllowDirectorySeparators) then Exit; 505 {$endif} 506 '.': Exit(Copy(Result, 1, P - 1)); 507 end; 508 Dec(P); 509 end; 490 510 end; 491 511 … … 1651 1671 end; 1652 1672 1673 procedure Gtk2Fix; 1674 var 1675 I: Integer; 1676 begin 1677 {$IFDEF LINUX} 1678 // Wait and process messages little bit to avoid crash or force repaint under Gtk2 1679 for I := 0 to 10 do begin 1680 Sleep(1); 1681 DpiApplication.ProcessMessages; 1682 end; 1683 {$ENDIF} 1684 end; 1685 1653 1686 procedure LoadFonts; 1654 1687 var
Note:
See TracChangeset
for help on using the changeset viewer.