Changeset 93 for trunk/Packages/Common/UScaleDPI.pas
- Timestamp:
- Jul 20, 2018, 10:25:06 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 6 6 compiled 7 7 heaptrclog.trc 8 LazFuck.dbg
-
- Property svn:ignore
-
trunk/Packages/Common/UScaleDPI.pas
r88 r93 215 215 I: Integer; 216 216 begin 217 ImgList.BeginUpdate; 217 218 NewWidth := ScaleX(ImgList.Width, FromDPI.X); 218 219 NewHeight := ScaleY(ImgList.Height, FromDPI.Y); … … 226 227 Temp[I] := TBitmap.Create; 227 228 Temp[I].SetSize(NewWidth, NewHeight); 228 {$ifdef linux}229 Temp[I].PixelFormat := pf24bit;230 {$else}231 229 Temp[I].PixelFormat := pf32bit; 232 {$endif}233 230 Temp[I].TransparentColor := TempBmp.TransparentColor; 234 231 //Temp[I].TransparentMode := TempBmp.TransparentMode; … … 252 249 Temp[i].Free; 253 250 end; 251 ImgList.EndUpdate; 254 252 end; 255 253 … … 288 286 WinControl: TWinControl; 289 287 ToolBarControl: TToolBar; 290 OldAnchors: TAnchors;291 OldAutoSize: Boolean;288 //OldAnchors: TAnchors; 289 //OldAutoSize: Boolean; 292 290 begin 293 291 //if Control is TMemo then Exit; … … 320 318 MinWidth := ScaleX(MinWidth, FromDPI.X); 321 319 MinHeight := ScaleY(MinHeight, FromDPI.Y); 322 Width := ScaleX(Width, FromDPI.X); 320 // Workaround to bad band width auto sizing 321 //Width := ScaleX(Width, FromDPI.X); 322 Width := ScaleX(Control.Width + 28, FromDPI.X); 323 323 //Control.Invalidate; 324 324 end; 325 // Workaround for bad autosizing of coolbar 326 if AutoSize then begin 327 AutoSize := False; 328 Height := ScaleY(Height, FromDPI.Y); 329 AutoSize := True; 330 end; 325 331 EndUpdate; 326 332 end;
Note:
See TracChangeset
for help on using the changeset viewer.