"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/formcolorsetup.pas" between
CudaText-1.92.0.tar.gz and CudaText-1.93.0.tar.gz

About: CudaText is a cross-platform text editor (written in Lazarus).

formcolorsetup.pas  (CudaText-1.92.0):formcolorsetup.pas  (CudaText-1.93.0)
skipping to change at line 52 skipping to change at line 52
procedure bChangeClick(Sender: TObject); procedure bChangeClick(Sender: TObject);
procedure bNoneClick(Sender: TObject); procedure bNoneClick(Sender: TObject);
procedure bStyleClick(Sender: TObject); procedure bStyleClick(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure HelpButtonClick(Sender: TObject); procedure HelpButtonClick(Sender: TObject);
procedure ListKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure ListKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure ListStylesDrawItem(Control: TWinControl; Index: Integer; ARect: TR ect; State: TOwnerDrawState); procedure ListStylesDrawItem(Control: TWinControl; Index: Integer; ARect: TR ect; State: TOwnerDrawState);
procedure OKButtonClick(Sender: TObject); procedure OKButtonClick(Sender: TObject);
private private
{ private declarations } { private declarations }
FColorBg: TColor;
procedure UpdateList; procedure UpdateList;
procedure Localize; procedure Localize;
public public
{ public declarations } { public declarations }
Data: TAppTheme; Data: TAppTheme;
OnApply: TApplyThemeEvent; OnApply: TApplyThemeEvent;
end; end;
implementation implementation
skipping to change at line 177 skipping to change at line 178
st.BorderTypeRight:= TecBorderLineType(cbBorderR.ItemIndex); st.BorderTypeRight:= TecBorderLineType(cbBorderR.ItemIndex);
st.BorderTypeTop:= TecBorderLineType(cbBorderT.ItemIndex); st.BorderTypeTop:= TecBorderLineType(cbBorderT.ItemIndex);
st.BorderTypeBottom:= TecBorderLineType(cbBorderB.ItemIndex); st.BorderTypeBottom:= TecBorderLineType(cbBorderB.ItemIndex);
end; end;
finally finally
Free Free
end; end;
end; end;
procedure TfmColorSetup.FormShow(Sender: TObject); procedure TfmColorSetup.FormShow(Sender: TObject);
var
i: integer;
begin begin
Localize; Localize;
Width:= AppScale(Width); Width:= AppScale(Width);
Height:= AppScale(Height); Height:= AppScale(Height);
List.Width:= AppScale(List.Width); List.Width:= AppScale(List.Width);
ListStyles.Width:= AppScale(ListStyles.Width); ListStyles.Width:= AppScale(ListStyles.Width);
UpdateFormOnTop(Self); UpdateFormOnTop(Self);
PanelUi.Align:= alClient; PanelUi.Align:= alClient;
PanelSyntax.Align:= alClient; PanelSyntax.Align:= alClient;
UpdateList; UpdateList;
List.ItemIndex:= 0; List.ItemIndex:= 0;
ListStyles.ItemIndex:= 0; ListStyles.ItemIndex:= 0;
FColorBg:= clWhite;
for i:= Low(Data.Colors) to High(Data.Colors) do
if Data.Colors[i].name='EdTextBg' then
begin
FColorBg:= Data.Colors[i].color;
Break
end;
if PanelUi.Visible then if PanelUi.Visible then
ActiveControl:= List ActiveControl:= List
else else
if PanelSyntax.Visible then if PanelSyntax.Visible then
ActiveControl:= ListStyles; ActiveControl:= ListStyles;
end; end;
procedure TfmColorSetup.HelpButtonClick(Sender: TObject); procedure TfmColorSetup.HelpButtonClick(Sender: TObject);
begin begin
if Assigned(OnApply) then if Assigned(OnApply) then
skipping to change at line 237 skipping to change at line 248
begin begin
C:= (Control as TListbox).Canvas; C:= (Control as TListbox).Canvas;
st:= ListStyles.Items.Objects[Index] as TecSyntaxFormat; st:= ListStyles.Items.Objects[Index] as TecSyntaxFormat;
C.Brush.Color:= clWindow; C.Brush.Color:= clWindow;
C.FillRect(ARect); C.FillRect(ARect);
C.Font.Color:= st.Font.Color; C.Font.Color:= st.Font.Color;
C.Font.Style:= st.Font.Style; C.Font.Style:= st.Font.Style;
C.Brush.Color:= st.BgColor; C.Brush.Color:= st.BgColor;
if st.BgColor=clNone then
C.Brush.Color:= FColorBg;
S:= cExample; S:= cExample;
NWidth:= C.TextWidth(S); NWidth:= C.TextWidth(S);
C.TextOut(ARect.Right-NWidth, ARect.Top, S); C.TextOut(ARect.Right-NWidth, ARect.Top, S);
if st.BorderColorBottom<>clNone then if st.BorderColorBottom<>clNone then
begin begin
C.Pen.Color:= st.BorderColorBottom; C.Pen.Color:= st.BorderColorBottom;
C.Line(ARect.Right-NWidth, ARect.Bottom-2, ARect.Right, ARect.Bottom-2); C.Line(ARect.Right-NWidth, ARect.Bottom-2, ARect.Right, ARect.Bottom-2);
end; end;
 End of changes. 4 change blocks. 
0 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)