|
@@ -363,7 +363,7 @@ begin
|
|
|
evKeyDown: Begin { Key down event }
|
|
evKeyDown: Begin { Key down event }
|
|
|
NeedClear:=true;
|
|
NeedClear:=true;
|
|
|
n15:=15; n11:=11; n16:=16;
|
|
n15:=15; n11:=11; n16:=16;
|
|
|
- if (SelType = csBackground) then
|
|
|
|
|
|
|
+ if Size.Y=2 then
|
|
|
begin
|
|
begin
|
|
|
n15:=7; n11:=3; n16:=8;
|
|
n15:=7; n11:=3; n16:=8;
|
|
|
end;
|
|
end;
|
|
@@ -397,8 +397,7 @@ begin
|
|
|
MakeLocal(Event.Where, Mouse); { Localize mouse }
|
|
MakeLocal(Event.Where, Mouse); { Localize mouse }
|
|
|
mx:=Mouse.X;
|
|
mx:=Mouse.X;
|
|
|
if (mx>=0) and (mx<=12) then
|
|
if (mx>=0) and (mx<=12) then
|
|
|
- if ((Mouse.Y >= 0) and (Mouse.Y <= 3) and (SelType = csForeground))
|
|
|
|
|
- or ((Mouse.Y >= 0) and (Mouse.Y <= 1) and (SelType = csBackground)) then
|
|
|
|
|
|
|
+ if ((Mouse.Y >= 0) and (Mouse.Y <= Size.Y-1)) then
|
|
|
begin
|
|
begin
|
|
|
mx:=mx div 3;
|
|
mx:=mx div 3;
|
|
|
newColor:=(Mouse.Y)*4+mx;
|
|
newColor:=(Mouse.Y)*4+mx;
|
|
@@ -478,7 +477,7 @@ begin
|
|
|
CurColor:=0;
|
|
CurColor:=0;
|
|
|
DrawColorLine(0);
|
|
DrawColorLine(0);
|
|
|
DrawColorLine(1);
|
|
DrawColorLine(1);
|
|
|
- if SelType = csForeground then
|
|
|
|
|
|
|
+ if Size.Y >= 4 then
|
|
|
begin
|
|
begin
|
|
|
DrawColorLine(2);
|
|
DrawColorLine(2);
|
|
|
DrawColorLine(3);
|
|
DrawColorLine(3);
|
|
@@ -962,6 +961,8 @@ begin
|
|
|
VScrollBar := New(PScrollBar, Init(R2));
|
|
VScrollBar := New(PScrollBar, Init(R2));
|
|
|
Insert(VScrollBar);
|
|
Insert(VScrollBar);
|
|
|
Groups := New(PColorGroupList, Init(R, VScrollBar, AGroups));
|
|
Groups := New(PColorGroupList, Init(R, VScrollBar, AGroups));
|
|
|
|
|
+ Groups^.GrowMode:=gfGrowHiY;
|
|
|
|
|
+ VScrollBar^.GrowMode:=gfGrowHiY;
|
|
|
Insert(Groups);
|
|
Insert(Groups);
|
|
|
R2.Copy(R); Dec(R2.A.Y); R2.B.Y:=R2.A.Y+1;
|
|
R2.Copy(R); Dec(R2.A.Y); R2.B.Y:=R2.A.Y+1;
|
|
|
Insert(New(PLabel, Init(R2, label_colorsel_group, Groups)));
|
|
Insert(New(PLabel, Init(R2, label_colorsel_group, Groups)));
|
|
@@ -976,6 +977,7 @@ begin
|
|
|
VScrollBar := New(PScrollBar, Init(R2));
|
|
VScrollBar := New(PScrollBar, Init(R2));
|
|
|
Insert(VScrollBar);
|
|
Insert(VScrollBar);
|
|
|
Items := New(PColorItemList, Init(R, VScrollBar,xItems));
|
|
Items := New(PColorItemList, Init(R, VScrollBar,xItems));
|
|
|
|
|
+ Items^.GrowMode:=gfGrowHiY+gfGrowHiX;
|
|
|
Insert(Items);
|
|
Insert(Items);
|
|
|
R2.Copy(R); Dec(R2.A.Y); R2.B.Y:=R2.A.Y+1;
|
|
R2.Copy(R); Dec(R2.A.Y); R2.B.Y:=R2.A.Y+1;
|
|
|
Insert(New(PLabel, Init(R2, label_colorsel_item, Items)));
|
|
Insert(New(PLabel, Init(R2, label_colorsel_item, Items)));
|
|
@@ -984,6 +986,8 @@ begin
|
|
|
R2.Copy(R); R2.B.Y:=R2.A.Y; Dec(R2.A.Y);
|
|
R2.Copy(R); R2.B.Y:=R2.A.Y; Dec(R2.A.Y);
|
|
|
ForSel:=New(PColorSelector, Init(R, csForeground));
|
|
ForSel:=New(PColorSelector, Init(R, csForeground));
|
|
|
ForLabel:=New(PLabel, Init(R2, label_colorsel_foreground, ForSel));
|
|
ForLabel:=New(PLabel, Init(R2, label_colorsel_foreground, ForSel));
|
|
|
|
|
+ ForSel^.GrowMode:=gfGrowLoX+gfGrowHiX;
|
|
|
|
|
+ ForLabel^.GrowMode:=gfGrowLoX+gfGrowHiX;
|
|
|
Insert(ForSel);
|
|
Insert(ForSel);
|
|
|
Insert(ForLabel);
|
|
Insert(ForLabel);
|
|
|
{-- Color selector background --}
|
|
{-- Color selector background --}
|
|
@@ -991,18 +995,23 @@ begin
|
|
|
R2.Copy(R); R2.B.Y:=R2.A.Y; Dec(R2.A.Y);
|
|
R2.Copy(R); R2.B.Y:=R2.A.Y; Dec(R2.A.Y);
|
|
|
BakSel:=New(PColorSelector, Init(R, csBackground));
|
|
BakSel:=New(PColorSelector, Init(R, csBackground));
|
|
|
BakLabel:=New(PLabel, Init(R2, label_colorsel_background, BakSel));
|
|
BakLabel:=New(PLabel, Init(R2, label_colorsel_background, BakSel));
|
|
|
|
|
+ BakSel^.GrowMode:=gfGrowLoX+gfGrowHiX;
|
|
|
|
|
+ BakLabel^.GrowMode:=gfGrowLoX+gfGrowHiX;
|
|
|
Insert(BakSel);
|
|
Insert(BakSel);
|
|
|
Insert(BakLabel);
|
|
Insert(BakLabel);
|
|
|
{-- Color Display --}
|
|
{-- Color Display --}
|
|
|
R.Assign(45, 12, 59, 15);
|
|
R.Assign(45, 12, 59, 15);
|
|
|
Display:=New(PColorDisplay,Init(R,Sw_NewStr(label_colorsel_displaytext)));
|
|
Display:=New(PColorDisplay,Init(R,Sw_NewStr(label_colorsel_displaytext)));
|
|
|
|
|
+ Display^.GrowMode:=gfGrowLoX+gfGrowHiX;
|
|
|
Insert(Display);
|
|
Insert(Display);
|
|
|
{-- Buttons --}
|
|
{-- Buttons --}
|
|
|
R.Assign(37, 16, 47, 18);
|
|
R.Assign(37, 16, 47, 18);
|
|
|
OkButton := New(PButton, Init(R, slOk, cmOK, bfDefault));
|
|
OkButton := New(PButton, Init(R, slOk, cmOK, bfDefault));
|
|
|
|
|
+ OkButton^.GrowMode:=gfGrowLoY+gfGrowHiY+gfGrowLoX+gfGrowHiX;
|
|
|
Insert(OkButton);
|
|
Insert(OkButton);
|
|
|
Inc(R.A.X,12); Inc(R.B.X,12);
|
|
Inc(R.A.X,12); Inc(R.B.X,12);
|
|
|
- CancelButton := New(PButton, Init(R, slCancel, cmCancel, bfDefault));
|
|
|
|
|
|
|
+ CancelButton := New(PButton, Init(R, slCancel, cmCancel, bfNormal));
|
|
|
|
|
+ CancelButton^.GrowMode:=gfGrowLoY+gfGrowHiY+gfGrowLoX+gfGrowHiX;
|
|
|
Insert(CancelButton);
|
|
Insert(CancelButton);
|
|
|
{--set focus--}
|
|
{--set focus--}
|
|
|
Items^.FocusItem(0);
|
|
Items^.FocusItem(0);
|