From dfe9f1a8bae281c5ad81cb7fb5ff566ed08f3794 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Mon, 7 Dec 2015 11:23:07 +0100 Subject: [PATCH] pc fine tweaking --- src/ce_controls.pas | 10 +++++----- src/ce_editor.lfm | 6 +++--- src/ce_editor.pas | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/ce_controls.pas b/src/ce_controls.pas index 6fe06bcf..7a8f2063 100644 --- a/src/ce_controls.pas +++ b/src/ce_controls.pas @@ -117,7 +117,7 @@ begin fMoveLeftBtn.BorderSpacing.Around:= 2; fMoveLeftBtn.ShowCaption:=false; fMoveLeftBtn.OnClick:=@btnMoveLeftClick; - fMoveLeftBtn.Hint:='move page to the left'; + fMoveLeftBtn.Hint:='move current page to the left'; fMoveRightBtn:= TSpeedButton.Create(self); fMoveRightBtn.Parent := fHeader; @@ -126,7 +126,7 @@ begin fMoveRightBtn.BorderSpacing.Around:= 2; fMoveRightBtn.ShowCaption:=false; fMoveRightBtn.OnClick:=@btnMoveRightClick; - fMoveRightBtn.Hint:='move page to the right'; + fMoveRightBtn.Hint:='move current page to the right'; fAddBtn:= TSpeedButton.Create(self); fAddBtn.Parent := fHeader; @@ -135,6 +135,7 @@ begin fAddBtn.BorderSpacing.Around:= 2; fAddBtn.ShowCaption:=false; fAddBtn.OnClick:=@btnAddClick; + fAddBtn.Hint:='add a new page'; fCloseBtn := TSpeedButton.Create(self); fCloseBtn.Parent := fHeader; @@ -143,7 +144,7 @@ begin fCloseBtn.BorderSpacing.Around:= 2; fCloseBtn.ShowCaption:=false; fCloseBtn.OnClick:=@btnCloseClick; - fCloseBtn.Hint:='close page'; + fCloseBtn.Hint:='close current page'; fContent := TPanel.Create(self); fContent.Parent := self; @@ -151,7 +152,7 @@ begin fContent.BevelInner:= bvNone; fContent.BevelOuter:= bvNone; fContent.BorderStyle:=bsNone; - fContent.BorderSpacing.Around:=2; + fContent.BorderSpacing.Around:=0; fPages := TFPList.Create; fPageIndex := -1; @@ -309,7 +310,6 @@ begin end; - procedure TCEPageControl.btnCloseClick(sender: TObject); begin deletePage(fPageIndex); diff --git a/src/ce_editor.lfm b/src/ce_editor.lfm index 80303710..d8e49608 100644 --- a/src/ce_editor.lfm +++ b/src/ce_editor.lfm @@ -17,12 +17,12 @@ inherited CEEditorWidget: TCEEditorWidget ClientHeight = 406 ClientWidth = 465 object editorStatus: TStatusBar[0] - Left = 2 + Left = 0 Height = 18 Top = 386 - Width = 461 + Width = 465 AutoSize = False - BorderSpacing.Around = 2 + BorderSpacing.Bottom = 2 Panels = < item Width = 110 diff --git a/src/ce_editor.pas b/src/ce_editor.pas index f2a098be..7a67875c 100644 --- a/src/ce_editor.pas +++ b/src/ce_editor.pas @@ -97,6 +97,7 @@ begin pageControl.onChanged:= @PageControlChange; pageControl.onChanging:=@PageControlChanging; pageControl.closeButton.OnClick:=@pageCloseBtnClick; + pageControl.addButton.OnClick:=@pageBtnAddCLick; AssignPng(pageControl.moveLeftButton, 'document_back'); AssignPng(pageControl.moveRightButton, 'document_next'); AssignPng(pageControl.addButton, 'document_add'); @@ -255,6 +256,7 @@ end; procedure TCEEditorWidget.pageBtnAddCLick(Sender: TObject); begin TCESynMemo.Create(nil); + pageControl.currentPage.Caption:=''; end; procedure TCEEditorWidget.focusedEditorChanged;