Changeset 684 for trunk/Packages
- Timestamp:
- Jul 26, 2025, 10:38:53 PM (5 days ago)
- Location:
- trunk/Packages
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/BaseWin.pas
r657 r684 23 23 procedure OffscreenPaint; virtual; 24 24 procedure VPaint; virtual; 25 procedure DoOnResize; override; 25 26 public 26 27 UserLeft: Integer; … … 40 41 end; 41 42 43 { TFramedDlg } 44 42 45 TFramedDlg = class(TBufferedDrawDlg) 43 46 protected … … 53 56 procedure VPaint; override; 54 57 procedure FillOffscreen(Left, Top, Width, Height: Integer); 58 procedure DoOnResize; override; 55 59 public 56 60 constructor Create(AOwner: TComponent); override; … … 167 171 begin 168 172 BitBltCanvas(Canvas, 0, 0, ClientWidth, ClientHeight, Offscreen.Canvas, 0, 0); 173 end; 174 175 procedure TBufferedDrawDlg.DoOnResize; 176 begin 177 inherited; 178 SmartUpdateContent; 169 179 end; 170 180 … … 232 242 end; 233 243 234 constructor TFramedDlg.Create ;244 constructor TFramedDlg.Create(AOwner: TComponent); 235 245 begin 236 246 OnCreate := FormCreate; … … 247 257 ModalIndication := True; 248 258 Canvas.Brush.Style := TBrushStyle.bsClear; 249 InnerWidth := Width - 2 * SideFrame; 250 InnerHeight := Height - TitleHeight - NarrowFrame; 259 DoOnResize; 251 260 end; 252 261 … … 304 313 L := BiColorTextWidth(Canvas, Caption); 305 314 Cut := (ClientWidth - L) div 2; 306 xTexOffset := (Maintexture.Width - ClientWidth) div 2;307 yTexOffset := (Maintexture.Height - ClientHeight) div 2;315 xTexOffset := 0; //(Maintexture.Width - ClientWidth) div 2; 316 yTexOffset := 0; //(Maintexture.Height - ClientHeight) div 2; 308 317 if WideBottom then 309 318 InnerBottom := ClientHeight - WideFrame … … 332 341 Frame(Canvas, SideFrame - 1, TitleHeight - 1, ClientWidth - SideFrame, 333 342 InnerBottom, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 343 334 344 // RFrame(Canvas,SideFrame - 2, TitleHeight - 2, ClientWidth - SideFrame + 1, 335 345 // InnerBottom + 1, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); … … 471 481 begin 472 482 Fill(Offscreen.Canvas, Left, Top, Width, Height, 473 SideFrame + (Maintexture.Width - ClientWidth) div 2, 474 TitleHeight + (Maintexture.Height - ClientHeight) div 2); 483 SideFrame, TitleHeight); 484 end; 485 486 procedure TFramedDlg.DoOnResize; 487 begin 488 inherited; 489 InnerWidth := Width - 2 * SideFrame; 490 InnerHeight := Height - TitleHeight - NarrowFrame; 491 SmartUpdateContent; 475 492 end; 476 493 -
trunk/Packages/CevoComponents/DrawDlg.pas
r622 r684 73 73 begin 74 74 inherited; 75 76 // Make all dialogs resizable 77 //BorderStyle := TBorderStyle.bsSizeable; 78 //BorderIcons := [TBorderIcon.biSystemMenu, TBorderIcon.biMinimize, TBorderIcon.biMaximize]; 79 75 80 Color := clBlack; 76 81 TitleHeight := 0; -
trunk/Packages/CevoComponents/ScreenTools.pas
r666 r684 1123 1123 1124 1124 procedure Fill(Canvas: TCanvas; Left, Top, Width, Height, xOffset, yOffset: Integer); 1125 begin 1126 //Assert((Left + xOffset >= 0) and (Left + xOffset + Width <= MainTexture.Width) and 1127 // (Top + yOffset >= 0) and (Top + yOffset + Height <= MainTexture.Height)); 1128 BitBltCanvas(Canvas, Left, Top, Width, Height, MainTexture.Image.Canvas, 1129 Left + xOffset, Top + yOffset); 1125 var 1126 X, Y: Integer; 1127 XX, YY: Integer; 1128 W, H: Integer; 1129 begin 1130 // BitBltCanvas(Canvas, Left, Top, Width, Height, MainTexture.Image.Canvas, 1131 // Left + xOffset, Top + yOffset); 1132 if Width < MainTexture.Width then W := Width 1133 else W := MainTexture.Width; 1134 if Height < MainTexture.Height then H := Height 1135 else H := MainTexture.Height; 1136 if MainTexture.Height > 0 then YY := Trunc(Height / MainTexture.Height) 1137 else YY := 0; 1138 if MainTexture.Width > 0 then XX := Trunc(Width / MainTexture.Width) 1139 else XX := 0; 1140 for Y := 0 to YY do 1141 for X := 0 to XX do 1142 begin 1143 BitBltCanvas(Canvas, Left + X * MainTexture.Width, Top + Y * MainTexture.Height, 1144 W, H, MainTexture.Image.Canvas, 0, 0); 1145 end; 1130 1146 end; 1131 1147 … … 1212 1228 procedure PaintBackground(Canvas: TCanvas; Left, Top, Width, Height, FormWidth, 1213 1229 FormHeight: Integer); 1214 var 1215 X, Y: Integer; 1216 XX, YY: Integer; 1217 begin 1218 if MainTexture.Height > 0 then YY := Trunc(Height / MainTexture.Height) 1219 else YY := 0; 1220 if MainTexture.Width > 0 then XX := Trunc(Width / MainTexture.Width) 1221 else XX := 0; 1222 for Y := 0 to YY do 1223 for X := 0 to XX do 1224 begin 1225 Fill(Canvas, Left + X * MainTexture.Width, Top + Y * MainTexture.Height, Width, Height, 1226 -(Left + X * MainTexture.Width), -(Top + Y * MainTexture.Height)); 1227 end; 1230 begin 1231 Fill(Canvas, Left, Top, Width, Height, 0, 0) 1228 1232 end; 1229 1233 -
trunk/Packages/DpiControls/Dpi.Controls.pas
r642 r684 122 122 procedure SetParentFont(AValue: Boolean); 123 123 procedure SetShowHint(AValue: Boolean); 124 procedure Native FormResize(Sender: TObject);124 procedure NativeResize(Sender: TObject); 125 125 procedure NativeChangeBounds(Sender: TObject); 126 procedure DoFormResize;127 126 procedure DoChangeBounds; 128 127 procedure MouseDownHandler(Sender: TObject; Button: TMouseButton; Shift: TShiftState; … … 138 137 function ColorIsStored: Boolean; virtual; 139 138 protected 139 procedure DoOnResize; virtual; 140 140 procedure DoBorderSpacingChange(Sender: TObject; InnerSpaceChanged: Boolean); virtual; 141 141 function GetText: TCaption; virtual; … … 604 604 begin 605 605 Font.NativeFont := GetNativeControl.Font; 606 GetNativeControl.OnResize := Native FormResize;606 GetNativeControl.OnResize := NativeResize; 607 607 GetNativeControl.OnChangeBounds := NativeChangeBounds; 608 608 … … 1034 1034 end; 1035 1035 1036 procedure TControl.Native FormResize(Sender: TObject);1036 procedure TControl.NativeResize(Sender: TObject); 1037 1037 var 1038 1038 R: TRect; … … 1043 1043 FWidth := R.Width; 1044 1044 FHeight := R.Height; 1045 Do FormResize;1045 DoOnResize; 1046 1046 end; 1047 1047 … … 1060 1060 end; 1061 1061 1062 procedure TControl.Do FormResize;1062 procedure TControl.DoOnResize; 1063 1063 begin 1064 1064 if Assigned(FOnResize) then begin
Note:
See TracChangeset
for help on using the changeset viewer.