This commit is contained in:
Basile Burg 2018-06-25 06:30:19 +02:00
parent 255271bbc7
commit 6c65d4b4fd
12 changed files with 109 additions and 62 deletions

View File

@ -71,6 +71,7 @@ inherited CEDubProjectEditorWidget: TCEDubProjectEditorWidget
end
inherited toolbar: TCEToolBar
Width = 399
OnResize = toolbarResize
object btnReload: TCEToolButton[0]
Left = 85
Hint = 'reload the project, useful to fetch new dependencies or detect new source files'
@ -102,11 +103,11 @@ inherited CEDubProjectEditorWidget: TCEDubProjectEditorWidget
scaledSeparator = False
end
object fltEdit: TTreeFilterEdit[3]
Left = 128
Left = 120
Height = 26
Hint = 'filter properties'
Top = 2
Width = 269
Width = 277
ButtonWidth = 23
NumGlyphs = 1
Align = alRight

View File

@ -55,6 +55,7 @@ type
procedure btnCloneObjectClick(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure propTreeSelectionChanged(Sender: TObject);
procedure toolbarResize(Sender: TObject);
private
fSelectedNode: TTreeNode;
fProj: TCEDubProject;
@ -387,6 +388,11 @@ begin
updateValueEditor;
end;
procedure TCEDubProjectEditorWidget.toolbarResize(Sender: TObject);
begin
fltEdit.Width := toolbar.Width - fltEdit.Left - fltEdit.BorderSpacing.Around;
end;
procedure TCEDubProjectEditorWidget.btnAcceptPropClick(Sender: TObject);
begin
if fSelectedNode.isNil then

View File

@ -46,6 +46,7 @@ inherited CEMessagesWidget: TCEMessagesWidget
Width = 836
ShowCaptions = True
Wrapable = False
OnResize = toolbarResize
object sep: TCEToolButton[0]
Left = 299
Height = 28
@ -133,11 +134,11 @@ inherited CEMessagesWidget: TCEMessagesWidget
scaledSeparator = False
end
object TreeFilterEdit1: TTreeFilterEdit[10]
Left = 536
Left = 304
Height = 28
Hint = 'in the selected category, filter the messages that contain the text typed here'
Top = 1
Width = 299
Width = 528
OnAfterFilter = TreeFilterEdit1AfterFilter
ButtonWidth = 23
NumGlyphs = 1

View File

@ -80,6 +80,7 @@ type
procedure ListCustomDrawItem(Sender: TCustomTreeView; Node: TTreeNode;
State: TCustomDrawState; var DefaultDraw: Boolean);
procedure ListKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure toolbarResize(Sender: TObject);
procedure TreeFilterEdit1AfterFilter(Sender: TObject);
procedure TreeFilterEdit1ButtonClick(Sender: TObject);
private
@ -497,6 +498,11 @@ begin
end;
end;
procedure TCEMessagesWidget.toolbarResize(Sender: TObject);
begin
TreeFilterEdit1.Width := toolbar.Width - TreeFilterEdit1.Left - TreeFilterEdit1.BorderSpacing.Around;
end;
procedure TCEMessagesWidget.TreeFilterEdit1AfterFilter(Sender: TObject);
begin
fFiltering := TreeFilterEdit1.Filter.isNotEmpty;

View File

@ -1,34 +1,34 @@
inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
Left = 1367
Height = 654
Height = 565
Top = 3
Width = 530
Width = 535
ActiveControl = lstFav
Caption = 'Mini explorer'
ClientHeight = 654
ClientWidth = 530
ClientHeight = 565
ClientWidth = 535
inherited Back: TPanel
Height = 654
Width = 530
Height = 565
Width = 535
AutoSize = True
ClientHeight = 654
ClientWidth = 530
ClientHeight = 565
ClientWidth = 535
inherited Content: TPanel
Left = 4
Height = 612
Width = 522
Height = 523
Width = 527
BorderSpacing.Around = 4
ClientHeight = 612
ClientWidth = 522
ClientHeight = 523
ClientWidth = 527
object lstFav: TListView[0]
Left = 0
Height = 131
Top = 0
Width = 522
Width = 527
Align = alTop
Columns = <
item
Width = 520
Width = 525
end>
ReadOnly = True
ScrollBars = ssAutoBoth
@ -44,27 +44,27 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
Left = 0
Height = 6
Top = 131
Width = 522
Width = 527
Align = alTop
ResizeAnchor = akTop
end
object Panel2: TPanel[2]
Left = 0
Height = 475
Height = 386
Top = 137
Width = 522
Width = 527
Align = alClient
AutoSize = True
BevelOuter = bvNone
ClientHeight = 475
ClientWidth = 522
ClientHeight = 386
ClientWidth = 527
TabOrder = 2
object Splitter2: TSplitter
Cursor = crVSplit
Left = 0
Height = 6
Top = 218
Width = 522
Width = 527
Align = alTop
ResizeAnchor = akTop
end
@ -72,7 +72,7 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
Left = 0
Height = 218
Top = 0
Width = 522
Width = 527
Align = alTop
FileSortType = fstAlphabet
ReadOnly = True
@ -89,9 +89,9 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
end
object lstFiles: TShellListView
Left = 0
Height = 251
Height = 162
Top = 224
Width = 522
Width = 527
Align = alClient
Color = clDefault
DragMode = dmAutomatic
@ -108,7 +108,8 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
end
end
inherited toolbar: TCEToolBar
Width = 522
Width = 527
OnResize = toolbarResize
object btnEdit: TCEToolButton[0]
Left = 153
Hint = 'open the selected file in an editor or as a new project'
@ -181,7 +182,6 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
Flat = True
Align = alClient
BorderSpacing.Left = 180
BorderSpacing.Bottom = 2
BorderSpacing.Around = 2
MaxLength = 0
TabOrder = 0

View File

@ -95,6 +95,7 @@ type
procedure lstFilesFileAdded(Sender: TObject; Item: TListItem);
procedure lstFilterButtonClick(Sender: TObject);
procedure lstFilterKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure toolbarResize(Sender: TObject);
procedure TreeEnter(Sender: TObject);
procedure treeFoldersChange(Sender: TObject; Node: TTreeNode);
procedure treeFoldersDblClick(Sender: TObject);
@ -735,6 +736,11 @@ begin
filterFiles;
end;
procedure TCEMiniExplorerWidget.toolbarResize(Sender: TObject);
begin
lstFilter.Width := toolbar.Width - lstFilter.Left - lstFilter.BorderSpacing.Around;
end;
procedure TCEMiniExplorerWidget.shellOpenSelected;
var
fname: string = '';

View File

@ -2,31 +2,31 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
Left = 1443
Height = 258
Top = 213
Width = 376
Width = 424
ActiveControl = Tree
AllowDropFiles = True
Caption = 'Project inspector'
ClientHeight = 258
ClientWidth = 376
ClientWidth = 424
OnDropFiles = FormDropFiles
inherited Back: TPanel
Height = 258
Width = 376
Width = 424
AutoSize = True
ClientHeight = 258
ClientWidth = 376
ClientWidth = 424
inherited Content: TPanel
Height = 222
Top = 36
Width = 376
Width = 424
ClientHeight = 222
ClientWidth = 376
ClientWidth = 424
PopupMenu = nil
object Tree: TTreeView[0]
Left = 2
Height = 218
Top = 2
Width = 372
Width = 420
Align = alClient
AutoExpand = True
BorderSpacing.Around = 2
@ -51,11 +51,12 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
end
end
inherited toolbar: TCEToolBar
Width = 368
Width = 416
OnResize = toolbarResize
object btnRemFold: TCEToolButton[0]
Left = 1
Left = 113
Hint = 'remove the selected source parent folder from the project'
Top = 28
Top = 0
AutoSize = True
Caption = 'btnRemFold'
OnClick = btnRemFoldClick
@ -63,7 +64,7 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
scaledSeparator = False
end
object btnAddFold: TCEToolButton[1]
Left = 113
Left = 141
Hint = 'add a folder of sources to the project'
Top = 0
AutoSize = True
@ -93,11 +94,11 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
scaledSeparator = False
end
object TreeFilterEdit1: TTreeFilterEdit[4]
Left = 145
Left = 176
Height = 26
Hint = 'filter the source names that contain the text typed here'
Top = 2
Width = 221
Width = 232
ButtonWidth = 28
NumGlyphs = 1
Align = alClient

View File

@ -37,6 +37,7 @@ type
procedure btnTreeClick(Sender: TObject);
procedure btnReloadClick(Sender: TObject);
procedure FormDropFiles(Sender: TObject; const fnames: array of String);
procedure toolbarResize(Sender: TObject);
procedure TreeClick(Sender: TObject);
procedure TreeDeletion(Sender: TObject; Node: TTreeNode);
procedure TreeKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
@ -162,6 +163,7 @@ begin
Tree.Images := fImages;
Tree.PopupMenu := contextMenu;
TreeFilterEdit1.BorderSpacing.Left := ScaleX(filterAlign[false], 96);
toolbarResize(nil);
fname := getCoeditDocPath + optFname;
if fname.fileExists then
@ -321,7 +323,10 @@ begin
btnRemFold.Visible:= ce;
btnAddFile.Visible:= ce;
btnAddFold.Visible:= ce;
TreeFilterEdit1.BorderSpacing.Left := ScaleX(filterAlign[ce], 96);
toolbarResize(nil);
TreeFilterEdit1.BorderSpacing.Left:= 0;
TreeFilterEdit1.Left := ScaleX(filterAlign[ce], 96);
toolbarResize(nil);
end;
procedure TCEProjectInspectWidget.setFileListAsTree(value: boolean);
@ -618,6 +623,11 @@ begin
end;
end;
procedure TCEProjectInspectWidget.toolbarResize(Sender: TObject);
begin
TreeFilterEdit1.Width := toolbar.Width - TreeFilterEdit1.Left - TreeFilterEdit1.BorderSpacing.Around;
end;
procedure TCEProjectInspectWidget.updateDelayed;
begin
updateImperative;

View File

@ -1,29 +1,29 @@
inherited CESymbolListWidget: TCESymbolListWidget
Left = 1515
Left = 1322
Height = 430
Top = 270
Width = 382
Top = 92
Width = 308
Caption = 'Symbol list'
ClientHeight = 430
ClientWidth = 382
ClientWidth = 308
inherited Back: TPanel
Height = 430
Width = 382
Width = 308
AutoSize = True
ClientHeight = 430
ClientWidth = 382
ClientWidth = 308
inherited Content: TPanel
Height = 394
Top = 36
Width = 382
Width = 308
ClientHeight = 394
ClientWidth = 382
ClientWidth = 308
PopupMenu = nil
object Tree: TTreeView[0]
Left = 4
Height = 386
Top = 4
Width = 374
Width = 300
Align = alClient
BorderSpacing.Around = 4
HideSelection = False
@ -57,9 +57,10 @@ inherited CESymbolListWidget: TCESymbolListWidget
end
end
inherited toolbar: TCEToolBar
Width = 374
Width = 300
OnResize = toolbarResize
object btnRefresh: TCEToolButton[0]
Left = 372
Left = 1
Hint = 'refresh the symbol list'
Top = 0
AutoSize = True
@ -69,16 +70,17 @@ inherited CESymbolListWidget: TCESymbolListWidget
scaledSeparator = False
end
object TreeFilterEdit1: TTreeFilterEdit[1]
Left = 3
Left = 32
Height = 26
Hint = 'filter the symbols that contain the text typed here'
Top = 2
Width = 369
Width = 264
OnAfterFilter = TreeFilterEdit1AfterFilter
OnFilterItem = TreeFilterEdit1FilterItem
ButtonWidth = 28
NumGlyphs = 1
Align = alClient
BorderSpacing.Left = 30
BorderSpacing.Around = 2
MaxLength = 0
TabOrder = 0

View File

@ -102,11 +102,14 @@ type
procedure AssignTo(Dest: TPersistent); override;
end;
{ TCESymbolListWidget }
TCESymbolListWidget = class(TCEWidget, ICEDocumentObserver, ICEEditableOptions)
btnRefresh: TCEToolButton;
Tree: TTreeView;
TreeFilterEdit1: TTreeFilterEdit;
procedure btnRefreshClick(Sender: TObject);
procedure toolbarResize(Sender: TObject);
procedure TreeCompare(Sender: TObject; Node1, Node2: TTreeNode; var Compare: Integer);
procedure TreeFilterEdit1AfterFilter(Sender: TObject);
function TreeFilterEdit1FilterItem(Item: TObject; out Done: Boolean): Boolean;
@ -614,6 +617,11 @@ begin
fActRefresh.Execute;
end;
procedure TCESymbolListWidget.toolbarResize(Sender: TObject);
begin
TreeFilterEdit1.Width := toolbar.Width - TreeFilterEdit1.Left - TreeFilterEdit1.BorderSpacing.Around;
end;
procedure TCESymbolListWidget.TreeCompare(Sender: TObject; Node1,
Node2: TTreeNode; var Compare: Integer);
begin

View File

@ -29,32 +29,31 @@ inherited CETodoListWidget: TCETodoListWidget
item
AutoSize = True
Caption = 'text'
Width = 38
Width = 36
end
item
AutoSize = True
Caption = 'category'
Width = 69
Width = 67
end
item
AutoSize = True
Caption = 'assignee'
Width = 70
Width = 68
end
item
AutoSize = True
Caption = 'status'
Width = 52
end
item
AutoSize = True
Caption = 'priority'
Width = 59
Width = 57
end
item
AutoSize = True
Caption = 'file'
Width = 266
Width = 278
end>
ReadOnly = True
SortType = stText
@ -64,6 +63,7 @@ inherited CETodoListWidget: TCETodoListWidget
end
inherited toolbar: TCEToolBar
Width = 576
OnResize = toolbarResize
object btnGo: TCEToolButton[0]
Left = 29
Hint = 'go the TODO item definition'

View File

@ -83,6 +83,7 @@ type
mnuAutoRefresh: TMenuItem;
procedure handleListClick(Sender: TObject);
procedure mnuAutoRefreshClick(Sender: TObject);
procedure toolbarResize(Sender: TObject);
private
fAutoRefresh: Boolean;
fSingleClick: Boolean;
@ -577,6 +578,11 @@ begin
fOptions.autoRefresh := autoRefresh;
end;
procedure TCETodoListWidget.toolbarResize(Sender: TObject);
begin
lstfilter.Width := toolbar.Width - lstfilter.Left - lstfilter.BorderSpacing.Around;
end;
procedure TCETodoListWidget.lstItemsColumnClick(Sender: TObject; Column: TListColumn);
var
curr: TListItem;