From ea85c973500e9b1992e6cc878a66babd880ea675 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Fri, 12 Dec 2014 05:36:29 +0100 Subject: [PATCH] fix, splitter bug on realign --- src/ce_projconf.lfm | 149 +++++++++++++++++++++-------------------- src/ce_projconf.pas | 4 ++ src/ce_toolseditor.lfm | 107 +++++++++++++++-------------- src/ce_toolseditor.pas | 7 ++ 4 files changed, 147 insertions(+), 120 deletions(-) diff --git a/src/ce_projconf.lfm b/src/ce_projconf.lfm index 8083d040..9617e767 100644 --- a/src/ce_projconf.lfm +++ b/src/ce_projconf.lfm @@ -1,60 +1,22 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget - Left = 1394 - Height = 383 - Top = 480 + Left = 1429 + Height = 273 + Top = 30 Width = 445 Caption = 'Project configuration' - ClientHeight = 383 + ClientHeight = 273 ClientWidth = 445 inherited Back: TPanel - Height = 383 + Height = 273 Width = 445 - ClientHeight = 383 + ClientHeight = 273 ClientWidth = 445 inherited Content: TPanel - Height = 383 + Height = 273 Width = 445 - ClientHeight = 383 + ClientHeight = 273 ClientWidth = 445 - object Tree: TTreeView[0] - Left = 4 - Height = 349 - Hint = 'filter configuration elements' - Top = 30 - Width = 125 - Align = alLeft - AutoExpand = True - BorderSpacing.Left = 4 - BorderSpacing.Top = 4 - BorderSpacing.Bottom = 4 - DefaultItemHeight = 18 - HideSelection = False - ReadOnly = True - ScrollBars = ssAutoBoth - ShowRoot = False - TabOrder = 0 - OnChange = TreeChange - Options = [tvoAutoExpand, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoToolTips, tvoThemedDraw] - Items.Data = { - F9FFFFFF020003000000FFFFFFFFFFFFFFFF01000000FFFFFFFF000000000000 - 0000000700000047656E6572616CFFFFFFFFFFFFFFFF02000000FFFFFFFF0900 - 000000000000010A00000043617465676F72696573FFFFFFFFFFFFFFFF020000 - 00FFFFFFFF000000000000000000080000004D65737361676573FFFFFFFFFFFF - FFFF03000000FFFFFFFF00000000000000000009000000446562756767696E67 - FFFFFFFFFFFFFFFF04000000FFFFFFFF0000000000000000000D000000446F63 - 756D656E746174696F6EFFFFFFFFFFFFFFFF05000000FFFFFFFF000000000000 - 000000060000004F7574707574FFFFFFFFFFFFFFFF06000000FFFFFFFF000000 - 000000000000060000004F7468657273FFFFFFFFFFFFFFFF07000000FFFFFFFF - 000000000000000000050000005061746873FFFFFFFFFFFFFFFF08000000FFFF - FFFF000000000000000000110000005072652D6275696C642070726F63657373 - FFFFFFFFFFFFFFFF09000000FFFFFFFF00000000000000000012000000506F73 - 742D6275696C642070726F63657373FFFFFFFFFFFFFFFF0A000000FFFFFFFF00 - 00000000000000000B00000052756E206F7074696F6E73FFFFFFFFFFFFFFFF0B - 000000FFFFFFFF0000000000000000000E000000416C6C2063617465676F7269 - 6573 - } - end - object Panel1: TPanel[1] + object Panel1: TPanel[0] Left = 4 Height = 24 Top = 2 @@ -66,7 +28,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget BevelOuter = bvNone ClientHeight = 24 ClientWidth = 437 - TabOrder = 1 + TabOrder = 0 object selConf: TComboBox Left = 0 Height = 23 @@ -220,39 +182,84 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget ShowCaption = False end end - object Splitter1: TSplitter[2] - Left = 129 - Height = 355 - Top = 28 - Width = 5 - end - object Grid: TTIPropertyGrid[3] - Left = 134 - Height = 349 + object Panel2: TPanel[1] + Left = 4 + Height = 239 Top = 30 - Width = 307 + Width = 437 Align = alClient - BorderSpacing.Top = 4 - BorderSpacing.Right = 4 - BorderSpacing.Bottom = 4 - DefaultValueFont.Color = clWindowText - Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper] - Indent = 16 - NameFont.Color = clWindowText - OnEditorFilter = GridEditorFilter - PreferredSplitterX = 145 - SplitterX = 145 - ValueFont.Color = clGreen + BorderSpacing.Around = 4 + BevelOuter = bvNone + ClientHeight = 239 + ClientWidth = 437 + TabOrder = 1 + object Tree: TTreeView + Left = 0 + Height = 239 + Hint = 'filter configuration elements' + Top = 0 + Width = 160 + Align = alLeft + AutoExpand = True + DefaultItemHeight = 18 + HideSelection = False + ReadOnly = True + ScrollBars = ssAutoBoth + ShowRoot = False + TabOrder = 0 + OnChange = TreeChange + Options = [tvoAutoExpand, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoToolTips, tvoThemedDraw] + Items.Data = { + F9FFFFFF020003000000FFFFFFFFFFFFFFFF01000000FFFFFFFF000000000000 + 0000000700000047656E6572616CFFFFFFFFFFFFFFFF02000000FFFFFFFF0900 + 000000000000010A00000043617465676F72696573FFFFFFFFFFFFFFFF020000 + 00FFFFFFFF000000000000000000080000004D65737361676573FFFFFFFFFFFF + FFFF03000000FFFFFFFF00000000000000000009000000446562756767696E67 + FFFFFFFFFFFFFFFF04000000FFFFFFFF0000000000000000000D000000446F63 + 756D656E746174696F6EFFFFFFFFFFFFFFFF05000000FFFFFFFF000000000000 + 000000060000004F7574707574FFFFFFFFFFFFFFFF06000000FFFFFFFF000000 + 000000000000060000004F7468657273FFFFFFFFFFFFFFFF07000000FFFFFFFF + 000000000000000000050000005061746873FFFFFFFFFFFFFFFF08000000FFFF + FFFF000000000000000000110000005072652D6275696C642070726F63657373 + FFFFFFFFFFFFFFFF09000000FFFFFFFF00000000000000000012000000506F73 + 742D6275696C642070726F63657373FFFFFFFFFFFFFFFF0A000000FFFFFFFF00 + 00000000000000000B00000052756E206F7074696F6E73FFFFFFFFFFFFFFFF0B + 000000FFFFFFFF0000000000000000000E000000416C6C2063617465676F7269 + 6573 + } + end + object Splitter1: TSplitter + Left = 160 + Height = 239 + Top = 0 + Width = 5 + AutoSnap = False + end + object Grid: TTIPropertyGrid + Left = 165 + Height = 239 + Top = 0 + Width = 272 + Align = alClient + DefaultValueFont.Color = clWindowText + Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper] + Indent = 16 + NameFont.Color = clWindowText + OnEditorFilter = GridEditorFilter + PreferredSplitterX = 145 + SplitterX = 145 + ValueFont.Color = clGreen + end end end end inherited contextMenu: TPopupMenu left = 8 - top = 240 + top = 8 end object imgList: TImageList[2] left = 40 - top = 240 + top = 8 Bitmap = { 4C690200000010000000100000008D8B89008D8B89008F8D8B008F8D8B008C8A 880092908E00908E8CFF8F8D8BFF908E8CFF92908E008F8D8B008F8D8B008F8D diff --git a/src/ce_projconf.pas b/src/ce_projconf.pas index ef299bf6..14f17629 100644 --- a/src/ce_projconf.pas +++ b/src/ce_projconf.pas @@ -10,8 +10,12 @@ uses ce_dmdwrap, ce_project, ce_widget, ce_interfaces, ce_observer; type + + { TCEProjectConfigurationWidget } + TCEProjectConfigurationWidget = class(TCEWidget, ICEProjectObserver) imgList: TImageList; + Panel2: TPanel; selConf: TComboBox; Panel1: TPanel; btnAddConf: TSpeedButton; diff --git a/src/ce_toolseditor.lfm b/src/ce_toolseditor.lfm index 9e8e0aed..144449e6 100644 --- a/src/ce_toolseditor.lfm +++ b/src/ce_toolseditor.lfm @@ -1,31 +1,31 @@ inherited CEToolsEditorWidget: TCEToolsEditorWidget - Left = 842 - Height = 398 - Top = 274 - Width = 415 + Left = 1428 + Height = 280 + Top = 345 + Width = 441 Caption = 'Tools editor' - ClientHeight = 398 - ClientWidth = 415 + ClientHeight = 280 + ClientWidth = 441 inherited Back: TPanel - Height = 398 - Width = 415 - ClientHeight = 398 - ClientWidth = 415 + Height = 280 + Width = 441 + ClientHeight = 280 + ClientWidth = 441 inherited Content: TPanel - Height = 398 - Width = 415 - ClientHeight = 398 - ClientWidth = 415 + Height = 280 + Width = 441 + ClientHeight = 280 + ClientWidth = 441 object Panel1: TPanel[0] Left = 4 Height = 24 Top = 4 - Width = 407 + Width = 433 Align = alTop BorderSpacing.Around = 4 BevelOuter = bvNone ClientHeight = 24 - ClientWidth = 407 + ClientWidth = 433 TabOrder = 0 object BtnAddTool: TBitBtn Left = 0 @@ -124,7 +124,7 @@ inherited CEToolsEditorWidget: TCEToolsEditorWidget TabOrder = 1 end object btnRun: TBitBtn - Left = 379 + Left = 405 Height = 24 Hint = 'execute selected tool' Top = 0 @@ -266,43 +266,52 @@ inherited CEToolsEditorWidget: TCEToolsEditorWidget TabOrder = 4 end end - object propsEd: TTIPropertyGrid[1] - Left = 169 - Height = 362 - Top = 32 - Width = 242 - Align = alClient - BorderSpacing.Right = 4 - BorderSpacing.Bottom = 4 - DefaultValueFont.Color = clWindowText - Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper] - Indent = 16 - NameFont.Color = clWindowText - OnModified = propsEdModified - ValueFont.Color = clMaroon - end - object Splitter1: TSplitter[2] - Left = 164 - Height = 366 - Top = 32 - Width = 5 - end - object lstTools: TListBox[3] + object Panel2: TPanel[1] Left = 4 - Height = 362 + Height = 244 Top = 32 - Width = 160 - Align = alLeft - BorderSpacing.Left = 4 - BorderSpacing.Bottom = 4 - ItemHeight = 0 - OnSelectionChange = lstToolsSelectionChange - TabOrder = 3 + Width = 433 + Align = alClient + BorderSpacing.Around = 4 + BevelOuter = bvNone + ClientHeight = 244 + ClientWidth = 433 + TabOrder = 1 + OnClick = Panel2Click + object lstTools: TListBox + Left = 0 + Height = 244 + Top = 0 + Width = 160 + Align = alLeft + ItemHeight = 0 + OnSelectionChange = lstToolsSelectionChange + TabOrder = 0 + end + object Splitter1: TSplitter + Left = 160 + Height = 244 + Top = 0 + Width = 5 + end + object propsEd: TTIPropertyGrid + Left = 165 + Height = 244 + Top = 0 + Width = 268 + Align = alClient + DefaultValueFont.Color = clWindowText + Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper] + Indent = 16 + NameFont.Color = clWindowText + OnModified = propsEdModified + ValueFont.Color = clMaroon + end end end end inherited contextMenu: TPopupMenu - left = 40 - top = 56 + left = 16 + top = 40 end end diff --git a/src/ce_toolseditor.pas b/src/ce_toolseditor.pas index ac4be99e..4f7dbfce 100644 --- a/src/ce_toolseditor.pas +++ b/src/ce_toolseditor.pas @@ -19,6 +19,7 @@ type btnRun: TBitBtn; lstTools: TListBox; Panel1: TPanel; + Panel2: TPanel; Splitter1: TSplitter; propsEd: TTIPropertyGrid; procedure BtnAddToolClick(Sender: TObject); @@ -27,6 +28,7 @@ type procedure btnMoveDownClick(Sender: TObject); procedure btnRunClick(Sender: TObject); procedure lstToolsSelectionChange(Sender: TObject; User: boolean); + procedure Panel2Click(Sender: TObject); procedure propsEdModified(Sender: TObject); private procedure DataToGui; @@ -74,6 +76,11 @@ begin propsEd.TIObject := CustomTools.tool[lstTools.ItemIndex]; end; +procedure TCEToolsEditorWidget.Panel2Click(Sender: TObject); +begin + +end; + procedure TCEToolsEditorWidget.propsEdModified(Sender: TObject); begin if propsEd.ItemIndex = -1 then