From 66f8410294f166cfbc330f7fb89f82f0b7303b84 Mon Sep 17 00:00:00 2001 From: Freeman Date: Sun, 27 Dec 2020 02:00:40 +0300 Subject: [PATCH] KolibriOS window styles sorted by value, WS_NO_DRAW and WINDOW_BORDER_SIZE added --- Examples/GUI/Screenshot/Screenshot.dpr | 7 ++----- Lib/KolibriOS.pas | 15 +++++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Examples/GUI/Screenshot/Screenshot.dpr b/Examples/GUI/Screenshot/Screenshot.dpr index c8f24ac..239c8e0 100644 --- a/Examples/GUI/Screenshot/Screenshot.dpr +++ b/Examples/GUI/Screenshot/Screenshot.dpr @@ -3,9 +3,6 @@ program Screenshot; uses KolibriOS; -const - BORDER_SIZE = 5; - type TRGBTriple = packed record Blue: Byte; @@ -63,8 +60,8 @@ begin with ScreenSize do begin - WndWidth := BORDER_SIZE * 2 + Width div 2 - 1; - WndHeight := BORDER_SIZE + GetSkinHeight + Height div 2 - 1; + WndWidth := WINDOW_BORDER_SIZE * 2 + Width div 2 - 1; + WndHeight := WINDOW_BORDER_SIZE + GetSkinHeight + Height div 2 - 1; WndLeft := (Width - WndWidth) div 2; WndTop := (Height - WndHeight) div 2; diff --git a/Lib/KolibriOS.pas b/Lib/KolibriOS.pas index 9fcfd31..13ea552 100644 --- a/Lib/KolibriOS.pas +++ b/Lib/KolibriOS.pas @@ -245,15 +245,18 @@ type const INVALID_HANDLE = 0; + WINDOW_BORDER_SIZE = 5; // defined by kernel + // Window styles - WS_SKINNED_FIXED = $4000000; - WS_SKINNED_SIZABLE = $3000000; - WS_FIXED = $0000000; - WS_SIZABLE = $2000000; + WS_FIXED = $00000000; + WS_NO_DRAW = $01000000; + WS_SIZABLE = $02000000; + WS_SKINNED_SIZABLE = $03000000; + WS_SKINNED_FIXED = $04000000; + WS_CAPTION = $10000000; + WS_CLIENT_COORDS = $20000000; WS_TRANSPARENT_FILL = $40000000; WS_GRADIENT_FILL = $80000000; - WS_CLIENT_COORDS = $20000000; - WS_CAPTION = $10000000; // Caption styles CAPTION_MOVABLE = $00000000;