mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 18:19:07 +02:00
Improves the wince checkbox
git-svn-id: trunk@33121 -
This commit is contained in:
parent
5e525c79c3
commit
8604c2f817
@ -24,14 +24,6 @@ type
|
|||||||
FState: TCDButtonState); override;
|
FState: TCDButtonState); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TCDGroupBoxDrawerWinCE = class(TCDGroupBoxDrawer)
|
|
||||||
public
|
|
||||||
FCaptionMiddle: integer;
|
|
||||||
procedure SetClientRectPos(CDGroupBox: TCDGroupBox); override;
|
|
||||||
procedure DrawToIntfImage(ADest: TFPImageCanvas; CDGroupBox: TCDGroupBox); override;
|
|
||||||
procedure DrawToCanvas(ADest: TCanvas; CDGroupBox: TCDGroupBox); override;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TCDCheckBoxDrawerWinCE }
|
{ TCDCheckBoxDrawerWinCE }
|
||||||
|
|
||||||
TCDCheckBoxDrawerWinCE = class(TCDCheckBoxDrawer)
|
TCDCheckBoxDrawerWinCE = class(TCDCheckBoxDrawer)
|
||||||
@ -42,6 +34,14 @@ type
|
|||||||
FState: TCDButtonState); override;
|
FState: TCDButtonState); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TCDGroupBoxDrawerWinCE = class(TCDGroupBoxDrawer)
|
||||||
|
public
|
||||||
|
FCaptionMiddle: integer;
|
||||||
|
procedure SetClientRectPos(CDGroupBox: TCDGroupBox); override;
|
||||||
|
procedure DrawToIntfImage(ADest: TFPImageCanvas; CDGroupBox: TCDGroupBox); override;
|
||||||
|
procedure DrawToCanvas(ADest: TCanvas; CDGroupBox: TCDGroupBox); override;
|
||||||
|
end;
|
||||||
|
|
||||||
TCDCustomTabControlDrawerWinCE = class(TCDCustomTabControlDrawer)
|
TCDCustomTabControlDrawerWinCE = class(TCDCustomTabControlDrawer)
|
||||||
private
|
private
|
||||||
StartIndex: integer; //FEndIndex
|
StartIndex: integer; //FEndIndex
|
||||||
@ -95,7 +95,8 @@ begin
|
|||||||
// The checkbox item itself
|
// The checkbox item itself
|
||||||
ADest.Brush.Color := clWhite;
|
ADest.Brush.Color := clWhite;
|
||||||
ADest.Pen.Style := psSolid;
|
ADest.Pen.Style := psSolid;
|
||||||
ADest.Pen.Color := clBlack;
|
if FState.IsDown then ADest.Pen.Color := clGray
|
||||||
|
else ADest.Pen.Color := clBlack;
|
||||||
ADest.Rectangle(
|
ADest.Rectangle(
|
||||||
1,
|
1,
|
||||||
lHalf - CDCheckBoxWinCE_Half_Height,
|
lHalf - CDCheckBoxWinCE_Half_Height,
|
||||||
@ -107,10 +108,10 @@ begin
|
|||||||
begin
|
begin
|
||||||
// 4 lines going down and to the right
|
// 4 lines going down and to the right
|
||||||
for i := 0 to 3 do
|
for i := 0 to 3 do
|
||||||
ADest.Line(5+i, lHalf - CDCheckBoxWinCE_Half_Height+6+i, 5+i, lHalf - CDCheckBoxWinCE_Half_Height+9+i);
|
ADest.Line(5+i, lHalf - CDCheckBoxWinCE_Half_Height+5+i, 5+i, lHalf - CDCheckBoxWinCE_Half_Height+8+i);
|
||||||
// Now 5 lines going up and to the right
|
// Now 5 lines going up and to the right
|
||||||
for i := 4 to 8 do
|
for i := 4 to 8 do
|
||||||
ADest.Line(5+i, lHalf - CDCheckBoxWinCE_Half_Height+6+6-i, 5+i, lHalf - CDCheckBoxWinCE_Half_Height+9+6-i);
|
ADest.Line(5+i, lHalf - CDCheckBoxWinCE_Half_Height+5+6-i, 5+i, lHalf - CDCheckBoxWinCE_Half_Height+8+6-i);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// The selection
|
// The selection
|
||||||
@ -121,10 +122,10 @@ begin
|
|||||||
begin
|
begin
|
||||||
// The selection inside the square
|
// The selection inside the square
|
||||||
ADest.Rectangle(
|
ADest.Rectangle(
|
||||||
lHalf - CDCheckBoxWinCE_Half_Height+1,
|
|
||||||
2,
|
2,
|
||||||
lHalf + CDCheckBoxWinCE_Half_Height-1,
|
lHalf - CDCheckBoxWinCE_Half_Height+1,
|
||||||
CDCheckBoxWinCE_Height);
|
CDCheckBoxWinCE_Height,
|
||||||
|
lHalf + CDCheckBoxWinCE_Half_Height-1);
|
||||||
|
|
||||||
// Selection around the text
|
// Selection around the text
|
||||||
ADest.Rectangle(
|
ADest.Rectangle(
|
||||||
|
Loading…
Reference in New Issue
Block a user