Changeset 527 for trunk/Packages
- Timestamp:
- Jan 9, 2024, 12:28:47 AM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/DrawDlg.pas
r525 r527 242 242 r0, r1: HRgn; 243 243 begin 244 r0 := CreateRectRgn(0, 0, ClientWidth, ClientHeight);244 r0 := CreateRectRgn(0, 0, Width, Height); 245 245 for i := 0 to ControlCount - 1 do 246 246 if not (Controls[i] is TArea) and Controls[i].Visible then … … 271 271 procedure TBaseMessgDlg.FormPaint(Sender: TObject); 272 272 var 273 i, cix: Integer;273 I, cix: Integer; 274 274 begin 275 275 if csDesigning in ComponentState then Exit; 276 PaintBackground(Self, 3 + Border, 3 + Border, ClientWidth - (6 + 2 * Border),277 ClientHeight - (6 + 2 * Border));278 for i:= 0 to Border do279 Frame(Canvas, i, i, ClientWidth - 1 - i, ClientHeight - 1 - i,276 PaintBackground(Self, 3 + Border, 3 + Border, Width - (6 + 2 * Border), 277 Height - (6 + 2 * Border)); 278 for I := 0 to Border do 279 Frame(Canvas, I, I, Width - 1 - I, Height - 1 - I, 280 280 $000000, $000000); 281 Frame(Canvas, Border + 1, Border + 1, ClientWidth - (2 + Border),282 ClientHeight - (2 + Border), MainTexture.ColorBevelLight,281 Frame(Canvas, Border + 1, Border + 1, Width - (2 + Border), 282 Height - (2 + Border), MainTexture.ColorBevelLight, 283 283 MainTexture.ColorBevelShade); 284 Frame(Canvas, 2 + Border, 2 + Border, ClientWidth - (3 + Border),285 ClientHeight - (3 + Border), MainTexture.ColorBevelLight,284 Frame(Canvas, 2 + Border, 2 + Border, Width - (3 + Border), 285 Height - (3 + Border), MainTexture.ColorBevelLight, 286 286 MainTexture.ColorBevelShade); 287 287 SplitText(False); … … 295 295 var 296 296 Start, Stop, OrdinaryStop, LinesCount: Integer; 297 s: string;297 S: string; 298 298 begin 299 299 Start := 1; … … 304 304 while (Stop < Length(MessgText)) and (MessgText[Stop] <> '\') and 305 305 (BiColorTextWidth(Canvas, Copy(MessgText, Start, Stop - Start + 1)) < 306 ClientWidth - 56) do306 Width - 56) do 307 307 Inc(Stop); 308 308 if Stop <> Length(MessgText) then … … 310 310 OrdinaryStop := Stop; 311 311 repeat 312 dec(OrdinaryStop)312 Dec(OrdinaryStop) 313 313 until (MessgText[OrdinaryStop + 1] = ' ') or 314 314 (MessgText[OrdinaryStop + 1] = '\'); … … 318 318 if not Preview then 319 319 begin 320 s:= Copy(MessgText, Start, Stop - Start + 1);320 S := Copy(MessgText, Start, Stop - Start + 1); 321 321 LoweredTextOut(Canvas, -1, MainTexture, 322 ( ClientWidth - BiColorTextWidth(Canvas, s)) div 2,323 19 + Border + TopSpace + LinesCount * MessageLineSpacing, s);322 (Width - BiColorTextWidth(Canvas, S)) div 2, 323 19 + Border + TopSpace + LinesCount * MessageLineSpacing, S); 324 324 end; 325 325 Start := Stop + 2; … … 332 332 procedure TBaseMessgDlg.CorrectHeight; 333 333 var 334 i: Integer;335 begin 336 ClientHeight := 72 + Border + TopSpace + Lines * MessageLineSpacing;337 Top := (Screen.Height - ClientHeight) div 2;334 I: Integer; 335 begin 336 Height := 72 + Border + TopSpace + Lines * MessageLineSpacing; 337 Top := (Screen.Height - Height) div 2; 338 338 for i := 0 to ControlCount - 1 do 339 Controls[i].Top := ClientHeight - (34 + Border);339 Controls[i].Top := Height - (34 + Border); 340 340 end; 341 341
Note:
See TracChangeset
for help on using the changeset viewer.