View Issue Details

IDProjectCategoryView StatusLast Update
0035443LazarusIDEpublic2020-06-06 20:31
ReporterPhemtik Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Product Version2.1 (SVN) 
Summary0035443: [Redesign] Options -> Editor -> Display -> Colors
DescriptionRedesign of Options -> Editor -> Display -> Colors

Changes / Features

- the Design is more in line with the other option frames
- all functions have labels or it is written on them what they do
- comboboxes resize on content text
- Priorities resize with frame size
TagsNo tags attached.
Fixed in Revision
LazTarget-
Widgetset
Attached Files

Activities

Phemtik

2019-04-25 17:04

reporter  

0001-redesign-of-Tools-Display-Colors.patch (95,360 bytes)   
---
 ide/frames/editor_color_options.lfm | 1670 +++++++++++++++------------
 ide/frames/editor_color_options.pas |  492 ++++----
 2 files changed, 1159 insertions(+), 1003 deletions(-)

diff --git a/ide/frames/editor_color_options.lfm b/ide/frames/editor_color_options.lfm
index a4dce0d980..7433644787 100644
--- a/ide/frames/editor_color_options.lfm
+++ b/ide/frames/editor_color_options.lfm
@@ -1,744 +1,859 @@
 object EditorColorOptionsFrame: TEditorColorOptionsFrame
   Left = 0
-  Height = 443
+  Height = 671
   Top = 0
-  Width = 640
-  ClientHeight = 443
-  ClientWidth = 640
+  Width = 564
+  ClientHeight = 671
+  ClientWidth = 564
+  OnResize = FrameResize
   TabOrder = 0
   Visible = False
-  DesignLeft = 401
-  DesignTop = 103
+  DesignLeft = 1110
+  DesignTop = 224
   object pnlElementAttributes: TPanel
     AnchorSideLeft.Control = Owner
-    AnchorSideTop.Control = PnlTop2
     AnchorSideTop.Side = asrBottom
     AnchorSideRight.Control = Owner
     AnchorSideRight.Side = asrBottom
     AnchorSideBottom.Control = Owner
     AnchorSideBottom.Side = asrBottom
     Left = 0
-    Height = 192
-    Top = 251
-    Width = 640
+    Height = 390
+    Top = 281
+    Width = 564
     Anchors = [akLeft, akRight, akBottom]
     AutoSize = True
+    BorderSpacing.Top = 6
     BevelOuter = bvNone
-    ClientHeight = 192
-    ClientWidth = 640
-    Constraints.MinHeight = 192
-    TabOrder = 1
+    ClientHeight = 390
+    ClientWidth = 564
+    TabOrder = 0
     object bvlAttributeSection: TDividerBevel
       Left = 0
-      Height = 15
+      Height = 19
       Top = 0
-      Width = 640
+      Width = 564
       Caption = 'bvlAttributeSection'
       Align = alTop
       Font.Style = [fsBold]
       ParentFont = False
     end
-    object ToolBar1: TToolBar
-      Left = 3
-      Height = 24
-      Top = 15
-      Width = 634
+    object tglSchemeLayer: TToggleBox
+      AnchorSideLeft.Control = pnlElementAttributes
+      AnchorSideTop.Control = bvlAttributeSection
+      AnchorSideTop.Side = asrBottom
+      Left = 6
+      Height = 39
+      Top = 25
+      Width = 127
       AutoSize = True
-      BorderSpacing.Left = 3
-      BorderSpacing.Right = 3
-      Caption = 'ToolBar1'
-      EdgeBorders = [ebBottom]
-      ParentShowHint = False
-      ShowCaptions = True
-      ShowHint = True
+      BorderSpacing.Left = 6
+      BorderSpacing.Top = 6
+      Caption = 'tglSchemeLayer'
+      Checked = True
+      OnClick = tglGlobalChange
+      State = cbChecked
       TabOrder = 0
-      object tbtnGlobal: TToolButton
-        Tag = 1
-        Left = 1
-        Top = 0
-        AutoSize = True
-        Caption = 'tbtnGlobal'
-        Down = True
-        Grouped = True
-        OnClick = tglGlobalChange
-        Style = tbsCheck
-      end
-      object tbtnLocal: TToolButton
-        Tag = 1
-        Left = 65
-        Top = 0
-        AutoSize = True
-        Caption = 'tbtnLocal'
-        Grouped = True
-        OnClick = tglGlobalChange
-        Style = tbsCheck
-      end
-      object SetAttributeToDefaultButton: TToolButton
-        Left = 245
-        Top = 0
-        OnClick = SetAttributeToDefaultButtonClick
-        ShowCaption = False
-      end
-      object ToolButton3: TToolButton
-        Left = 237
-        Height = 22
-        Top = 0
-        Caption = 'ToolButton3'
-        Style = tbsSeparator
-      end
-      object ToolButton1: TToolButton
-        Left = 123
-        Height = 22
-        Top = 0
-        Caption = 'ToolButton1'
-        Style = tbsSeparator
-      end
-      object tbnColor: TToolButton
-        Left = 131
-        Top = 0
-        AutoSize = True
-        Caption = 'tbnColor'
-        Down = True
-        Grouped = True
-        OnClick = tbnColorClick
-        Style = tbsCheck
-      end
-      object tbnPrior: TToolButton
-        Left = 186
-        Top = 0
-        AutoSize = True
-        Caption = 'tbnPrior'
-        Grouped = True
-        OnClick = tbnColorClick
-        Style = tbsCheck
-      end
     end
-    inline SynColorAttrEditor1: TSynColorAttrEditor
+    object PageControl1: TPageControl
       AnchorSideLeft.Control = pnlElementAttributes
-      AnchorSideTop.Control = ToolBar1
+      AnchorSideTop.Control = tglSchemeLayer
       AnchorSideTop.Side = asrBottom
-      AnchorSideRight.Control = bvlAttributeSection
+      AnchorSideRight.Control = pnlElementAttributes
       AnchorSideRight.Side = asrBottom
       AnchorSideBottom.Control = pnlElementAttributes
       AnchorSideBottom.Side = asrBottom
-      Height = 153
-      Top = 39
-      Width = 640
+      Left = 0
+      Height = 320
+      Top = 70
+      Width = 564
+      ActivePage = tbsColorEditor
       Anchors = [akTop, akLeft, akRight, akBottom]
-      ClientHeight = 153
-      ClientWidth = 640
+      BorderSpacing.Top = 6
+      TabIndex = 0
       TabOrder = 1
-      inherited ForeGroundLabel: TLabel
-        Top = 7
-        Width = 91
-      end
-      inherited BackGroundLabel: TLabel
-        Top = 32
-        Width = 93
-      end
-      inherited ForeGroundUseDefaultCheckBox: TCheckBox
-        AnchorSideLeft.Control = SynColorAttrEditor1
-        Height = 19
-        Width = 192
-      end
-      inherited ForegroundColorBox: TColorBox
-        AnchorSideTop.Control = SynColorAttrEditor1
-        AnchorSideRight.Control = SynColorAttrEditor1
-        Left = 204
-        Height = 22
-        Width = 200
-      end
-      inherited BackGroundColorBox: TColorBox
-        AnchorSideRight.Control = SynColorAttrEditor1
-        Left = 204
-        Height = 22
-        Top = 28
-        Width = 200
-      end
-      inherited BackGroundUseDefaultCheckBox: TCheckBox
-        AnchorSideLeft.Control = SynColorAttrEditor1
-        Height = 19
-        Top = 30
-        Width = 194
-      end
-      inherited FrameColorBox: TColorBox
-        AnchorSideRight.Control = SynColorAttrEditor1
-        Left = 204
-        Height = 22
-        Top = 53
-        Width = 200
-      end
-      inherited FrameColorUseDefaultCheckBox: TCheckBox
-        AnchorSideLeft.Control = SynColorAttrEditor1
-        Height = 19
-        Top = 55
-        Width = 191
-      end
-      inherited pnlUnderline: TPanel
-        AnchorSideLeft.Control = SynColorAttrEditor1
-        Height = 40
-        Top = 102
-        Width = 145
-        ClientHeight = 40
-        ClientWidth = 145
-        inherited TextUnderlineRadioPanel: TPanel
-          Height = 21
-          Top = 19
-          Width = 134
-          ClientHeight = 21
-          ClientWidth = 134
-          inherited TextUnderlineRadioOn: TRadioButton
+      OnChange = tbnColorClick
+      object tbsColorEditor: TTabSheet
+        Caption = 'tbsColorEditor'
+        ClientHeight = 281
+        ClientWidth = 558
+        inline SynColorAttrEditor1: TSynColorAttrEditor
+          AnchorSideLeft.Control = tbsColorEditor
+          AnchorSideTop.Control = tbsColorEditor
+          AnchorSideRight.Control = tbsColorEditor
+          AnchorSideRight.Side = asrBottom
+          AnchorSideBottom.Control = tbsColorEditor
+          AnchorSideBottom.Side = asrBottom
+          Height = 281
+          Width = 558
+          HorzScrollBar.Page = 622
+          HorzScrollBar.Range = 622
+          VertScrollBar.Page = 243
+          VertScrollBar.Range = 243
+          Anchors = [akTop, akLeft, akRight]
+          AutoSize = True
+          ClientHeight = 281
+          ClientWidth = 558
+          Constraints.MinHeight = 0
+          inherited ForeGroundLabel: TLabel
             Height = 19
-            Width = 36
+            Top = 13
+            Width = 116
           end
-          inherited TextUnderlineRadioOff: TRadioButton
-            Left = 43
+          inherited BackGroundLabel: TLabel
             Height = 19
-            Width = 37
+            Top = 55
+            Width = 117
           end
-          inherited TextUnderlineRadioInvert: TRadioButton
-            Left = 83
-            Height = 19
-            Width = 50
+          inherited ForeGroundUseDefaultCheckBox: TCheckBox
+            AnchorSideLeft.Control = SynColorAttrEditor1
+            Height = 32
+            Top = 6
+            Width = 253
           end
-        end
-        inherited TextUnderlineCheckBox: TCheckBox
-          Height = 19
-          Width = 145
-        end
-      end
-      inherited pnlBold: TPanel
-        Left = 157
-        Height = 40
-        Top = 102
-        Width = 134
-        ClientHeight = 40
-        ClientWidth = 134
-        inherited TextBoldRadioPanel: TPanel
-          Height = 21
-          Top = 19
-          Width = 134
-          ClientHeight = 21
-          ClientWidth = 134
-          inherited TextBoldRadioInvert: TRadioButton
-            Left = 83
+          inherited ForegroundColorBox: TColorBox
+            AnchorSideTop.Control = SynColorAttrEditor1
+            AnchorSideRight.Control = SynColorAttrEditor1
+            Left = 265
+            Height = 39
+          end
+          inherited BackGroundColorBox: TColorBox
+            AnchorSideRight.Control = SynColorAttrEditor1
+            Left = 265
+            Height = 39
+            Top = 45
+            OnChange = nil
+          end
+          inherited BackGroundUseDefaultCheckBox: TCheckBox
+            AnchorSideLeft.Control = SynColorAttrEditor1
+            Height = 32
+            Top = 48
+            Width = 254
+          end
+          inherited FrameColorBox: TColorBox
+            AnchorSideRight.Control = SynColorAttrEditor1
+            Left = 265
+            Height = 39
+            Top = 87
+          end
+          inherited FrameColorUseDefaultCheckBox: TCheckBox
+            AnchorSideLeft.Control = SynColorAttrEditor1
+            Height = 32
+            Top = 90
+            Width = 253
+          end
+          inherited pnlUnderline: TPanel
+            AnchorSideLeft.Control = SynColorAttrEditor1
+            Height = 64
+            Top = 213
+            Width = 192
+            ClientHeight = 64
+            ClientWidth = 192
+            inherited TextUnderlineRadioPanel: TPanel
+              Height = 32
+              Top = 32
+              Width = 189
+              BevelInner = bvNone
+              ClientHeight = 32
+              ClientWidth = 189
+              inherited TextUnderlineRadioOn: TRadioButton
+                Left = 3
+                Height = 32
+                Top = 0
+                Width = 53
+              end
+              inherited TextUnderlineRadioOff: TRadioButton
+                Left = 59
+                Height = 32
+                Top = 0
+                Width = 55
+              end
+              inherited TextUnderlineRadioInvert: TRadioButton
+                Left = 117
+                Height = 32
+                Top = 0
+                Width = 72
+              end
+            end
+            inherited TextUnderlineCheckBox: TCheckBox
+              Height = 32
+              Width = 192
+            end
+          end
+          inherited pnlBold: TPanel
+            Left = 204
+            Height = 64
+            Top = 213
+            Width = 189
+            ClientHeight = 64
+            ClientWidth = 189
+            inherited TextBoldRadioPanel: TPanel
+              Height = 32
+              Top = 32
+              Width = 189
+              BevelInner = bvNone
+              ClientHeight = 32
+              ClientWidth = 189
+              inherited TextBoldRadioInvert: TRadioButton
+                Left = 117
+                Height = 32
+                Top = 0
+                Width = 72
+              end
+              inherited TextBoldRadioOn: TRadioButton
+                Left = 3
+                Height = 32
+                Top = 0
+                Width = 53
+              end
+              inherited TextBoldRadioOff: TRadioButton
+                Left = 59
+                Height = 32
+                Top = 0
+                Width = 55
+              end
+            end
+            inherited TextBoldCheckBox: TCheckBox
+              Height = 32
+              Width = 158
+            end
+          end
+          inherited pnlItalic: TPanel
+            Left = 399
+            Height = 64
+            Top = 213
+            Width = 189
+            ClientHeight = 64
+            ClientWidth = 189
+            inherited TextItalicRadioPanel: TPanel
+              Height = 32
+              Top = 32
+              Width = 189
+              BevelInner = bvNone
+              ClientHeight = 32
+              ClientWidth = 189
+              inherited TextItalicRadioInvert: TRadioButton
+                Left = 117
+                Height = 32
+                Top = 0
+                Width = 72
+              end
+              inherited TextItalicRadioOn: TRadioButton
+                Left = 3
+                Height = 32
+                Top = 0
+                Width = 53
+              end
+              inherited TextItalicRadioOff: TRadioButton
+                Left = 59
+                Height = 32
+                Top = 0
+                Width = 55
+              end
+            end
+            inherited TextItalicCheckBox: TCheckBox
+              Height = 32
+              Width = 160
+            end
+          end
+          inherited FrameStyleBox: TComboBox
+            Left = 368
+            Height = 39
+            Top = 129
+          end
+          inherited FrameEdgesBox: TComboBox
+            Left = 265
+            Height = 39
+            Top = 129
+          end
+          inherited ColumnPosBevel: TPanel
+            Left = 265
+            Top = 280
+          end
+          inherited ForeAlphaLabel: TLabel
+            Left = 475
             Height = 19
-            Width = 50
+            Top = 13
+            Width = 105
           end
-          inherited TextBoldRadioOn: TRadioButton
+          inherited BackAlphaLabel: TLabel
+            Left = 475
             Height = 19
-            Width = 36
+            Top = 55
+            Width = 106
           end
-          inherited TextBoldRadioOff: TRadioButton
-            Left = 43
+          inherited FrameAlphaLabel: TLabel
+            Left = 475
             Height = 19
-            Width = 37
+            Top = 97
+            Width = 118
           end
-        end
-        inherited TextBoldCheckBox: TCheckBox
-          Height = 19
-          Width = 118
-        end
-      end
-      inherited pnlItalic: TPanel
-        Left = 297
-        Height = 40
-        Top = 102
-        Width = 134
-        ClientHeight = 40
-        ClientWidth = 134
-        inherited TextItalicRadioPanel: TPanel
-          Height = 21
-          Top = 19
-          Width = 134
-          ClientHeight = 21
-          ClientWidth = 134
-          inherited TextItalicRadioInvert: TRadioButton
-            Left = 83
+          inherited ForeAlphaSpin: TSpinEdit
+            Left = 586
+            Height = 39
+          end
+          inherited BackAlphaSpin: TSpinEdit
+            Left = 587
+            Height = 39
+            Top = 45
+          end
+          inherited FrameAlphaSpin: TSpinEdit
+            Left = 599
+            Height = 39
+            Top = 87
+          end
+          inherited ForePriorLabel: TLabel
+            Left = 661
             Height = 19
-            Width = 50
+            Top = 13
+            Width = 100
           end
-          inherited TextItalicRadioOn: TRadioButton
+          inherited BackPriorLabel: TLabel
+            Left = 662
             Height = 19
-            Width = 36
+            Top = 55
+            Width = 101
           end
-          inherited TextItalicRadioOff: TRadioButton
-            Left = 43
+          inherited FramePriorLabel: TLabel
+            Left = 674
             Height = 19
-            Width = 37
+            Top = 97
+            Width = 113
           end
-        end
-        inherited TextItalicCheckBox: TCheckBox
-          Height = 19
-          Width = 119
-        end
-      end
-      inherited FrameStyleBox: TComboBox
-        Left = 307
-        Height = 21
-        Top = 78
-      end
-      inherited FrameEdgesBox: TComboBox
-        Left = 204
-        Height = 21
-        Top = 78
-      end
-      inherited ColumnPosBevel: TPanel
-        Left = 204
-        Top = 145
-      end
-      inherited ForeAlphaLabel: TLabel
-        Left = 414
-        Top = 7
-        Width = 82
-      end
-      inherited BackAlphaLabel: TLabel
-        Left = 414
-        Top = 32
-        Width = 84
-      end
-      inherited FrameAlphaLabel: TLabel
-        Left = 414
-        Top = 57
-        Width = 92
-      end
-      inherited ForeAlphaSpin: TSpinEdit
-        Left = 502
-        Height = 23
-        Top = 3
-      end
-      inherited BackAlphaSpin: TSpinEdit
-        Left = 504
-        Height = 23
-        Top = 28
-      end
-      inherited FrameAlphaSpin: TSpinEdit
-        Left = 512
-        Height = 23
-        Top = 53
-      end
-      inherited ForePriorLabel: TLabel
-        Left = 567
-        Top = 7
-        Width = 76
-      end
-      inherited BackPriorLabel: TLabel
-        Left = 569
-        Top = 32
-        Width = 78
-      end
-      inherited FramePriorLabel: TLabel
-        Left = 577
-        Top = 57
-        Width = 86
-      end
-      inherited ForePriorSpin: TSpinEdit
-        Left = 649
-        Height = 23
-        Top = 3
-      end
-      inherited BackPriorSpin: TSpinEdit
-        Left = 653
-        Height = 23
-        Top = 28
-      end
-      inherited FramePriorSpin: TSpinEdit
-        Left = 669
-        Height = 23
-        Top = 53
-      end
-    end
-    object PriorityEditor: TPanel
-      AnchorSideLeft.Control = pnlElementAttributes
-      AnchorSideTop.Control = ToolBar1
-      AnchorSideTop.Side = asrBottom
-      AnchorSideRight.Control = pnlElementAttributes
-      AnchorSideRight.Side = asrBottom
-      AnchorSideBottom.Control = pnlElementAttributes
-      AnchorSideBottom.Side = asrBottom
-      Left = 0
-      Height = 153
-      Top = 39
-      Width = 640
-      Anchors = [akTop, akLeft, akRight, akBottom]
-      ClientHeight = 153
-      ClientWidth = 640
-      Constraints.MinHeight = 140
-      TabOrder = 2
-      object ForePriorPanel: TPanel
-        Left = 1
-        Height = 151
-        Top = 1
-        Width = 170
-        Align = alLeft
-        ClientHeight = 151
-        ClientWidth = 170
-        TabOrder = 0
-        object ForePriorLabel: TLabel
-          Left = 1
-          Height = 15
-          Top = 1
-          Width = 168
-          Align = alTop
-          Caption = 'ForePriorLabel'
-          ParentColor = False
-        end
-        object ForePriorList: TTreeView
-          Left = 1
-          Height = 102
-          Top = 16
-          Width = 168
-          Align = alClient
-          AutoExpand = True
-          ReadOnly = True
-          ScrollBars = ssAutoVertical
-          ShowButtons = False
-          ShowLines = False
-          ShowRoot = False
-          SortType = stData
-          TabOrder = 0
-          OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
-          OnClick = ForePriorListClick
-          OnCompare = ForePriorListCompare
-          Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
-          TreeLinePenStyle = psClear
-        end
-        object ForePriorValPanel: TPanel
-          Left = 1
-          Height = 31
-          Top = 119
-          Width = 168
-          Align = alBottom
-          AutoSize = True
-          BorderSpacing.Top = 1
-          BevelOuter = bvNone
-          ClientHeight = 31
-          ClientWidth = 168
-          TabOrder = 1
-          object ForePriorEdit: TEdit
-            AnchorSideRight.Control = ForePriorUpDown
-            Left = 1
-            Height = 23
-            Top = 0
-            Width = 147
-            Anchors = [akTop, akLeft, akRight]
-            BorderSpacing.Right = 3
-            OnEditingDone = ForePriorEditChange
-            OnKeyPress = ForePriorEditKeyPress
-            TabOrder = 0
-            Text = '0'
+          inherited ForePriorSpin: TSpinEdit
+            Left = 767
+            Height = 39
           end
-          object ForePriorUpDown: TUpDown
-            AnchorSideTop.Control = ForePriorValPanel
-            AnchorSideRight.Control = ForePriorValPanel
-            AnchorSideRight.Side = asrBottom
-            AnchorSideBottom.Control = ForePriorValPanel
-            AnchorSideBottom.Side = asrBottom
-            Left = 151
-            Height = 31
-            Top = 0
-            Width = 17
-            Anchors = [akTop, akRight, akBottom]
-            Min = 0
-            OnClick = ForePriorUpDownClick
-            Position = 0
-            TabOrder = 1
-            Wrap = False
+          inherited BackPriorSpin: TSpinEdit
+            Left = 769
+            Height = 39
+            Top = 45
           end
-        end
-      end
-      object BackPriorPanel: TPanel
-        Left = 177
-        Height = 151
-        Top = 1
-        Width = 170
-        Align = alLeft
-        BorderSpacing.Left = 6
-        ClientHeight = 151
-        ClientWidth = 170
-        TabOrder = 1
-        object BackPriorLabel: TLabel
-          Left = 1
-          Height = 15
-          Top = 1
-          Width = 168
-          Align = alTop
-          Caption = 'Label1'
-          ParentColor = False
-        end
-        object BackPriorList: TTreeView
-          Left = 1
-          Height = 102
-          Top = 16
-          Width = 168
-          Align = alClient
-          AutoExpand = True
-          ReadOnly = True
-          ScrollBars = ssAutoVertical
-          ShowButtons = False
-          ShowLines = False
-          ShowRoot = False
-          SortType = stData
-          TabOrder = 0
-          OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
-          OnClick = ForePriorListClick
-          OnCompare = ForePriorListCompare
-          Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
-          TreeLinePenStyle = psClear
-        end
-        object BackPriorValPanel: TPanel
-          Left = 1
-          Height = 31
-          Top = 119
-          Width = 168
-          Align = alBottom
-          AutoSize = True
-          BorderSpacing.Top = 1
-          BevelOuter = bvNone
-          ClientHeight = 31
-          ClientWidth = 168
-          TabOrder = 1
-          object BackPriorEdit: TEdit
-            AnchorSideRight.Control = BackPriorUpDown
-            Left = 0
-            Height = 23
-            Top = 0
-            Width = 148
-            Anchors = [akTop, akLeft, akRight]
-            BorderSpacing.Right = 3
-            OnEditingDone = ForePriorEditChange
-            OnKeyPress = ForePriorEditKeyPress
-            TabOrder = 0
-            Text = '0'
+          inherited FramePriorSpin: TSpinEdit
+            Left = 793
+            Height = 39
+            Top = 87
           end
-          object BackPriorUpDown: TUpDown
-            AnchorSideTop.Control = BackPriorValPanel
-            AnchorSideRight.Control = BackPriorValPanel
-            AnchorSideRight.Side = asrBottom
-            AnchorSideBottom.Control = BackPriorValPanel
-            AnchorSideBottom.Side = asrBottom
-            Left = 151
-            Height = 31
-            Top = 0
-            Width = 17
-            Anchors = [akTop, akRight, akBottom]
-            Min = 0
-            OnClick = ForePriorUpDownClick
-            Position = 0
-            TabOrder = 1
-            Wrap = False
+          inherited MarkupFoldColorUseDefaultCheckBox: TCheckBox
+            AnchorSideLeft.Control = SynColorAttrEditor1
+            Height = 32
+            Top = 174
+            Width = 288
+          end
+          inherited MarkupFoldColorBox: TColorBox
+            Left = 265
+            Height = 39
+            Top = 171
+          end
+          inherited MarkupFoldAlphaLabel: TLabel
+            Left = 475
+            Height = 19
+            Top = 181
+            Width = 153
+          end
+          inherited MarkupFoldAlphaSpin: TSpinEdit
+            Left = 634
+            Height = 39
+            Top = 171
+          end
+          inherited MarkupFoldStyleBox: TComboBox
+            Left = 705
+            Height = 39
+            Top = 174
           end
         end
       end
-      object FramePriorPanel: TPanel
-        Left = 353
-        Height = 151
-        Top = 1
-        Width = 170
-        Align = alLeft
-        BorderSpacing.Left = 6
-        ClientHeight = 151
-        ClientWidth = 170
-        TabOrder = 2
-        object FramePriorLabel: TLabel
-          Left = 1
-          Height = 15
-          Top = 1
-          Width = 168
-          Align = alTop
-          Caption = 'Label1'
-          ParentColor = False
-        end
-        object FramePriorList: TTreeView
-          Left = 1
-          Height = 102
-          Top = 16
-          Width = 168
-          Align = alClient
-          AutoExpand = True
-          ReadOnly = True
-          ScrollBars = ssAutoVertical
-          ShowButtons = False
-          ShowLines = False
-          ShowRoot = False
-          SortType = stData
-          TabOrder = 0
-          OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
-          OnClick = ForePriorListClick
-          OnCompare = ForePriorListCompare
-          Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
-          TreeLinePenStyle = psClear
-        end
-        object FramePriorValPanel: TPanel
-          Left = 1
-          Height = 31
-          Top = 119
-          Width = 168
-          Align = alBottom
-          AutoSize = True
-          BorderSpacing.Top = 1
+      object tbsPriorityEditor: TTabSheet
+        Caption = 'tbsPriorityEditor'
+        ClientHeight = 281
+        ClientWidth = 558
+        object PriorityEditor: TPanel
+          AnchorSideLeft.Control = tbsPriorityEditor
+          AnchorSideTop.Control = tbsPriorityEditor
+          AnchorSideRight.Control = tbsPriorityEditor
+          AnchorSideRight.Side = asrBottom
+          AnchorSideBottom.Control = tbsPriorityEditor
+          AnchorSideBottom.Side = asrBottom
+          Left = 0
+          Height = 156
+          Top = 0
+          Width = 558
+          Anchors = [akTop, akLeft, akRight, akBottom]
           BevelOuter = bvNone
-          ClientHeight = 31
-          ClientWidth = 168
-          TabOrder = 1
-          object FramePriorEdit: TEdit
-            AnchorSideRight.Control = FramePriorUpDown
+          ClientHeight = 156
+          ClientWidth = 558
+          TabOrder = 0
+          object ForePriorPanel: TPanel
+            AnchorSideLeft.Control = PriorityEditor
+            AnchorSideTop.Control = PriorityEditor
+            AnchorSideBottom.Control = PriorityEditor
+            AnchorSideBottom.Side = asrBottom
             Left = 0
-            Height = 23
+            Height = 156
             Top = 0
-            Width = 148
-            Anchors = [akTop, akLeft, akRight]
-            BorderSpacing.Right = 3
-            OnEditingDone = ForePriorEditChange
-            OnKeyPress = ForePriorEditKeyPress
+            Width = 123
+            Anchors = [akTop, akLeft, akBottom]
+            BevelOuter = bvNone
+            ClientHeight = 156
+            ClientWidth = 123
             TabOrder = 0
-            Text = '0'
+            object ForePriorLabel: TLabel
+              AnchorSideLeft.Control = ForePriorPanel
+              AnchorSideTop.Control = ForePriorPanel
+              AnchorSideRight.Control = ForePriorPanel
+              AnchorSideRight.Side = asrBottom
+              Left = 0
+              Height = 19
+              Top = 0
+              Width = 123
+              Anchors = [akTop, akLeft, akRight]
+              Caption = 'ForePriorLabel'
+              ParentColor = False
+            end
+            object ForePriorList: TTreeView
+              AnchorSideLeft.Control = ForePriorPanel
+              AnchorSideTop.Control = ForePriorLabel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = ForePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = ForePriorValPanel
+              Left = 0
+              Height = 98
+              Top = 19
+              Width = 123
+              Anchors = [akTop, akLeft, akRight, akBottom]
+              ReadOnly = True
+              ScrollBars = ssAutoVertical
+              ShowButtons = False
+              ShowLines = False
+              ShowRoot = False
+              SortType = stData
+              TabOrder = 0
+              OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
+              OnClick = ForePriorListClick
+              OnCompare = ForePriorListCompare
+              Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
+              TreeLinePenStyle = psClear
+            end
+            object ForePriorValPanel: TPanel
+              AnchorSideLeft.Control = ForePriorPanel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = ForePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = ForePriorPanel
+              AnchorSideBottom.Side = asrBottom
+              Left = 0
+              Height = 39
+              Top = 117
+              Width = 123
+              Anchors = [akLeft, akRight, akBottom]
+              AutoSize = True
+              BevelOuter = bvNone
+              ClientHeight = 39
+              ClientWidth = 123
+              TabOrder = 1
+              object ForePriorEdit: TEdit
+                AnchorSideLeft.Control = ForePriorValPanel
+                AnchorSideTop.Control = ForePriorValPanel
+                AnchorSideRight.Control = ForePriorUpDown
+                AnchorSideBottom.Side = asrBottom
+                Left = 0
+                Height = 39
+                Top = 0
+                Width = 103
+                Anchors = [akTop, akLeft, akRight]
+                BorderSpacing.Right = 3
+                OnEditingDone = ForePriorEditChange
+                OnKeyPress = ForePriorEditKeyPress
+                TabOrder = 0
+                Text = '0'
+              end
+              object ForePriorUpDown: TUpDown
+                AnchorSideTop.Control = ForePriorValPanel
+                AnchorSideRight.Control = ForePriorValPanel
+                AnchorSideRight.Side = asrBottom
+                AnchorSideBottom.Control = ForePriorValPanel
+                AnchorSideBottom.Side = asrBottom
+                Left = 106
+                Height = 39
+                Top = 0
+                Width = 17
+                Anchors = [akTop, akRight, akBottom]
+                Min = 0
+                OnClick = ForePriorUpDownClick
+                Position = 0
+                TabOrder = 1
+              end
+            end
           end
-          object FramePriorUpDown: TUpDown
-            AnchorSideTop.Control = FramePriorValPanel
-            AnchorSideRight.Control = FramePriorValPanel
-            AnchorSideRight.Side = asrBottom
-            AnchorSideBottom.Control = FramePriorValPanel
+          object BackPriorPanel: TPanel
+            AnchorSideLeft.Control = ForePriorPanel
+            AnchorSideLeft.Side = asrBottom
+            AnchorSideTop.Control = PriorityEditor
+            AnchorSideBottom.Control = PriorityEditor
             AnchorSideBottom.Side = asrBottom
-            Left = 151
-            Height = 31
+            Left = 129
+            Height = 156
             Top = 0
-            Width = 17
-            Anchors = [akTop, akRight, akBottom]
-            Min = 0
-            OnClick = ForePriorUpDownClick
-            Position = 0
+            Width = 123
+            Anchors = [akTop, akLeft, akBottom]
+            BorderSpacing.Left = 6
+            BevelOuter = bvNone
+            ClientHeight = 156
+            ClientWidth = 123
             TabOrder = 1
-            Wrap = False
+            object BackPriorLabel: TLabel
+              AnchorSideLeft.Control = BackPriorPanel
+              AnchorSideTop.Control = BackPriorPanel
+              AnchorSideRight.Control = BackPriorPanel
+              AnchorSideRight.Side = asrBottom
+              Left = 0
+              Height = 19
+              Top = 0
+              Width = 123
+              Anchors = [akTop, akLeft, akRight]
+              Caption = 'BackPriorLabel'
+              ParentColor = False
+            end
+            object BackPriorList: TTreeView
+              AnchorSideLeft.Control = BackPriorPanel
+              AnchorSideTop.Control = BackPriorLabel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = BackPriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = BackPriorValPanel
+              Left = 0
+              Height = 97
+              Top = 19
+              Width = 123
+              Anchors = [akTop, akLeft, akRight, akBottom]
+              ReadOnly = True
+              ScrollBars = ssAutoVertical
+              ShowButtons = False
+              ShowLines = False
+              ShowRoot = False
+              SortType = stData
+              TabOrder = 0
+              OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
+              OnClick = ForePriorListClick
+              OnCompare = ForePriorListCompare
+              Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
+              TreeLinePenStyle = psClear
+            end
+            object BackPriorValPanel: TPanel
+              AnchorSideLeft.Control = BackPriorPanel
+              AnchorSideTop.Control = BackPriorList
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = BackPriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = BackPriorPanel
+              AnchorSideBottom.Side = asrBottom
+              Left = 0
+              Height = 39
+              Top = 117
+              Width = 123
+              Anchors = [akLeft, akRight, akBottom]
+              AutoSize = True
+              BorderSpacing.Top = 1
+              BevelOuter = bvNone
+              ClientHeight = 39
+              ClientWidth = 123
+              TabOrder = 1
+              object BackPriorEdit: TEdit
+                AnchorSideLeft.Control = BackPriorValPanel
+                AnchorSideTop.Control = BackPriorValPanel
+                AnchorSideRight.Control = BackPriorUpDown
+                AnchorSideBottom.Side = asrBottom
+                Left = 0
+                Height = 39
+                Top = 0
+                Width = 103
+                Anchors = [akTop, akLeft, akRight]
+                BorderSpacing.Right = 3
+                OnEditingDone = ForePriorEditChange
+                OnKeyPress = ForePriorEditKeyPress
+                TabOrder = 0
+                Text = '0'
+              end
+              object BackPriorUpDown: TUpDown
+                AnchorSideTop.Control = BackPriorValPanel
+                AnchorSideRight.Control = BackPriorValPanel
+                AnchorSideRight.Side = asrBottom
+                AnchorSideBottom.Control = BackPriorValPanel
+                AnchorSideBottom.Side = asrBottom
+                Left = 106
+                Height = 39
+                Top = 0
+                Width = 17
+                Anchors = [akTop, akRight, akBottom]
+                Min = 0
+                OnClick = ForePriorUpDownClick
+                Position = 0
+                TabOrder = 1
+              end
+            end
           end
-        end
-      end
-      object StylePriorPanel: TPanel
-        Left = 529
-        Height = 151
-        Top = 1
-        Width = 170
-        Align = alLeft
-        BorderSpacing.Left = 6
-        ClientHeight = 151
-        ClientWidth = 170
-        TabOrder = 3
-        object StylePriorLabel: TLabel
-          Left = 1
-          Height = 15
-          Top = 1
-          Width = 168
-          Align = alTop
-          Caption = 'StylePriorLabel'
-          ParentColor = False
-        end
-        object StylePriorList: TTreeView
-          Left = 1
-          Height = 102
-          Top = 16
-          Width = 168
-          Align = alClient
-          AutoExpand = True
-          ReadOnly = True
-          ScrollBars = ssAutoVertical
-          ShowButtons = False
-          ShowLines = False
-          ShowRoot = False
-          SortType = stData
-          TabOrder = 0
-          OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
-          OnClick = ForePriorListClick
-          OnCompare = ForePriorListCompare
-          Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
-          TreeLinePenStyle = psClear
-        end
-        object StylePriorValPanel: TPanel
-          Left = 1
-          Height = 31
-          Top = 119
-          Width = 168
-          Align = alBottom
-          AutoSize = True
-          BorderSpacing.Top = 1
-          BevelOuter = bvNone
-          ClientHeight = 31
-          ClientWidth = 168
-          TabOrder = 1
-          object StylePriorEdit: TEdit
-            AnchorSideRight.Control = StylePriorUpDown
-            Left = 0
-            Height = 23
+          object FramePriorPanel: TPanel
+            AnchorSideLeft.Control = BackPriorPanel
+            AnchorSideLeft.Side = asrBottom
+            AnchorSideTop.Control = PriorityEditor
+            AnchorSideBottom.Control = PriorityEditor
+            AnchorSideBottom.Side = asrBottom
+            Left = 258
+            Height = 156
             Top = 0
-            Width = 148
-            Anchors = [akTop, akLeft, akRight]
-            BorderSpacing.Right = 3
-            OnEditingDone = ForePriorEditChange
-            OnKeyPress = ForePriorEditKeyPress
-            TabOrder = 0
-            Text = '0'
+            Width = 123
+            Anchors = [akTop, akLeft, akBottom]
+            BorderSpacing.Left = 6
+            BevelOuter = bvNone
+            ClientHeight = 156
+            ClientWidth = 123
+            TabOrder = 3
+            object FramePriorLabel: TLabel
+              AnchorSideLeft.Control = FramePriorPanel
+              AnchorSideTop.Control = FramePriorPanel
+              AnchorSideRight.Control = FramePriorPanel
+              AnchorSideRight.Side = asrBottom
+              Left = 0
+              Height = 19
+              Top = 0
+              Width = 123
+              Anchors = [akTop, akLeft, akRight]
+              Caption = 'FramePriorLabel'
+              ParentColor = False
+            end
+            object FramePriorList: TTreeView
+              AnchorSideLeft.Control = FramePriorPanel
+              AnchorSideTop.Control = FramePriorLabel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = FramePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = FramePriorValPanel
+              Left = 0
+              Height = 97
+              Top = 19
+              Width = 123
+              Anchors = [akTop, akLeft, akRight, akBottom]
+              ReadOnly = True
+              ScrollBars = ssAutoVertical
+              ShowButtons = False
+              ShowLines = False
+              ShowRoot = False
+              SortType = stData
+              TabOrder = 0
+              OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
+              OnClick = ForePriorListClick
+              OnCompare = ForePriorListCompare
+              Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
+              TreeLinePenStyle = psClear
+            end
+            object FramePriorValPanel: TPanel
+              AnchorSideLeft.Control = FramePriorPanel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = FramePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = FramePriorPanel
+              AnchorSideBottom.Side = asrBottom
+              Left = 0
+              Height = 39
+              Top = 117
+              Width = 123
+              Anchors = [akLeft, akRight, akBottom]
+              AutoSize = True
+              BorderSpacing.Top = 1
+              BevelOuter = bvNone
+              ClientHeight = 39
+              ClientWidth = 123
+              TabOrder = 1
+              object FramePriorEdit: TEdit
+                AnchorSideLeft.Control = FramePriorValPanel
+                AnchorSideTop.Control = FramePriorValPanel
+                AnchorSideRight.Control = FramePriorUpDown
+                AnchorSideBottom.Side = asrBottom
+                Left = 0
+                Height = 39
+                Top = 0
+                Width = 103
+                Anchors = [akTop, akLeft, akRight]
+                BorderSpacing.Right = 3
+                OnEditingDone = ForePriorEditChange
+                OnKeyPress = ForePriorEditKeyPress
+                TabOrder = 0
+                Text = '0'
+              end
+              object FramePriorUpDown: TUpDown
+                AnchorSideTop.Control = FramePriorValPanel
+                AnchorSideRight.Control = FramePriorValPanel
+                AnchorSideRight.Side = asrBottom
+                AnchorSideBottom.Control = FramePriorValPanel
+                AnchorSideBottom.Side = asrBottom
+                Left = 106
+                Height = 39
+                Top = 0
+                Width = 17
+                Anchors = [akTop, akRight, akBottom]
+                Min = 0
+                OnClick = ForePriorUpDownClick
+                Position = 0
+                TabOrder = 1
+              end
+            end
           end
-          object StylePriorUpDown: TUpDown
-            AnchorSideTop.Control = StylePriorValPanel
-            AnchorSideRight.Control = StylePriorValPanel
+          object StylePriorPanel: TPanel
+            AnchorSideLeft.Control = FramePriorPanel
+            AnchorSideLeft.Side = asrBottom
+            AnchorSideTop.Control = PriorityEditor
+            AnchorSideRight.Control = PriorityEditor
             AnchorSideRight.Side = asrBottom
-            AnchorSideBottom.Control = StylePriorValPanel
+            AnchorSideBottom.Control = PriorityEditor
             AnchorSideBottom.Side = asrBottom
-            Left = 151
-            Height = 31
+            Left = 387
+            Height = 156
             Top = 0
-            Width = 17
-            Anchors = [akTop, akRight, akBottom]
-            Min = 0
-            OnClick = ForePriorUpDownClick
-            Position = 0
-            TabOrder = 1
-            Wrap = False
+            Width = 171
+            Anchors = [akTop, akLeft, akRight, akBottom]
+            BorderSpacing.Left = 6
+            BevelOuter = bvNone
+            ClientHeight = 156
+            ClientWidth = 171
+            TabOrder = 2
+            object StylePriorLabel: TLabel
+              AnchorSideLeft.Control = StylePriorPanel
+              AnchorSideTop.Control = StylePriorPanel
+              AnchorSideRight.Control = StylePriorPanel
+              AnchorSideRight.Side = asrBottom
+              Left = 0
+              Height = 19
+              Top = 0
+              Width = 171
+              Anchors = [akTop, akLeft, akRight]
+              Caption = 'FramePriorLabel'
+              ParentColor = False
+            end
+            object StylePriorList: TTreeView
+              AnchorSideLeft.Control = StylePriorPanel
+              AnchorSideTop.Control = StylePriorLabel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = StylePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = StylePriorValPanel
+              Left = 0
+              Height = 97
+              Top = 19
+              Width = 171
+              Anchors = [akTop, akLeft, akRight, akBottom]
+              ReadOnly = True
+              ScrollBars = ssAutoVertical
+              ShowButtons = False
+              ShowLines = False
+              ShowRoot = False
+              SortType = stData
+              TabOrder = 0
+              OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
+              OnClick = ForePriorListClick
+              OnCompare = ForePriorListCompare
+              Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
+              TreeLinePenStyle = psClear
+            end
+            object StylePriorValPanel: TPanel
+              AnchorSideLeft.Control = StylePriorPanel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = StylePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = StylePriorPanel
+              AnchorSideBottom.Side = asrBottom
+              Left = 0
+              Height = 39
+              Top = 117
+              Width = 171
+              Anchors = [akLeft, akRight, akBottom]
+              AutoSize = True
+              BorderSpacing.Top = 1
+              BevelOuter = bvNone
+              ClientHeight = 39
+              ClientWidth = 171
+              TabOrder = 1
+              object StylePriorEdit: TEdit
+                AnchorSideLeft.Control = StylePriorValPanel
+                AnchorSideTop.Control = StylePriorValPanel
+                AnchorSideRight.Control = StylePriorUpDown
+                AnchorSideBottom.Side = asrBottom
+                Left = 0
+                Height = 39
+                Top = 0
+                Width = 151
+                Anchors = [akTop, akLeft, akRight]
+                BorderSpacing.Right = 3
+                OnEditingDone = ForePriorEditChange
+                OnKeyPress = ForePriorEditKeyPress
+                TabOrder = 0
+                Text = '0'
+              end
+              object StylePriorUpDown: TUpDown
+                AnchorSideTop.Control = StylePriorValPanel
+                AnchorSideRight.Control = StylePriorValPanel
+                AnchorSideRight.Side = asrBottom
+                AnchorSideBottom.Control = StylePriorValPanel
+                AnchorSideBottom.Side = asrBottom
+                Left = 154
+                Height = 39
+                Top = 0
+                Width = 17
+                Anchors = [akTop, akRight, akBottom]
+                Min = 0
+                OnClick = ForePriorUpDownClick
+                Position = 0
+                TabOrder = 1
+              end
+            end
           end
         end
       end
     end
+    object btnSetAttributeToDefault: TButton
+      AnchorSideTop.Control = bvlAttributeSection
+      AnchorSideTop.Side = asrBottom
+      AnchorSideRight.Control = pnlElementAttributes
+      AnchorSideRight.Side = asrBottom
+      Left = 370
+      Height = 39
+      Top = 25
+      Width = 188
+      Anchors = [akTop, akRight]
+      AutoSize = True
+      BorderSpacing.Top = 6
+      BorderSpacing.Right = 6
+      Caption = 'btnSetAttributeToDefault'
+      OnClick = SetAttributeToDefaultButtonClick
+      TabOrder = 2
+    end
   end
-  object pnlTop: TPanel
-    Left = 0
-    Height = 0
-    Top = 25
-    Width = 640
-    Align = alTop
-    AutoSize = True
-    BevelOuter = bvNone
-    ChildSizing.HorizontalSpacing = 3
-    ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
-    ChildSizing.ShrinkHorizontal = crsHomogenousChildResize
-    ChildSizing.Layout = cclLeftToRightThenTopToBottom
-    ChildSizing.ControlsPerLine = 4
-    Constraints.MaxWidth = 1000
-    ParentShowHint = False
-    ShowHint = True
-    TabOrder = 0
-  end
-  object PnlTop2: TPanel
+  object PnlSelectAndPreview: TPanel
     AnchorSideLeft.Control = Owner
-    AnchorSideTop.Control = pnlTop
+    AnchorSideTop.Control = ddlLanguageSelection
     AnchorSideTop.Side = asrBottom
     AnchorSideRight.Control = Owner
     AnchorSideRight.Side = asrBottom
     AnchorSideBottom.Control = pnlElementAttributes
     Left = 0
-    Height = 226
-    Top = 25
-    Width = 640
+    Height = 133
+    Top = 142
+    Width = 564
     Anchors = [akTop, akLeft, akRight, akBottom]
+    AutoSize = True
+    BorderSpacing.Top = 6
     BevelOuter = bvNone
-    ClientHeight = 226
-    ClientWidth = 640
-    TabOrder = 2
+    ClientHeight = 133
+    ClientWidth = 564
+    TabOrder = 1
     object ColorElementTree: TTreeView
-      Left = 0
-      Height = 220
+      Left = 6
+      Height = 127
       Top = 6
       Width = 200
       Align = alLeft
       AutoExpand = True
+      BorderSpacing.Left = 6
       BorderSpacing.Top = 6
       BorderSpacing.Right = 1
       Constraints.MinWidth = 150
@@ -756,17 +871,18 @@ object EditorColorOptionsFrame: TEditorColorOptionsFrame
     inline ColorPreview: TSynEdit
       AnchorSideLeft.Control = Splitter1
       AnchorSideLeft.Side = asrBottom
-      AnchorSideTop.Control = PnlTop2
-      AnchorSideRight.Control = PnlTop2
+      AnchorSideTop.Control = PnlSelectAndPreview
+      AnchorSideRight.Control = PnlSelectAndPreview
       AnchorSideRight.Side = asrBottom
       AnchorSideBottom.Control = ColorElementTree
       AnchorSideBottom.Side = asrBottom
-      Left = 207
-      Height = 220
+      Left = 213
+      Height = 127
       Top = 6
-      Width = 433
+      Width = 345
       BorderSpacing.Left = 1
       BorderSpacing.Top = 6
+      BorderSpacing.Right = 6
       Anchors = [akTop, akLeft, akRight, akBottom]
       Font.Height = -16
       Font.Name = 'courier'
@@ -778,7 +894,7 @@ object EditorColorOptionsFrame: TEditorColorOptionsFrame
       TabStop = False
       OnMouseUp = ColorPreviewMouseUp
       BookMarkOptions.Xoffset = 30
-      Gutter.Width = 59
+      Gutter.Width = 61
       Gutter.MouseActions = <      
         item
           ClickCount = ccAny
@@ -1218,7 +1334,7 @@ object EditorColorOptionsFrame: TEditorColorOptionsFrame
           MouseActions = <>
         end
         object TSynGutterLineNumber
-          Width = 19
+          Width = 21
           MouseActions = <>
           MarkupInfo.Background = clBtnFace
           MarkupInfo.Foreground = clNone
@@ -1293,103 +1409,163 @@ object EditorColorOptionsFrame: TEditorColorOptionsFrame
       end
     end
     object Splitter1: TSplitter
-      Left = 201
-      Height = 226
+      Left = 207
+      Height = 133
       Top = 0
       Width = 5
     end
   end
-  object ToolBar: TToolBar
-    Left = 0
-    Height = 25
-    Top = 0
-    Width = 640
+  object tglUseSyntaxHighlight: TToggleBox
+    AnchorSideLeft.Control = lblUseSyntaxHighlight
+    AnchorSideTop.Control = lblUseSyntaxHighlight
+    AnchorSideTop.Side = asrBottom
+    AnchorSideRight.Side = asrBottom
+    Left = 6
+    Height = 39
+    Top = 29
+    Width = 166
     AutoSize = True
-    Caption = 'ToolBar'
-    EdgeBorders = [ebBottom]
-    ParentShowHint = False
-    ShowCaptions = True
-    ShowHint = True
+    BorderSpacing.Top = 4
+    Caption = 'tglUseSyntaxHighlight'
+    OnClick = tglUseSyntaxHighlightClick
+    TabOrder = 2
+  end
+  object lblUseSyntaxHighlight: TLabel
+    AnchorSideLeft.Control = Owner
+    AnchorSideTop.Control = Owner
+    Left = 6
+    Height = 19
+    Top = 6
+    Width = 145
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    Caption = 'lblUseSyntaxHighlight'
+    ParentColor = False
+  end
+  object ddlLanguageSelection: TComboBox
+    AnchorSideLeft.Control = Owner
+    AnchorSideTop.Control = lblLanguageSelection
+    AnchorSideTop.Side = asrBottom
+    Left = 6
+    Height = 39
+    Top = 97
+    Width = 100
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 4
+    ItemHeight = 0
+    OnSelect = ddlLanguageSelectionSelect
+    Style = csDropDownList
     TabOrder = 3
-    object UseSyntaxHighlightCheckBox: TToolButton
-      Left = 1
-      Top = 0
-      OnClick = GeneralCheckBoxOnChange
-      ShowCaption = False
-      Style = tbsCheck
-    end
-    object ToolButton2: TToolButton
-      Left = 24
-      Height = 22
-      Top = 0
-      Caption = 'ToolButton2'
-      Style = tbsDivider
-    end
-    object LanguageButton: TToolButton
-      Left = 29
-      Top = 0
-      DropdownMenu = LanguageMenu
-      OnClick = LanguageButtonClick
-      Style = tbsButtonDrop
-    end
-    object ColorSchemeButton: TToolButton
-      Left = 62
-      Top = 0
-      DropdownMenu = ColorSchemeMenu
-      OnClick = ColorSchemeButtonClick
-      Style = tbsButtonDrop
-    end
-    object FileExtensionsComboBox: TComboBox
-      AnchorSideTop.Side = asrBottom
-      Left = 95
-      Height = 23
-      Top = 0
-      Width = 139
-      BorderSpacing.Top = 3
-      ItemHeight = 15
-      Items.Strings = (
-        'pp;pas;inc;lpr;lrs;dpr;dpk'
-        'pp;pas;inc;lpr;lrs'
-        'pp;pas;inc'
-      )
-      OnChange = ComboBoxOnChange
-      OnExit = ComboBoxOnExit
-      OnKeyDown = ComboBoxOnKeyDown
-      TabOrder = 0
-    end
-    object ToolButton5: TToolButton
-      Left = 234
-      Height = 22
-      Top = 0
-      Caption = 'ToolButton5'
-      Style = tbsDivider
-    end
-    object btnExport: TToolButton
-      Left = 239
-      Top = 0
-      OnClick = btnExportClick
-      ShowCaption = False
-    end
-    object SetAllAttributesToDefaultButton: TToolButton
-      Left = 262
-      Top = 0
-      OnClick = SetAllAttributesToDefaultButtonClick
-      ShowCaption = False
-    end
   end
-  object ExportSaveDialog: TSaveDialog
+  object lblLanguageSelection: TLabel
+    AnchorSideLeft.Control = Owner
+    AnchorSideTop.Control = tglUseSyntaxHighlight
+    AnchorSideTop.Side = asrBottom
+    Left = 6
+    Height = 19
+    Top = 74
+    Width = 141
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    Caption = 'lblLanguageSelection'
+    ParentColor = False
+  end
+  object ddlColorScheme: TComboBox
+    AnchorSideLeft.Control = ddlLanguageSelection
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = lblColorScheme
+    AnchorSideTop.Side = asrBottom
+    Left = 112
+    Height = 39
+    Top = 97
+    Width = 100
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 4
+    ItemHeight = 0
+    OnSelect = ddlColorSchemeSelect
+    Style = csDropDownList
+    TabOrder = 4
+  end
+  object lblColorScheme: TLabel
+    AnchorSideLeft.Control = ddlColorScheme
+    AnchorSideTop.Control = lblLanguageSelection
+    Left = 112
+    Height = 19
+    Top = 74
+    Width = 105
+    Caption = 'lblColorScheme'
+    ParentColor = False
+  end
+  object ddeFileExtensions: TComboBox
+    AnchorSideLeft.Control = ddlColorScheme
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = ddlColorScheme
+    Left = 218
+    Height = 39
+    Top = 97
+    Width = 139
+    BorderSpacing.Left = 6
+    ItemHeight = 0
+    Items.Strings = (
+      'pp;pas;inc;lpr;lrs;dpr;dpk'
+      'pp;pas;inc;lpr;lrs'
+      'pp;pas;inc'
+    )
+    OnChange = ComboBoxOnChange
+    OnExit = ComboBoxOnExit
+    OnKeyDown = ComboBoxOnKeyDown
+    TabOrder = 5
+  end
+  object btnExportToFile: TButton
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = Owner
+    AnchorSideRight.Control = btnSetAllAttributesToDefault
+    Left = 213
+    Height = 39
+    Top = 6
+    Width = 126
+    Anchors = [akTop, akRight]
+    AutoSize = True
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    BorderSpacing.Right = 6
+    Caption = 'btnExportToFile'
+    OnClick = btnExportToFileClick
+    TabOrder = 6
+  end
+  object lblFileExtensions: TLabel
+    AnchorSideLeft.Control = ddeFileExtensions
+    AnchorSideTop.Control = lblColorScheme
+    Left = 218
+    Height = 19
+    Top = 74
+    Width = 112
+    Caption = 'lblFileExtensions'
+    ParentColor = False
+  end
+  object btnSetAllAttributesToDefault: TButton
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = Owner
+    AnchorSideRight.Control = Owner
+    AnchorSideRight.Side = asrBottom
+    Left = 345
+    Height = 39
+    Top = 6
+    Width = 213
+    Anchors = [akTop, akRight]
+    AutoSize = True
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    BorderSpacing.Right = 6
+    Caption = 'btnSetAllAttributesToDefault'
+    OnClick = btnSetAllAttributesToDefaultClick
+    TabOrder = 7
+  end
+  object dlgSaveExportFile: TSaveDialog
     DefaultExt = '.xml'
     Filter = 'xml|*.xml'
     Options = [ofOverwritePrompt, ofPathMustExist, ofEnableSizing, ofViewDetail]
-    left = 568
-    top = 56
-  end
-  object LanguageMenu: TPopupMenu
-    left = 568
-    top = 104
-  end
-  object ColorSchemeMenu: TPopupMenu
-    left = 568
-    top = 160
+    Left = 568
+    Top = 56
   end
 end
diff --git a/ide/frames/editor_color_options.pas b/ide/frames/editor_color_options.pas
index b6d6e561bd..603091bf94 100644
--- a/ide/frames/editor_color_options.pas
+++ b/ide/frames/editor_color_options.pas
@@ -52,18 +52,24 @@ type
   TEditorColorOptionsFrame = class(TAbstractIDEOptionsEditor)
     StylePriorEdit: TEdit;
     StylePriorLabel: TLabel;
-    BackPriorList: TTreeView;
     StylePriorList: TTreeView;
     StylePriorPanel: TPanel;
     StylePriorUpDown: TUpDown;
-    BackPriorValPanel: TPanel;
     StylePriorValPanel: TPanel;
+    BackPriorList: TTreeView;
+    BackPriorValPanel: TPanel;
+    btnExportToFile: TButton;
+    btnSetAttributeToDefault: TButton;
+    ddeFileExtensions: TComboBox;
+    ddlColorScheme: TComboBox;
+    PageControl1: TPageControl;
+    btnSetAllAttributesToDefault: TButton;
     bvlAttributeSection: TDividerBevel;
     BackPriorEdit: TEdit;
+    ddlLanguageSelection: TComboBox;
     FramePriorEdit: TEdit;
     ForePriorEdit: TEdit;
-    FileExtensionsComboBox: TComboBox;
-    ExportSaveDialog: TSaveDialog;
+    dlgSaveExportFile: TSaveDialog;
     ForePriorLabel: TLabel;
     BackPriorLabel: TLabel;
     ForePriorList: TTreeView;
@@ -74,36 +80,27 @@ type
     FramePriorList: TTreeView;
     FramePriorPanel: TPanel;
     FramePriorValPanel: TPanel;
+    lblFileExtensions: TLabel;
+    lblColorScheme: TLabel;
+    lblLanguageSelection: TLabel;
+    lblUseSyntaxHighlight: TLabel;
     PriorityEditor: TPanel;
-    PnlTop2: TPanel;
-    pnlTop: TPanel;
-    LanguageMenu: TPopupMenu;
-    ColorSchemeMenu: TPopupMenu;
+    PnlSelectAndPreview: TPanel;
     Splitter1: TSplitter;
     ColorElementTree: TTreeView;
     SynColorAttrEditor1: TSynColorAttrEditor;
-    ToolBar: TToolBar;
-    ToolBar1: TToolBar;
-    tbtnGlobal: TToolButton;
-    tbtnLocal: TToolButton;
-    ToolButton1: TToolButton;
-    ToolButton3: TToolButton;
-    tbnColor: TToolButton;
-    tbnPrior: TToolButton;
+    tbsColorEditor: TTabSheet;
+    tbsPriorityEditor: TTabSheet;
+    tglUseSyntaxHighlight: TToggleBox;
+    tglSchemeLayer: TToggleBox;
     ForePriorUpDown: TUpDown;
     BackPriorUpDown: TUpDown;
     FramePriorUpDown: TUpDown;
-    UseSyntaxHighlightCheckBox: TToolButton;
-    ToolButton2: TToolButton;
-    LanguageButton: TToolButton;
-    ColorSchemeButton: TToolButton;
-    ToolButton5: TToolButton;
-    btnExport: TToolButton;
-    SetAllAttributesToDefaultButton: TToolButton;
-    SetAttributeToDefaultButton: TToolButton;
     ColorPreview: TSynEdit;
     pnlElementAttributes: TPanel;
-    procedure btnExportClick(Sender: TObject);
+    procedure btnExportToFileClick(Sender: TObject);
+    procedure ddlColorSchemeSelect(Sender: TObject);
+    procedure ddlLanguageSelectionSelect(Sender: TObject);
     procedure ColorElementTreeAdvancedCustomDrawItem(Sender: TCustomTreeView; Node: TTreeNode;
       State: TCustomDrawState; Stage: TCustomDrawStage; var {%H-}PaintImages, DefaultDraw: Boolean);
     procedure ColorElementTreeChange(Sender: TObject; {%H-}Node: TTreeNode);
@@ -111,7 +108,6 @@ type
     procedure ColorElementTreeKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);
     procedure ColorPreviewMouseUp(Sender: TObject; {%H-}Button: TMouseButton;
       {%H-}Shift: TShiftState; X, Y: Integer);
-    procedure ColorSchemeButtonClick(Sender: TObject);
     procedure DoColorChanged(Sender: TObject);
     procedure ForePriorEditKeyPress(Sender: TObject; var Key: char);
     procedure ForePriorListClick(Sender: TObject);
@@ -119,28 +115,28 @@ type
       var Compare: Integer);
     procedure ForePriorEditChange(Sender: TObject);
     procedure ForePriorUpDownClick(Sender: TObject; Button: TUDBtnType);
-    procedure GeneralCheckBoxOnChange(Sender: TObject);
     procedure ComboBoxOnExit(Sender: TObject);
-    procedure LanguageButtonClick(Sender: TObject);
-    procedure SetAllAttributesToDefaultButtonClick(Sender: TObject);
+    procedure FrameResize(Sender: TObject);
+    procedure btnSetAllAttributesToDefaultClick(Sender: TObject);
     procedure SetAttributeToDefaultButtonClick(Sender: TObject);
     procedure ComboBoxOnChange(Sender: TObject);
     procedure ComboBoxOnKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
     procedure tbnColorClick(Sender: TObject);
     procedure tglGlobalChange(Sender: TObject);
+    procedure tglUseSyntaxHighlightClick(Sender: TObject);
   private
     FTempColorSchemeSettings: TColorSchemeFactory;
 
     FDialog: TAbstractOptionsEditorDialog;
-    FCurHighlightElement: TColorSchemeAttribute;
+    FCurrentHighlightElement: TColorSchemeAttribute;
+    FFileExtensionsList: TStringList;  // list of LanguageName=FileExtensions
+    FColorSchemesList: TStringList;    // list of LanguageName=ColorScheme
 
-    FFileExtensions: TStringList;  // list of LanguageName=FileExtensions
-    FColorSchemes: TStringList;    // list of LanguageName=ColorScheme
-
-    FCurrentHighlighter: TSrcIDEHighlighter;
+    FCurrentLanguageHighlighter: TSrcIDEHighlighter;
     FCurrentColorScheme: TColorSchemeLanguage;
-    FIsEditingDefaults, FInPriorUpdating: Boolean;
-    CurLanguageID: Integer;
+    FIsEditingDefaults: Boolean;
+    FIsPriorUpdating: Boolean;
+    FCurrentLanguageID: Integer;
 
     procedure FillPriorEditor;
     procedure SelectCurInPriorEditor;
@@ -174,10 +170,9 @@ type
     function GeneralPage: TEditorGeneralOptionsFrame;
     function DoSynEditMouse(var AnInfo: TSynEditMouseActionInfo;
                          {%H-}HandleActionProc: TSynEditMouseActionHandler): Boolean;
-    procedure LanguageMenuItemClick(Sender: TObject);
-    procedure ColorSchemeMenuItemClick(Sender: TObject);
     procedure SetLanguageItem(ALanguage: String);
     procedure SetColorSchemeItem(AScheme: String);
+    procedure ResizeComboBox(Sender: TComboBox);
   public
     constructor Create(TheOwner : TComponent); override;
     destructor Destroy; override;
@@ -189,7 +184,7 @@ type
     procedure SelectAhaColor(aha: TAdditionalHilightAttribute);
     class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
     property UnsavedColorSchemeSettings: TColorSchemeFactory read FTempColorSchemeSettings;
-    property UnsavedColorSchemeDefaultNames: TStringList read FColorSchemes;
+    property UnsavedColorSchemeDefaultNames: TStringList read FColorSchemesList;
   end;
 
 implementation
@@ -293,7 +288,7 @@ begin
     exit;
   end;
 
-  // Special draw oultine color // Caret color
+  // Special draw oultine color
   if (Attri.Group = agnOutlineColors) or (AttriIdx = ord(ahaCaretColor)) then begin
     c := Attri.MarkupFoldLineColor;
     if (AttriIdx = ord(ahaCaretColor)) then
@@ -393,16 +388,16 @@ begin
   end;
 end;
 
-procedure TEditorColorOptionsFrame.btnExportClick(Sender: TObject);
+procedure TEditorColorOptionsFrame.btnExportToFileClick(Sender: TObject);
 var
   XMLConfig: TRttiXMLConfig;
   NewScheme: TColorScheme;
   NewName: String;
   l: Integer;
 begin
-  ExportSaveDialog.InitialDir := UserSchemeDirectory(True);
-  if ExportSaveDialog.Execute then begin
-    NewName := ExtractFileName(ExportSaveDialog.FileName);
+  dlgSaveExportFile.InitialDir := UserSchemeDirectory(True);
+  if dlgSaveExportFile.Execute then begin
+    NewName := ExtractFileName(dlgSaveExportFile.FileName);
     l := length(ExtractFileExt(NewName));
     if (l > 0) and (l+1 < Length(NewName)) then
       NewName := Copy(NewName, 1, Length(NewName) - l);
@@ -410,12 +405,12 @@ begin
     if l > 0 then
       NewName := UTF8UpperCase(copy(NewName, 1, l)) + copy(NewName, 1+l, length(NewName));
 
-    XMLConfig := TRttiXMLConfig.CreateClean(ExportSaveDialog.FileName);
+    XMLConfig := TRttiXMLConfig.CreateClean(dlgSaveExportFile.FileName);
     XMLConfig.SetValue('Lazarus/ColorSchemes/Names/Count', 1);
     XMLConfig.SetValue('Lazarus/ColorSchemes/Names/Item1/Value', NewName);
 
     NewScheme := TColorScheme.Create(NewName);
-    NewScheme.Assign(FTempColorSchemeSettings.ColorSchemeGroup[ColorSchemeButton.Caption]);
+    NewScheme.Assign(FTempColorSchemeSettings.ColorSchemeGroup[ddlColorScheme.Items[ddlColorScheme.ItemIndex]]);
     NewScheme.SaveToXml(XMLConfig, 'Lazarus/ColorSchemes/',nil);
     NewScheme.Free;
 
@@ -425,6 +420,54 @@ begin
   end;
 end;
 
+procedure TEditorColorOptionsFrame.ddlColorSchemeSelect(Sender: TObject);
+var
+  Scheme: String;
+begin
+  Scheme := ddlColorScheme.Items[ddlColorScheme.ItemIndex];
+  if Scheme <> FCurrentColorScheme.Name then
+  begin
+    // change the colorscheme
+    if not FIsEditingDefaults then
+      SetColorSchemeForLang(FCurrentLanguageHighlighter.LanguageName, Scheme);
+    SetCurrentScheme(TCustomSynClass(FCurrentLanguageHighlighter.ClassType), Scheme);
+  end;
+  ResizeComboBox(ddlColorScheme);
+end;
+
+procedure TEditorColorOptionsFrame.ddlLanguageSelectionSelect(Sender: TObject);
+var
+  Language: String;
+  NewVal: LongInt;
+begin
+  if (ddlLanguageSelection.ItemIndex = 0) then
+  begin
+    if not FIsEditingDefaults then
+    begin
+      FIsEditingDefaults := True;
+      SetCurrentScheme(TCustomSynClass(FCurrentLanguageHighlighter.ClassType), ddlColorScheme.Items[ddlColorScheme.ItemIndex]);
+    end;
+  end else
+  begin
+    Language := ddlLanguageSelection.Items[ddlLanguageSelection.ItemIndex];
+    if (Language <> FCurrentLanguageHighlighter.LanguageName) or FIsEditingDefaults then
+    begin
+      FIsEditingDefaults := False;
+      NewVal := EditorOpts.HighlighterList.FindByName(Language);
+      if NewVal >= 0 then
+      begin
+        FCurrentLanguageID := NewVal;
+        SetCurrentScheme(EditorOpts.HighlighterList[FCurrentLanguageID].SynClass,
+          GetColorSchemeForLang(EditorOpts.HighlighterList[FCurrentLanguageID].SynClass.GetLanguageName));
+        SetColorSchemeItem(GetColorSchemeForLang(FCurrentLanguageHighlighter.LanguageName));
+        SetComboBoxText(ddeFileExtensions, GetCurFileExtensions(FCurrentLanguageHighlighter.LanguageName),
+          cstFilename);
+      end;
+    end;
+  end;
+  ResizeComboBox(ddlLanguageSelection);
+end;
+
 procedure TEditorColorOptionsFrame.ColorElementTreeClick(Sender: TObject);
 begin
   FindCurHighlightElement;
@@ -481,9 +524,9 @@ begin
     exit;
   end;
   // Line Highlights
-  if CurLanguageID >= 0 then
+  if FCurrentLanguageID >= 0 then
   begin
-    AddAttr := EditorOpts.HighlighterList[CurLanguageID].SampleLineToAddAttr(XY.Y);
+    AddAttr := EditorOpts.HighlighterList[FCurrentLanguageID].SampleLineToAddAttr(XY.Y);
     if AddAttr = ahaFoldedCode then begin
       if not( (XY.X >= Length(ColorPreview.Lines[XY.Y-1]) + 4) and
               (XY.X <= Length(ColorPreview.Lines[XY.Y-1]) + 6) )
@@ -511,7 +554,7 @@ begin
   Attri := nil;
   ColorPreview.GetHighlighterAttriAtRowCol(XY, Token, Attri);
   if Attri = nil then
-    Attri := FCurrentHighlighter.WhitespaceAttribute;
+    Attri := FCurrentLanguageHighlighter.WhitespaceAttribute;
   if Attri <> nil then begin
     NewNode := ColorElementTree.Items.GetFirstNode;
     while Assigned(NewNode) do begin
@@ -527,11 +570,6 @@ begin
   end;
 end;
 
-procedure TEditorColorOptionsFrame.ColorSchemeButtonClick(Sender: TObject);
-begin
-  ColorSchemeButton.CheckMenuDropdown;
-end;
-
 procedure TEditorColorOptionsFrame.DoColorChanged(Sender: TObject);
 begin
   UpdateCurrentScheme;
@@ -550,9 +588,9 @@ begin
   Node := TTreeView(Sender).Selected;
   if Node = nil then
     exit;
-  FCurHighlightElement := TColorSchemeAttribute(Node.Data);
+  FCurrentHighlightElement := TColorSchemeAttribute(Node.Data);
 
-  N2 := ColorElementTree.Items.FindNodeWithData(FCurHighlightElement);
+  N2 := ColorElementTree.Items.FindNodeWithData(FCurrentHighlightElement);
   if N2 <> nil then
     N2.Selected := True;
 
@@ -560,10 +598,10 @@ begin
   //if (i < 0) or (i >= TTreeView(Sender).Height div Node.Height) then
   //  i := Max(0, (TTreeView(Sender).Height div Node.Height div 2) - 1);
 
-  FInPriorUpdating := True;
+  FIsPriorUpdating := True;
   ShowCurAttribute;
   SelectCurInPriorEditor;
-  FInPriorUpdating := False;
+  FIsPriorUpdating := False;
 
   //TTreeView(Sender).TopItem := TTreeView(Sender).Items[Max(0, Node.Index - i)];
 end;
@@ -594,7 +632,7 @@ var
   i: Integer;
   f: TMarkupField;
 begin
-  if FInPriorUpdating then
+  if FIsPriorUpdating then
     exit;
 
   f := PriorSenderToField(Sender);
@@ -800,37 +838,35 @@ begin
   end;
 end;
 
-procedure TEditorColorOptionsFrame.GeneralCheckBoxOnChange(Sender: TObject);
-begin
-  if Sender = UseSyntaxHighlightCheckBox then
-  begin
-    ApplyCurrentScheme;
-    Exit;
-  end;
-end;
-
 procedure TEditorColorOptionsFrame.ComboBoxOnExit(Sender: TObject);
 var
   Box: TComboBox absolute Sender;
 begin
-  if Sender = FileExtensionsComboBox then
+  if Sender = ddeFileExtensions then
   begin
-    //DebugLn(['TEditorOptionsForm.ComboBoxOnExit Box.Text="',Box.Text,'" Old="',GetCurFileExtensions(FCurrentHighlighter.LanguageName),'" FCurrentHighlighter.LanguageName=',FCurrentHighlighter.LanguageName]);
-    if Box.Text <> GetCurFileExtensions(FCurrentHighlighter.LanguageName) then
+    //DebugLn(['TEditorOptionsForm.ComboBoxOnExit Box.Text="',Box.Text,'" Old="',GetCurFileExtensions(FCurrentLanguageHighlighter.LanguageName),'" FCurrentHighlighter.LanguageName=',FCurrentLanguageHighlighter.LanguageName]);
+    if Box.Text <> GetCurFileExtensions(FCurrentLanguageHighlighter.LanguageName) then
     begin
-      SetCurFileExtensions(FCurrentHighlighter.LanguageName, Box.Text);
+      SetCurFileExtensions(FCurrentLanguageHighlighter.LanguageName, Box.Text);
       SetComboBoxText(Box, Box.Text,cstCaseInsensitive);
     end;
-    //DebugLn(['TEditorOptionsForm.ComboBoxOnExit Box.Text="',Box.Text,'" Now="',GetCurFileExtensions(FCurrentHighlighter.LanguageName),'" FCurrentHighlighter.LanguageName=',FCurrentHighlighter.LanguageName]);
+    //DebugLn(['TEditorOptionsForm.ComboBoxOnExit Box.Text="',Box.Text,'" Now="',GetCurFileExtensions(FCurrentLanguageHighlighter.LanguageName),'" FCurrentHighlighter.LanguageName=',FCurrentLanguageHighlighter.LanguageName]);
+    ResizeComboBox(ddeFileExtensions);
   end
 end;
 
-procedure TEditorColorOptionsFrame.LanguageButtonClick(Sender: TObject);
+procedure TEditorColorOptionsFrame.FrameResize(Sender: TObject);
+var
+  SubPanelWidth: Integer;
 begin
-  LanguageButton.CheckMenuDropdown;
+  SubPanelWidth := PageControl1.Width div 4;
+  ForePriorPanel.Width := SubPanelWidth;
+  BackPriorPanel.Width := (SubPanelWidth) - BackPriorPanel.BorderSpacing.Left;
+  FramePriorPanel.Width := (SubPanelWidth) - FramePriorPanel.BorderSpacing.Left;
+  SynColorAttrEditor1.AdjustSize;
 end;
 
-procedure TEditorColorOptionsFrame.SetAllAttributesToDefaultButtonClick(
+procedure TEditorColorOptionsFrame.btnSetAllAttributesToDefaultClick(
   Sender: TObject);
 begin
   SetColorElementsToDefaults(False);
@@ -846,26 +882,20 @@ procedure TEditorColorOptionsFrame.ShowCurAttribute;
 var
   CanGlobal: Boolean;
 begin
-  if (FCurHighlightElement = nil) then
+  if (FCurrentHighlightElement = nil) then
     Exit;
   DisableAlign;
   try
-
-    CanGlobal := (FCurHighlightElement.GetSchemeGlobal <> nil) and
+    CanGlobal := (FCurrentHighlightElement.GetSchemeGlobal <> nil) and
                             not FIsEditingDefaults;
-    tbtnGlobal.Enabled := CanGlobal;
-    tbtnLocal.Enabled := CanGlobal;
-    tbtnGlobal.AllowAllUp := not CanGlobal;
-    tbtnLocal.AllowAllUp := not CanGlobal;
-    tbtnGlobal.Down := FCurHighlightElement.IsUsingSchemeGlobals and
-                       CanGlobal;
-    tbtnLocal.Down  := (not FCurHighlightElement.IsUsingSchemeGlobals) and
-                       CanGlobal;
-
-    if FCurHighlightElement.IsUsingSchemeGlobals then
-      SynColorAttrEditor1.CurHighlightElement := FCurHighlightElement.GetSchemeGlobal
+    tglSchemeLayer.Enabled := CanGlobal;
+    tglSchemeLayer.Checked := FCurrentHighlightElement.IsUsingSchemeGlobals and
+                                CanGlobal;
+
+    if FCurrentHighlightElement.IsUsingSchemeGlobals then
+      SynColorAttrEditor1.CurHighlightElement := FCurrentHighlightElement.GetSchemeGlobal
     else
-      SynColorAttrEditor1.CurHighlightElement := FCurHighlightElement;
+      SynColorAttrEditor1.CurHighlightElement := FCurrentHighlightElement;
     //SynColorAttrEditor1.UpdateAll;
     FillPriorEditor;
   finally
@@ -895,7 +925,7 @@ procedure TEditorColorOptionsFrame.FillPriorEditor;
                      (AnAttr.FrameColor <> clNone) and
                      (AnAttr.FrameColor <> clDefault);
         mfStyle:     Result := (hafStyle in AnAttr.Features) and
-                     ( (AnAttr.Style <> []) or (AnAttr.StyleMask <> []) );
+                     ((AnAttr.Style <> []) or (AnAttr.StyleMask <> []));
     end
   end;
 
@@ -917,11 +947,10 @@ procedure TEditorColorOptionsFrame.FillPriorEditor;
     AList.AlphaSort;
   end;
 begin
-  if (not PriorityEditor.Visible) or (FCurHighlightElement = nil) or FInPriorUpdating
-  then
+  if (not (PageControl1.TabIndex = 1)) or (FCurrentHighlightElement = nil) or FIsPriorUpdating then
     exit;
 
-  FInPriorUpdating := True;
+  FIsPriorUpdating := True;
 
   FillList(ForePriorList, mfForeGround);
   FillList(BackPriorList, mfBackGround);
@@ -930,7 +959,7 @@ begin
 
   SelectCurInPriorEditor;
 
-  FInPriorUpdating := False;
+  FIsPriorUpdating := False;
 end;
 
 procedure TEditorColorOptionsFrame.SelectCurInPriorEditor;
@@ -938,7 +967,7 @@ var
   n: TTreeNode;
   i: Integer;
 begin
-  n := ForePriorList.Items.FindNodeWithData(FCurHighlightElement);
+  n := ForePriorList.Items.FindNodeWithData(FCurrentHighlightElement);
   ForePriorValPanel.Enabled := n <> nil;
   if (n <> nil) and not(n.Selected) then begin
     n.Selected := True;
@@ -948,9 +977,9 @@ begin
   else
   if n = nil then
     ForePriorList.Selected := nil;
-  SetPriorEditVal(ForePriorEdit, GetAttrPriorVal(FCurHighlightElement, mfForeGround));
+  SetPriorEditVal(ForePriorEdit, GetAttrPriorVal(FCurrentHighlightElement, mfForeGround));
 
-  n := BackPriorList.Items.FindNodeWithData(FCurHighlightElement);
+  n := BackPriorList.Items.FindNodeWithData(FCurrentHighlightElement);
   BackPriorValPanel.Enabled := n <> nil;
   if (n <> nil) and not(n.Selected) then begin
     n.Selected := True;
@@ -960,9 +989,9 @@ begin
   else
   if n = nil then
     BackPriorList.Selected := nil;
-  SetPriorEditVal(BackPriorEdit, GetAttrPriorVal(FCurHighlightElement, mfBackGround));
+  SetPriorEditVal(BackPriorEdit, GetAttrPriorVal(FCurrentHighlightElement, mfBackGround));
 
-  n := FramePriorList.Items.FindNodeWithData(FCurHighlightElement);
+  n := FramePriorList.Items.FindNodeWithData(FCurrentHighlightElement);
   FramePriorValPanel.Enabled := n <> nil;
   if (n <> nil) and not(n.Selected) then begin
     n.Selected := True;
@@ -972,9 +1001,9 @@ begin
   else
   if n = nil then
     FramePriorList.Selected := nil;
-  SetPriorEditVal(FramePriorEdit, GetAttrPriorVal(FCurHighlightElement, mfFrame));
+  SetPriorEditVal(FramePriorEdit, GetAttrPriorVal(FCurrentHighlightElement, mfFrame));
 
-  n := StylePriorList.Items.FindNodeWithData(FCurHighlightElement);
+  n := StylePriorList.Items.FindNodeWithData(FCurrentHighlightElement);
   StylePriorValPanel.Enabled := n <> nil;
   if (n <> nil) and not(n.Selected) then begin
     n.Selected := True;
@@ -984,7 +1013,7 @@ begin
   else
   if n = nil then
     StylePriorList.Selected := nil;
-  SetPriorEditVal(StylePriorEdit, GetAttrPriorVal(FCurHighlightElement, mfStyle));
+  SetPriorEditVal(StylePriorEdit, GetAttrPriorVal(FCurrentHighlightElement, mfStyle));
 end;
 
 function TEditorColorOptionsFrame.AttrForNode(ANode: TTreeNode): TColorSchemeAttribute;
@@ -1068,7 +1097,8 @@ begin
     mfForeGround: AnAttr.ForePriority := AValue;
     mfBackGround: AnAttr.BackPriority := AValue;
     mfFrame:      AnAttr.FramePriority := AValue;
-    mfStyle:      begin
+    mfStyle:
+      begin
         AnAttr.StylePriority[fsBold] := AValue;
         AnAttr.StylePriority[fsItalic] := AValue;
         AnAttr.StylePriority[fsUnderline] := AValue;
@@ -1116,10 +1146,10 @@ begin
   if (ColorElementTree.Selected = nil) or (ColorElementTree.Selected.Data = nil) then
     exit;
 
-  if FCurHighlightElement = TColorSchemeAttribute(ColorElementTree.Selected.Data) then
+  if FCurrentHighlightElement = TColorSchemeAttribute(ColorElementTree.Selected.Data) then
     exit;
 
-  FCurHighlightElement := TColorSchemeAttribute(ColorElementTree.Selected.Data);
+  FCurrentHighlightElement := TColorSchemeAttribute(ColorElementTree.Selected.Data);
   ShowCurAttribute;
 end;
 
@@ -1137,7 +1167,7 @@ begin
 
   // Create Groups
   if not FIsEditingDefaults then
-    ColorElementTree.Items.Add(nil, FCurrentHighlighter.LanguageName)
+    ColorElementTree.Items.Add(nil, FCurrentLanguageHighlighter.LanguageName)
   else
     ColorElementTree.Items.Add(nil, AdditionalHighlightGroupNames[agnDefault]);
   for j := low(TAhaGroupName) to high(TAhaGroupName) do
@@ -1156,7 +1186,7 @@ begin
             if FIsEditingDefaults then
               ParentName := AdditionalHighlightGroupNames[agnDefault]
             else
-              ParentName := FCurrentHighlighter.LanguageName;
+              ParentName := FCurrentLanguageHighlighter.LanguageName;
           end;
         else
           ParentName := AdditionalHighlightGroupNames[Attr.Group];
@@ -1181,7 +1211,7 @@ begin
   if ColorElementTree.Items.GetFirstNode <> nil then
     ColorElementTree.Items.GetFirstNode.Selected := True;
 
-  FCurHighlightElement := nil;
+  FCurrentHighlightElement := nil;
   FindCurHighlightElement;
 end;
 
@@ -1192,7 +1222,7 @@ var
   DefAttri: TColorSchemeAttribute;
   i: Integer;
 begin
-  DefaultSchemeGrp := ColorSchemeFactory.ColorSchemeGroup[ColorSchemeButton.Caption];
+  DefaultSchemeGrp := ColorSchemeFactory.ColorSchemeGroup[ddlColorScheme.Items[ddlColorScheme.ItemIndex]];
   if DefaultSchemeGrp = nil then
     exit;
   if FIsEditingDefaults then
@@ -1201,8 +1231,8 @@ begin
     DefaultColorScheme := DefaultSchemeGrp.ColorScheme[FCurrentColorScheme.Language];
 
   if OnlySelected then begin
-    DefAttri := DefaultColorScheme.Attribute[FCurHighlightElement.StoredName];
-    FCurHighlightElement.Assign(DefAttri);
+    DefAttri := DefaultColorScheme.Attribute[FCurrentHighlightElement.StoredName];
+    FCurrentHighlightElement.Assign(DefAttri);
   end else begin
     FCurrentColorScheme.Assign(DefaultColorScheme);
   end;
@@ -1226,10 +1256,10 @@ end;
 
 function TEditorColorOptionsFrame.GetColorSchemeForLang(const LanguageName: String): String;
 begin
-  if FColorSchemes = nil then
+  if FColorSchemesList = nil then
     Result := ''
   else
-    Result := FColorSchemes.Values[LanguageName];
+    Result := FColorSchemesList.Values[LanguageName];
   if Result = '' then
     Result := EditorOpts.ReadColorScheme(LanguageName);
 end;
@@ -1237,9 +1267,9 @@ end;
 procedure TEditorColorOptionsFrame.SetColorSchemeForLang(const LanguageName,
   ColorScheme: String);
 begin
-  if FColorSchemes = nil then
-    FColorSchemes := TStringList.Create;
-  FColorSchemes.Values[LanguageName] := ColorScheme;
+  if FColorSchemesList = nil then
+    FColorSchemesList := TStringList.Create;
+  FColorSchemesList.Values[LanguageName] := ColorScheme;
 end;
 
 procedure TEditorColorOptionsFrame.SetCurrentScheme(SynClass: TCustomSynClass;
@@ -1262,7 +1292,7 @@ begin
 
   FCurrentColorScheme := NewColorScheme;
   if not FIsEditingDefaults then begin
-    FCurrentHighlighter := FCurrentColorScheme.Highlighter;
+    FCurrentLanguageHighlighter := FCurrentColorScheme.Highlighter;
     SynColorAttrEditor1.CurrentColorScheme := FCurrentColorScheme;
     FillPriorEditor;
   end;
@@ -1282,12 +1312,12 @@ begin
       PreviewEdits[a].BeginUpdate;
     try
       for a := Low(PreviewEdits) to High(PreviewEdits) do begin
-        if UseSyntaxHighlightCheckBox.Down then
-          PreviewEdits[a].Highlighter := FCurrentHighlighter
+        if tglUseSyntaxHighlight.Checked then
+          PreviewEdits[a].Highlighter := FCurrentLanguageHighlighter
         else
           PreviewEdits[a].Highlighter := nil;
-        PreviewEdits[a].Lines.Text := EditorOpts.HighlighterList[CurLanguageID].SampleSource;
-        PreviewEdits[a].CaretXY := EditorOpts.HighlighterList[CurLanguageID].CaretXY;
+        PreviewEdits[a].Lines.Text := EditorOpts.HighlighterList[FCurrentLanguageID].SampleSource;
+        PreviewEdits[a].CaretXY := EditorOpts.HighlighterList[FCurrentLanguageID].CaretXY;
         PreviewEdits[a].TopLine := 1;
         PreviewEdits[a].LeftChar := 1;
         PreviewEdits[a].Keystrokes.Clear;
@@ -1323,7 +1353,7 @@ begin
       PreviewEdits[a].BeginUpdate;
     try
       if not FIsEditingDefaults then
-        FCurrentColorScheme.ApplyTo(FCurrentHighlighter);
+        FCurrentColorScheme.ApplyTo(FCurrentLanguageHighlighter);
       for a := Low(PreviewEdits) to High(PreviewEdits) do begin
         FCurrentColorScheme.ApplyTo(PreviewEdits[a]);
         PreviewEdits[a].Invalidate;
@@ -1347,89 +1377,51 @@ begin
   Result := not(AnInfo.Button in [mbXWheelDown, mbXWheelUp, mbXWheelLeft, mbXWheelRight]);
 end;
 
-procedure TEditorColorOptionsFrame.LanguageMenuItemClick(Sender: TObject);
+procedure TEditorColorOptionsFrame.SetLanguageItem(ALanguage: String);
 var
-  Language: String;
-  NewVal: LongInt;
+  i: Integer;
 begin
-  if (Sender as TMenuItem).MenuIndex = 0 then
-  begin
-    if not FIsEditingDefaults then
+  for i := 0 to ddlLanguageSelection.Items.Count - 1 do
+    if (ddlLanguageSelection.Items[i] = ALanguage) then
     begin
-      FIsEditingDefaults := True;
-      SetCurrentScheme(TCustomSynClass(FCurrentHighlighter.ClassType), ColorSchemeButton.Caption);
+      ddlLanguageSelection.ItemIndex := i;
+      Break;
     end;
-    LanguageButton.Caption := (Sender as TMenuItem).Caption;
-  end
-  else
-  begin
-    Language := (Sender as TMenuItem).Caption;
-    if (Language <> FCurrentHighlighter.LanguageName) or FIsEditingDefaults then
-    begin
-      FIsEditingDefaults := False;
-      NewVal := EditorOpts.HighlighterList.FindByName(Language);
-      if NewVal >= 0 then
-      begin
-        CurLanguageID := NewVal;
-        SetCurrentScheme(EditorOpts.HighlighterList[CurLanguageID].SynClass,
-                        GetColorSchemeForLang(EditorOpts.HighlighterList
-                                     [CurLanguageID].SynClass.GetLanguageName));
-        SetColorSchemeItem(GetColorSchemeForLang(FCurrentHighlighter.LanguageName));
-        SetComboBoxText(FileExtensionsComboBox,
-          GetCurFileExtensions(FCurrentHighlighter.LanguageName),cstFilename);
-      end;
-    end;
-    LanguageButton.Caption := Language;
-  end;
+  ResizeComboBox(ddlLanguageSelection);
 end;
 
-procedure TEditorColorOptionsFrame.ColorSchemeMenuItemClick(Sender: TObject);
-var
-  Scheme: String;
-begin
-  Scheme := (Sender as TMenuItem).Caption;
-  if Scheme <> FCurrentColorScheme.Name then
-  begin
-    // change the colorscheme
-    if not FIsEditingDefaults then
-      SetColorSchemeForLang(FCurrentHighlighter.LanguageName, Scheme);
-    SetCurrentScheme(TCustomSynClass(FCurrentHighlighter.ClassType), Scheme);
-  end;
-  ColorSchemeButton.Caption := Scheme;
-end;
-
-procedure TEditorColorOptionsFrame.SetLanguageItem(ALanguage: String);
+procedure TEditorColorOptionsFrame.SetColorSchemeItem(AScheme: String);
 var
   i: Integer;
 begin
-  for i := 0 to LanguageMenu.Items.Count - 1 do
-    LanguageMenu.Items[i].Checked := LanguageMenu.Items[i].Caption = ALanguage;
-  LanguageButton.Caption := ALanguage;
+  for i := 0 to ddlColorScheme.Items.Count - 1 do
+    if (ddlColorScheme.Items[i] = AScheme) then
+    begin
+      ddlColorScheme.ItemIndex := i;
+      Break;
+    end;
+  ResizeComboBox(ddlColorScheme); ;
 end;
 
-procedure TEditorColorOptionsFrame.SetColorSchemeItem(AScheme: String);
-var
-  i: Integer;
+procedure TEditorColorOptionsFrame.ResizeComboBox(Sender: TComboBox);
 begin
-  for i := 0 to ColorSchemeMenu.Items.Count - 1 do
-    ColorSchemeMenu.Items[i].Checked := ColorSchemeMenu.Items[i].Caption = AScheme;
-  ColorSchemeButton.Caption := AScheme;
+  Sender.Width := Canvas.TextWidth(Sender.Text) + 55;
 end;
 
 constructor TEditorColorOptionsFrame.Create(TheOwner: TComponent);
 begin
   inherited Create(TheOwner);
   FTempColorSchemeSettings := TColorSchemeFactory.Create;
-
-  ExportSaveDialog.Title := lisExport;
-  ExportSaveDialog.Filter := Format('%s|*.xml|', [dlgFilterXML]);
+  InvalidatePreferredSize;
+  dlgSaveExportFile.Title := lisExport;
+  dlgSaveExportFile.Filter := Format('%s|*.xml|', [dlgFilterXML]);
 end;
 
 destructor TEditorColorOptionsFrame.Destroy;
 begin
   FreeAndNil(FTempColorSchemeSettings);
-  FFileExtensions.Free;
-  FColorSchemes.Free;
+  FFileExtensionsList.Free;
+  FColorSchemesList.Free;
   inherited Destroy;
 end;
 
@@ -1441,50 +1433,34 @@ end;
 procedure TEditorColorOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
 var
   Items: TStringList;
-  Item: TMenuItem;
-  I: Integer;
 begin
   // Prevent the caret from moving
   ColorPreview.RegisterMouseActionSearchHandler(@DoSynEditMouse);
   FDialog := ADialog;
-  FCurHighlightElement := nil;
-  ToolBar.Images := IDEImages.Images_16;
-  ToolBar1.Images := IDEImages.Images_16;
+  FCurrentHighlightElement := nil;
 
   Items := TStringList.Create;
   try
     Items.Sorted := True;
     ColorSchemeFactory.GetRegisteredSchemes(Items);
-    for I := 0 to Items.Count - 1 do
-    begin
-      Item := NewItem(Items[I], 0, I = 0, True, @ColorSchemeMenuItemClick, 0, '');
-      Item.RadioItem := True;
-      Item.AutoCheck := True;
-      Item.GroupIndex := 1;
-      ColorSchemeMenu.Items.Add(Item);
-    end;
+    ddlColorScheme.Items.AddStrings(Items);
   finally
     Items.Free;
   end;
 
+  tglUseSyntaxHighlight.Caption := dlgEdOn;
+  lblUseSyntaxHighlight.Caption := dlgUseSyntaxHighlight;
+  lblLanguageSelection.Caption  := dlgLang;
+  lblColorScheme.Caption        := dlgClrScheme;
+  lblFileExtensions.Caption     := dlgFileExts;
+  btnSetAttributeToDefault.Caption := dlgSetElementDefault;
+  btnSetAllAttributesToDefault.Caption := dlgSetAllElementDefault;
+  btnExportToFile.Caption := lisExport;
 
-  UseSyntaxHighlightCheckBox.ImageIndex := IDEImages.LoadImage('laz_highlighter');
-  UseSyntaxHighlightCheckBox.Hint := dlgUseSyntaxHighlight;
-  LanguageButton.Hint := dlgLang;
-  ColorSchemeButton.Hint := dlgClrScheme;
-  FileExtensionsComboBox.hint := dlgFileExts;
-  SetAttributeToDefaultButton.ImageIndex := IDEImages.LoadImage('restore_default');
-  SetAttributeToDefaultButton.Hint := dlgSetElementDefault;
-  SetAllAttributesToDefaultButton.ImageIndex := IDEImages.LoadImage('restore_defaults');
-  SetAllAttributesToDefaultButton.Hint := dlgSetAllElementDefault;
-  btnExport.ImageIndex := IDEImages.LoadImage('laz_save');
-  btnExport.Hint := lisExport;
+  tglSchemeLayer.Caption := dlgUseSchemeDefaults;
 
-  tbtnGlobal.Caption := dlgUseSchemeDefaults;
-  tbtnLocal.Caption := dlgUseSchemeLocal;
-
-  tbnColor.Caption := dlgColors;
-  tbnPrior.Caption := dlgPriorities;
+  tbsColorEditor.Caption := dlgColors;
+  tbsPriorityEditor.Caption := dlgPriorities;
 
   ForePriorLabel.Caption := dlgForecolor;
   BackPriorLabel.Caption := dlgBackColor;
@@ -1503,7 +1479,6 @@ end;
 procedure TEditorColorOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
 var
   i: integer;
-  Item: TMenuItem;
 begin
   // here we are sure that Setup has been called for every frame =>
   // we can assign events to every registered preview control
@@ -1518,31 +1493,24 @@ begin
   with AOptions as TEditorOptions do
   begin
     FTempColorSchemeSettings.Assign(UserColorSchemeGroup);
-    UseSyntaxHighlightCheckBox.Down := UseSyntaxHighlight;
+    tglUseSyntaxHighlight.Checked := UseSyntaxHighlight;
 
-    Item := NewItem('- '+dlgEditSchemDefaults+' -', 0, False, True, @LanguageMenuItemClick, 0, '');
-    Item.RadioItem := True;
-    Item.AutoCheck := True;
-    Item.GroupIndex := 1;
-    LanguageMenu.Items.Add(Item);
+    ddlLanguageSelection.Items.Add('- ' + dlgEditSchemDefaults + ' -');
     for i := 0 to EditorOpts.HighlighterList.Count - 1 do
-    begin
-      Item := NewItem(HighlighterList[i].SynClass.GetLanguageName, 0, False, True, @LanguageMenuItemClick, 0, '');
-      Item.RadioItem := True;
-      Item.AutoCheck := True;
-      Item.GroupIndex := 1;
-      LanguageMenu.Items.Add(Item);
-    end;
+      ddlLanguageSelection.Items.Add(HighlighterList[i].SynClass.GetLanguageName);
 
-    with FileExtensionsComboBox, GeneralPage do
-      if CurLanguageID >= 0 then
-        SetComboBoxText(FileExtensionsComboBox,
-          HighlighterList[CurLanguageID].FileExtensions,cstFilename);
+    with ddeFileExtensions, GeneralPage do
+      if FCurrentLanguageID >= 0 then
+      begin
+        SetComboBoxText(ddeFileExtensions,
+          HighlighterList[FCurrentLanguageID].FileExtensions,cstFilename);
+        ResizeComboBox(ddeFileExtensions);
+      end;
 
     SetCurrentScheme(TPreviewPasSyn, GetColorSchemeForLang(TPreviewPasSyn.GetLanguageName));
-    CurLanguageID := HighlighterList.FindByClass(TCustomSynClass(FCurrentHighlighter.ClassType));
-    SetLanguageItem(FCurrentHighlighter.LanguageName);
-    SetColorSchemeItem(GetColorSchemeForLang(FCurrentHighlighter.LanguageName));
+    FCurrentLanguageID := HighlighterList.FindByClass(TCustomSynClass(FCurrentLanguageHighlighter.ClassType));
+    SetLanguageItem(FCurrentLanguageHighlighter.LanguageName);
+    SetColorSchemeItem(GetColorSchemeForLang(FCurrentLanguageHighlighter.LanguageName));
 
     tbnColorClick(nil);
     ShowCurAttribute;
@@ -1556,20 +1524,20 @@ var
 begin
   with AOptions as TEditorOptions do
   begin
-    UseSyntaxHighlight := UseSyntaxHighlightCheckBox.Down;
+    UseSyntaxHighlight := tglUseSyntaxHighlight.Checked;
 
-    if FFileExtensions <> nil then begin
-      for i := 0 to FFileExtensions.Count - 1 do begin
-        j := HighlighterList.FindByName(FFileExtensions.Names[i]);
+    if FFileExtensionsList <> nil then begin
+      for i := 0 to FFileExtensionsList.Count - 1 do begin
+        j := HighlighterList.FindByName(FFileExtensionsList.Names[i]);
         if j >= 0 then
-          HighlighterList[j].FileExtensions := FFileExtensions.ValueFromIndex[i];
+          HighlighterList[j].FileExtensions := FFileExtensionsList.ValueFromIndex[i];
       end;
     end;
 
-    if FColorSchemes <> nil then
-      for i := 0 to FColorSchemes.Count - 1 do
-         WriteColorScheme(FColorSchemes.Names[i],
-                          FColorSchemes.Values[FColorSchemes.Names[i]]);
+    if FColorSchemesList <> nil then
+      for i := 0 to FColorSchemesList.Count - 1 do
+         WriteColorScheme(FColorSchemesList.Names[i],
+                          FColorSchemesList.Values[FColorSchemesList.Names[i]]);
 
     // Write from userFactory
     UserColorSchemeGroup.Assign(FTempColorSchemeSettings);
@@ -1613,31 +1581,43 @@ end;
 
 procedure TEditorColorOptionsFrame.tbnColorClick(Sender: TObject);
 begin
-  PriorityEditor.Visible      := tbnPrior.Down;
-  SynColorAttrEditor1.Visible := not tbnPrior.Down;
   FillPriorEditor;
 end;
 
 procedure TEditorColorOptionsFrame.tglGlobalChange(Sender: TObject);
 begin
-  if (FCurHighlightElement = nil) then
+  if tglSchemeLayer.Checked then
+    tglSchemeLayer.Caption := dlgUseSchemeDefaults
+  else
+    tglSchemeLayer.Caption := dlgUseSchemeLocal;
+
+  if (FCurrentHighlightElement = nil) then
     exit;
 
-  if (FCurHighlightElement.GetSchemeGlobal <> nil) then begin
-    FCurHighlightElement.UseSchemeGlobals := tbtnGlobal.Down;
+  if (FCurrentHighlightElement.GetSchemeGlobal <> nil) then begin
+    FCurrentHighlightElement.UseSchemeGlobals := tglSchemeLayer.Checked;
     ShowCurAttribute;
     UpdateCurrentScheme;
   end;
 end;
 
+procedure TEditorColorOptionsFrame.tglUseSyntaxHighlightClick(Sender: TObject);
+begin
+  if tglUseSyntaxHighlight.Checked then
+     tglUseSyntaxHighlight.Caption := dlgEdOn
+  else
+     tglUseSyntaxHighlight.Caption := dlgEdOff;
+  ApplyCurrentScheme;
+end;
+
 function TEditorColorOptionsFrame.GetCurFileExtensions(const LanguageName: String): String;
 var
   i: Integer;
 begin
-  if FFileExtensions = nil then
+  if FFileExtensionsList = nil then
     Result := ''
   else
-    Result := FFileExtensions.Values[LanguageName];
+    Result := FFileExtensionsList.Values[LanguageName];
   if Result = '' then
   begin
     i := EditorOpts.HighlighterList.FindByName(LanguageName);
@@ -1648,9 +1628,9 @@ end;
 
 procedure TEditorColorOptionsFrame.SetCurFileExtensions(const LanguageName, FileExtensions: String);
 begin
-  if FFileExtensions = nil then
-    FFileExtensions := TStringList.Create;
-  FFileExtensions.Values[LanguageName] := FileExtensions;
+  if FFileExtensionsList = nil then
+    FFileExtensionsList := TStringList.Create;
+  FFileExtensionsList.Values[LanguageName] := FileExtensions;
 end;
 
 procedure TEditorColorOptionsFrame.OnSpecialLineMarkup(Sender: TObject;
@@ -1659,9 +1639,9 @@ var
   e: TColorSchemeAttribute;
   AddAttr: TAdditionalHilightAttribute;
 begin
-  if CurLanguageID < 0 then
+  if FCurrentLanguageID < 0 then
     exit;
-  AddAttr := EditorOpts.HighlighterList[CurLanguageID].SampleLineToAddAttr(Line);
+  AddAttr := EditorOpts.HighlighterList[FCurrentLanguageID].SampleLineToAddAttr(Line);
   if (AddAttr <> ahaNone) and (AddAttr <> ahaFoldedCode) then begin
     e := FCurrentColorScheme.AttributeByEnum[AddAttr];
     if e <> nil then begin
@@ -1676,7 +1656,7 @@ var
   Syn: TSynEdit;
   p: TPoint;
 begin
-  p := EditorOpts.HighlighterList[CurLanguageID].CaretXY;
+  p := EditorOpts.HighlighterList[FCurrentLanguageID].CaretXY;
   Syn := Sender as TSynEdit;
   if p.y > Syn.Lines.Count then exit;
   if (Syn.CaretX = p.x) and (Syn.Carety = p.y) then exit;
-- 
2.20.1

Martin Friebe

2019-04-25 18:27

manager   ~0115804

The changes take away a lot of vertical space (of which there already was way to little).
So I do not think it will be applied as it is.

Also it is normal for toolbars, not to have labels (well actually toolbars can toggle this). Labels integrated into the toolbar would still take a lot less (vertical) space.

>>>> About toolbars:
Labels for toolbars is a topic that may need a separate discussion on a wider scale. Toolbars are used all over the IDE, and in many places they have no labels (Not sure, it may be that in some places they do have labels).
That needs to be unified, and then would need *one* global option to toggle on/off for *all* toolbars.
<<<<

As for the current situation the buttons do have hints. Most (but not all) have self explaining icons/content.


In my opinion the problem with the page is less in the design of the page, but in the complexity how the colors can be configured, and how the final value is derived. This complexity will be hard to present in any GUI-layout. It requires an help page (F1 gets you to a help page on the wiki). With that understanding the page becomes more useful.


I agree that the combination of functionality on the lower toolbar is currently not well designed (it mixes the radio group global/locas, and the tab group color/prior => there is nothing wrong with the toolbar toggling the tabs, but in the current mix it may be confusing.

If there are usability changes (for this or other parts) they can be discussed (and the use of additional space can carefully be considered).
Such as it may be helpful, if the labels were changed like this
  " Use (and edit) global scheme settings" => " Use (and edit) the '-scheme global-' settings for element 'IDE Directive'"
   "Use local scheme settings" => "Use (and edit) the 'ObjectPacal' scheme settings for element 'IDE Directive'"
I am not sure they should merge into a single toggle button. IMHO 2 buttons are more informative.

----------------------------
In any case, I will ask around to see if there are other opinions.

Phemtik

2019-04-27 02:33

reporter   ~0115840

Changed 3 things
- Scheme Settings are TRadioButtons now for faster understanding
- On/Off Button slightly higher for more vertical Space
- Buttons are now TBitButton like the other setting buttons with images (use the Procedure IDEImages.AssignImage )

Toolbars
I follow the Design Guidelines from KDE/Gnome/MacOS/Windows for this particular problem.
KDE / GNOME / MacOS don't see it outside of the MainForm.
Microsoft say explicitly that it shouldn't used anywhere else.

To break the design line of the big 4 and most of the IDE itself, only to archive a bit more vertical space shouldn't be the goal.
Especially not at the cost of easy usability.
0001-redesign-of-Tools-Display-Colors-2.patch (97,302 bytes)   
---
 ide/frames/editor_color_options.lfm | 1706 +++++++++++++++------------
 ide/frames/editor_color_options.pas |  504 ++++----
 2 files changed, 1204 insertions(+), 1006 deletions(-)

diff --git a/ide/frames/editor_color_options.lfm b/ide/frames/editor_color_options.lfm
index a4dce0d980..f0deb67d1c 100644
--- a/ide/frames/editor_color_options.lfm
+++ b/ide/frames/editor_color_options.lfm
@@ -1,744 +1,886 @@
 object EditorColorOptionsFrame: TEditorColorOptionsFrame
   Left = 0
-  Height = 443
+  Height = 671
   Top = 0
-  Width = 640
-  ClientHeight = 443
-  ClientWidth = 640
+  Width = 564
+  ClientHeight = 671
+  ClientWidth = 564
+  OnResize = FrameResize
   TabOrder = 0
   Visible = False
-  DesignLeft = 401
-  DesignTop = 103
+  DesignLeft = 1110
+  DesignTop = 224
   object pnlElementAttributes: TPanel
     AnchorSideLeft.Control = Owner
-    AnchorSideTop.Control = PnlTop2
     AnchorSideTop.Side = asrBottom
     AnchorSideRight.Control = Owner
     AnchorSideRight.Side = asrBottom
     AnchorSideBottom.Control = Owner
     AnchorSideBottom.Side = asrBottom
     Left = 0
-    Height = 192
-    Top = 251
-    Width = 640
+    Height = 390
+    Top = 281
+    Width = 564
     Anchors = [akLeft, akRight, akBottom]
     AutoSize = True
+    BorderSpacing.Top = 6
     BevelOuter = bvNone
-    ClientHeight = 192
-    ClientWidth = 640
-    Constraints.MinHeight = 192
-    TabOrder = 1
+    ClientHeight = 390
+    ClientWidth = 564
+    TabOrder = 0
     object bvlAttributeSection: TDividerBevel
       Left = 0
-      Height = 15
+      Height = 19
       Top = 0
-      Width = 640
+      Width = 564
       Caption = 'bvlAttributeSection'
       Align = alTop
       Font.Style = [fsBold]
       ParentFont = False
     end
-    object ToolBar1: TToolBar
-      Left = 3
-      Height = 24
-      Top = 15
-      Width = 634
-      AutoSize = True
-      BorderSpacing.Left = 3
-      BorderSpacing.Right = 3
-      Caption = 'ToolBar1'
-      EdgeBorders = [ebBottom]
-      ParentShowHint = False
-      ShowCaptions = True
-      ShowHint = True
-      TabOrder = 0
-      object tbtnGlobal: TToolButton
-        Tag = 1
-        Left = 1
-        Top = 0
-        AutoSize = True
-        Caption = 'tbtnGlobal'
-        Down = True
-        Grouped = True
-        OnClick = tglGlobalChange
-        Style = tbsCheck
-      end
-      object tbtnLocal: TToolButton
-        Tag = 1
-        Left = 65
-        Top = 0
-        AutoSize = True
-        Caption = 'tbtnLocal'
-        Grouped = True
-        OnClick = tglGlobalChange
-        Style = tbsCheck
-      end
-      object SetAttributeToDefaultButton: TToolButton
-        Left = 245
-        Top = 0
-        OnClick = SetAttributeToDefaultButtonClick
-        ShowCaption = False
-      end
-      object ToolButton3: TToolButton
-        Left = 237
-        Height = 22
-        Top = 0
-        Caption = 'ToolButton3'
-        Style = tbsSeparator
-      end
-      object ToolButton1: TToolButton
-        Left = 123
-        Height = 22
-        Top = 0
-        Caption = 'ToolButton1'
-        Style = tbsSeparator
-      end
-      object tbnColor: TToolButton
-        Left = 131
-        Top = 0
-        AutoSize = True
-        Caption = 'tbnColor'
-        Down = True
-        Grouped = True
-        OnClick = tbnColorClick
-        Style = tbsCheck
-      end
-      object tbnPrior: TToolButton
-        Left = 186
-        Top = 0
-        AutoSize = True
-        Caption = 'tbnPrior'
-        Grouped = True
-        OnClick = tbnColorClick
-        Style = tbsCheck
-      end
-    end
-    inline SynColorAttrEditor1: TSynColorAttrEditor
+    object PageControl1: TPageControl
       AnchorSideLeft.Control = pnlElementAttributes
-      AnchorSideTop.Control = ToolBar1
+      AnchorSideTop.Control = pnlSchemeLayerAndReset
       AnchorSideTop.Side = asrBottom
-      AnchorSideRight.Control = bvlAttributeSection
+      AnchorSideRight.Control = pnlElementAttributes
       AnchorSideRight.Side = asrBottom
       AnchorSideBottom.Control = pnlElementAttributes
       AnchorSideBottom.Side = asrBottom
-      Height = 153
-      Top = 39
-      Width = 640
+      Left = 0
+      Height = 320
+      Top = 70
+      Width = 564
+      ActivePage = tbsColorEditor
       Anchors = [akTop, akLeft, akRight, akBottom]
-      ClientHeight = 153
-      ClientWidth = 640
-      TabOrder = 1
-      inherited ForeGroundLabel: TLabel
-        Top = 7
-        Width = 91
-      end
-      inherited BackGroundLabel: TLabel
-        Top = 32
-        Width = 93
-      end
-      inherited ForeGroundUseDefaultCheckBox: TCheckBox
-        AnchorSideLeft.Control = SynColorAttrEditor1
-        Height = 19
-        Width = 192
-      end
-      inherited ForegroundColorBox: TColorBox
-        AnchorSideTop.Control = SynColorAttrEditor1
-        AnchorSideRight.Control = SynColorAttrEditor1
-        Left = 204
-        Height = 22
-        Width = 200
-      end
-      inherited BackGroundColorBox: TColorBox
-        AnchorSideRight.Control = SynColorAttrEditor1
-        Left = 204
-        Height = 22
-        Top = 28
-        Width = 200
-      end
-      inherited BackGroundUseDefaultCheckBox: TCheckBox
-        AnchorSideLeft.Control = SynColorAttrEditor1
-        Height = 19
-        Top = 30
-        Width = 194
-      end
-      inherited FrameColorBox: TColorBox
-        AnchorSideRight.Control = SynColorAttrEditor1
-        Left = 204
-        Height = 22
-        Top = 53
-        Width = 200
-      end
-      inherited FrameColorUseDefaultCheckBox: TCheckBox
-        AnchorSideLeft.Control = SynColorAttrEditor1
-        Height = 19
-        Top = 55
-        Width = 191
-      end
-      inherited pnlUnderline: TPanel
-        AnchorSideLeft.Control = SynColorAttrEditor1
-        Height = 40
-        Top = 102
-        Width = 145
-        ClientHeight = 40
-        ClientWidth = 145
-        inherited TextUnderlineRadioPanel: TPanel
-          Height = 21
-          Top = 19
-          Width = 134
-          ClientHeight = 21
-          ClientWidth = 134
-          inherited TextUnderlineRadioOn: TRadioButton
+      BorderSpacing.Top = 6
+      TabIndex = 0
+      TabOrder = 0
+      OnChange = tbnColorClick
+      object tbsColorEditor: TTabSheet
+        Caption = 'tbsColorEditor'
+        ClientHeight = 281
+        ClientWidth = 558
+        inline SynColorAttrEditor1: TSynColorAttrEditor
+          AnchorSideLeft.Control = tbsColorEditor
+          AnchorSideTop.Control = tbsColorEditor
+          AnchorSideRight.Control = tbsColorEditor
+          AnchorSideRight.Side = asrBottom
+          AnchorSideBottom.Control = tbsColorEditor
+          AnchorSideBottom.Side = asrBottom
+          Height = 281
+          Width = 558
+          HorzScrollBar.Page = 622
+          HorzScrollBar.Range = 622
+          VertScrollBar.Page = 243
+          VertScrollBar.Range = 243
+          Anchors = [akTop, akLeft, akRight]
+          AutoSize = True
+          ClientHeight = 281
+          ClientWidth = 558
+          Constraints.MinHeight = 0
+          inherited ForeGroundLabel: TLabel
             Height = 19
-            Width = 36
+            Top = 13
+            Width = 116
           end
-          inherited TextUnderlineRadioOff: TRadioButton
-            Left = 43
+          inherited BackGroundLabel: TLabel
             Height = 19
-            Width = 37
+            Top = 55
+            Width = 117
+          end
+          inherited ForeGroundUseDefaultCheckBox: TCheckBox
+            AnchorSideLeft.Control = SynColorAttrEditor1
+            Height = 32
+            Top = 6
+            Width = 253
+          end
+          inherited ForegroundColorBox: TColorBox
+            AnchorSideTop.Control = SynColorAttrEditor1
+            AnchorSideRight.Control = SynColorAttrEditor1
+            Left = 265
+            Height = 39
+          end
+          inherited BackGroundColorBox: TColorBox
+            AnchorSideRight.Control = SynColorAttrEditor1
+            Left = 265
+            Height = 39
+            Top = 45
+            OnChange = nil
+          end
+          inherited BackGroundUseDefaultCheckBox: TCheckBox
+            AnchorSideLeft.Control = SynColorAttrEditor1
+            Height = 32
+            Top = 48
+            Width = 254
+          end
+          inherited FrameColorBox: TColorBox
+            AnchorSideRight.Control = SynColorAttrEditor1
+            Left = 265
+            Height = 39
+            Top = 87
           end
-          inherited TextUnderlineRadioInvert: TRadioButton
-            Left = 83
+          inherited FrameColorUseDefaultCheckBox: TCheckBox
+            AnchorSideLeft.Control = SynColorAttrEditor1
+            Height = 32
+            Top = 90
+            Width = 253
+          end
+          inherited pnlUnderline: TPanel
+            AnchorSideLeft.Control = SynColorAttrEditor1
+            Height = 64
+            Top = 213
+            Width = 192
+            ClientHeight = 64
+            ClientWidth = 192
+            inherited TextUnderlineRadioPanel: TPanel
+              Height = 32
+              Top = 32
+              Width = 189
+              BevelInner = bvNone
+              ClientHeight = 32
+              ClientWidth = 189
+              inherited TextUnderlineRadioOn: TRadioButton
+                Left = 3
+                Height = 32
+                Top = 0
+                Width = 53
+              end
+              inherited TextUnderlineRadioOff: TRadioButton
+                Left = 59
+                Height = 32
+                Top = 0
+                Width = 55
+              end
+              inherited TextUnderlineRadioInvert: TRadioButton
+                Left = 117
+                Height = 32
+                Top = 0
+                Width = 72
+              end
+            end
+            inherited TextUnderlineCheckBox: TCheckBox
+              Height = 32
+              Width = 192
+            end
+          end
+          inherited pnlBold: TPanel
+            Left = 204
+            Height = 64
+            Top = 213
+            Width = 189
+            ClientHeight = 64
+            ClientWidth = 189
+            inherited TextBoldRadioPanel: TPanel
+              Height = 32
+              Top = 32
+              Width = 189
+              BevelInner = bvNone
+              ClientHeight = 32
+              ClientWidth = 189
+              inherited TextBoldRadioInvert: TRadioButton
+                Left = 117
+                Height = 32
+                Top = 0
+                Width = 72
+              end
+              inherited TextBoldRadioOn: TRadioButton
+                Left = 3
+                Height = 32
+                Top = 0
+                Width = 53
+              end
+              inherited TextBoldRadioOff: TRadioButton
+                Left = 59
+                Height = 32
+                Top = 0
+                Width = 55
+              end
+            end
+            inherited TextBoldCheckBox: TCheckBox
+              Height = 32
+              Width = 158
+            end
+          end
+          inherited pnlItalic: TPanel
+            Left = 399
+            Height = 64
+            Top = 213
+            Width = 189
+            ClientHeight = 64
+            ClientWidth = 189
+            inherited TextItalicRadioPanel: TPanel
+              Height = 32
+              Top = 32
+              Width = 189
+              BevelInner = bvNone
+              ClientHeight = 32
+              ClientWidth = 189
+              inherited TextItalicRadioInvert: TRadioButton
+                Left = 117
+                Height = 32
+                Top = 0
+                Width = 72
+              end
+              inherited TextItalicRadioOn: TRadioButton
+                Left = 3
+                Height = 32
+                Top = 0
+                Width = 53
+              end
+              inherited TextItalicRadioOff: TRadioButton
+                Left = 59
+                Height = 32
+                Top = 0
+                Width = 55
+              end
+            end
+            inherited TextItalicCheckBox: TCheckBox
+              Height = 32
+              Width = 160
+            end
+          end
+          inherited FrameStyleBox: TComboBox
+            Left = 368
+            Height = 39
+            Top = 129
+          end
+          inherited FrameEdgesBox: TComboBox
+            Left = 265
+            Height = 39
+            Top = 129
+          end
+          inherited ColumnPosBevel: TPanel
+            Left = 265
+            Top = 280
+          end
+          inherited ForeAlphaLabel: TLabel
+            Left = 475
             Height = 19
-            Width = 50
+            Top = 13
+            Width = 105
           end
-        end
-        inherited TextUnderlineCheckBox: TCheckBox
-          Height = 19
-          Width = 145
-        end
-      end
-      inherited pnlBold: TPanel
-        Left = 157
-        Height = 40
-        Top = 102
-        Width = 134
-        ClientHeight = 40
-        ClientWidth = 134
-        inherited TextBoldRadioPanel: TPanel
-          Height = 21
-          Top = 19
-          Width = 134
-          ClientHeight = 21
-          ClientWidth = 134
-          inherited TextBoldRadioInvert: TRadioButton
-            Left = 83
+          inherited BackAlphaLabel: TLabel
+            Left = 475
             Height = 19
-            Width = 50
+            Top = 55
+            Width = 106
           end
-          inherited TextBoldRadioOn: TRadioButton
+          inherited FrameAlphaLabel: TLabel
+            Left = 475
             Height = 19
-            Width = 36
+            Top = 97
+            Width = 118
+          end
+          inherited ForeAlphaSpin: TSpinEdit
+            Left = 586
+            Height = 39
+          end
+          inherited BackAlphaSpin: TSpinEdit
+            Left = 587
+            Height = 39
+            Top = 45
+          end
+          inherited FrameAlphaSpin: TSpinEdit
+            Left = 599
+            Height = 39
+            Top = 87
           end
-          inherited TextBoldRadioOff: TRadioButton
-            Left = 43
+          inherited ForePriorLabel: TLabel
+            Left = 661
             Height = 19
-            Width = 37
+            Top = 13
+            Width = 100
           end
-        end
-        inherited TextBoldCheckBox: TCheckBox
-          Height = 19
-          Width = 118
-        end
-      end
-      inherited pnlItalic: TPanel
-        Left = 297
-        Height = 40
-        Top = 102
-        Width = 134
-        ClientHeight = 40
-        ClientWidth = 134
-        inherited TextItalicRadioPanel: TPanel
-          Height = 21
-          Top = 19
-          Width = 134
-          ClientHeight = 21
-          ClientWidth = 134
-          inherited TextItalicRadioInvert: TRadioButton
-            Left = 83
+          inherited BackPriorLabel: TLabel
+            Left = 662
             Height = 19
-            Width = 50
+            Top = 55
+            Width = 101
           end
-          inherited TextItalicRadioOn: TRadioButton
+          inherited FramePriorLabel: TLabel
+            Left = 674
             Height = 19
-            Width = 36
+            Top = 97
+            Width = 113
+          end
+          inherited ForePriorSpin: TSpinEdit
+            Left = 767
+            Height = 39
+          end
+          inherited BackPriorSpin: TSpinEdit
+            Left = 769
+            Height = 39
+            Top = 45
+          end
+          inherited FramePriorSpin: TSpinEdit
+            Left = 793
+            Height = 39
+            Top = 87
+          end
+          inherited MarkupFoldColorUseDefaultCheckBox: TCheckBox
+            AnchorSideLeft.Control = SynColorAttrEditor1
+            Height = 32
+            Top = 174
+            Width = 288
           end
-          inherited TextItalicRadioOff: TRadioButton
-            Left = 43
+          inherited MarkupFoldColorBox: TColorBox
+            Left = 265
+            Height = 39
+            Top = 171
+          end
+          inherited MarkupFoldAlphaLabel: TLabel
+            Left = 475
             Height = 19
-            Width = 37
+            Top = 181
+            Width = 153
           end
-        end
-        inherited TextItalicCheckBox: TCheckBox
-          Height = 19
-          Width = 119
-        end
-      end
-      inherited FrameStyleBox: TComboBox
-        Left = 307
-        Height = 21
-        Top = 78
-      end
-      inherited FrameEdgesBox: TComboBox
-        Left = 204
-        Height = 21
-        Top = 78
-      end
-      inherited ColumnPosBevel: TPanel
-        Left = 204
-        Top = 145
-      end
-      inherited ForeAlphaLabel: TLabel
-        Left = 414
-        Top = 7
-        Width = 82
-      end
-      inherited BackAlphaLabel: TLabel
-        Left = 414
-        Top = 32
-        Width = 84
-      end
-      inherited FrameAlphaLabel: TLabel
-        Left = 414
-        Top = 57
-        Width = 92
-      end
-      inherited ForeAlphaSpin: TSpinEdit
-        Left = 502
-        Height = 23
-        Top = 3
-      end
-      inherited BackAlphaSpin: TSpinEdit
-        Left = 504
-        Height = 23
-        Top = 28
-      end
-      inherited FrameAlphaSpin: TSpinEdit
-        Left = 512
-        Height = 23
-        Top = 53
-      end
-      inherited ForePriorLabel: TLabel
-        Left = 567
-        Top = 7
-        Width = 76
-      end
-      inherited BackPriorLabel: TLabel
-        Left = 569
-        Top = 32
-        Width = 78
-      end
-      inherited FramePriorLabel: TLabel
-        Left = 577
-        Top = 57
-        Width = 86
-      end
-      inherited ForePriorSpin: TSpinEdit
-        Left = 649
-        Height = 23
-        Top = 3
-      end
-      inherited BackPriorSpin: TSpinEdit
-        Left = 653
-        Height = 23
-        Top = 28
-      end
-      inherited FramePriorSpin: TSpinEdit
-        Left = 669
-        Height = 23
-        Top = 53
-      end
-    end
-    object PriorityEditor: TPanel
-      AnchorSideLeft.Control = pnlElementAttributes
-      AnchorSideTop.Control = ToolBar1
-      AnchorSideTop.Side = asrBottom
-      AnchorSideRight.Control = pnlElementAttributes
-      AnchorSideRight.Side = asrBottom
-      AnchorSideBottom.Control = pnlElementAttributes
-      AnchorSideBottom.Side = asrBottom
-      Left = 0
-      Height = 153
-      Top = 39
-      Width = 640
-      Anchors = [akTop, akLeft, akRight, akBottom]
-      ClientHeight = 153
-      ClientWidth = 640
-      Constraints.MinHeight = 140
-      TabOrder = 2
-      object ForePriorPanel: TPanel
-        Left = 1
-        Height = 151
-        Top = 1
-        Width = 170
-        Align = alLeft
-        ClientHeight = 151
-        ClientWidth = 170
-        TabOrder = 0
-        object ForePriorLabel: TLabel
-          Left = 1
-          Height = 15
-          Top = 1
-          Width = 168
-          Align = alTop
-          Caption = 'ForePriorLabel'
-          ParentColor = False
-        end
-        object ForePriorList: TTreeView
-          Left = 1
-          Height = 102
-          Top = 16
-          Width = 168
-          Align = alClient
-          AutoExpand = True
-          ReadOnly = True
-          ScrollBars = ssAutoVertical
-          ShowButtons = False
-          ShowLines = False
-          ShowRoot = False
-          SortType = stData
-          TabOrder = 0
-          OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
-          OnClick = ForePriorListClick
-          OnCompare = ForePriorListCompare
-          Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
-          TreeLinePenStyle = psClear
-        end
-        object ForePriorValPanel: TPanel
-          Left = 1
-          Height = 31
-          Top = 119
-          Width = 168
-          Align = alBottom
-          AutoSize = True
-          BorderSpacing.Top = 1
-          BevelOuter = bvNone
-          ClientHeight = 31
-          ClientWidth = 168
-          TabOrder = 1
-          object ForePriorEdit: TEdit
-            AnchorSideRight.Control = ForePriorUpDown
-            Left = 1
-            Height = 23
-            Top = 0
-            Width = 147
-            Anchors = [akTop, akLeft, akRight]
-            BorderSpacing.Right = 3
-            OnEditingDone = ForePriorEditChange
-            OnKeyPress = ForePriorEditKeyPress
-            TabOrder = 0
-            Text = '0'
+          inherited MarkupFoldAlphaSpin: TSpinEdit
+            Left = 634
+            Height = 39
+            Top = 171
           end
-          object ForePriorUpDown: TUpDown
-            AnchorSideTop.Control = ForePriorValPanel
-            AnchorSideRight.Control = ForePriorValPanel
-            AnchorSideRight.Side = asrBottom
-            AnchorSideBottom.Control = ForePriorValPanel
-            AnchorSideBottom.Side = asrBottom
-            Left = 151
-            Height = 31
-            Top = 0
-            Width = 17
-            Anchors = [akTop, akRight, akBottom]
-            Min = 0
-            OnClick = ForePriorUpDownClick
-            Position = 0
-            TabOrder = 1
-            Wrap = False
+          inherited MarkupFoldStyleBox: TComboBox
+            Left = 705
+            Height = 39
+            Top = 174
           end
         end
       end
-      object BackPriorPanel: TPanel
-        Left = 177
-        Height = 151
-        Top = 1
-        Width = 170
-        Align = alLeft
-        BorderSpacing.Left = 6
-        ClientHeight = 151
-        ClientWidth = 170
-        TabOrder = 1
-        object BackPriorLabel: TLabel
-          Left = 1
-          Height = 15
-          Top = 1
-          Width = 168
-          Align = alTop
-          Caption = 'Label1'
-          ParentColor = False
-        end
-        object BackPriorList: TTreeView
-          Left = 1
-          Height = 102
-          Top = 16
-          Width = 168
-          Align = alClient
-          AutoExpand = True
-          ReadOnly = True
-          ScrollBars = ssAutoVertical
-          ShowButtons = False
-          ShowLines = False
-          ShowRoot = False
-          SortType = stData
-          TabOrder = 0
-          OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
-          OnClick = ForePriorListClick
-          OnCompare = ForePriorListCompare
-          Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
-          TreeLinePenStyle = psClear
-        end
-        object BackPriorValPanel: TPanel
-          Left = 1
-          Height = 31
-          Top = 119
-          Width = 168
-          Align = alBottom
-          AutoSize = True
-          BorderSpacing.Top = 1
+      object tbsPriorityEditor: TTabSheet
+        Caption = 'tbsPriorityEditor'
+        ClientHeight = 281
+        ClientWidth = 558
+        object PriorityEditor: TPanel
+          AnchorSideLeft.Control = tbsPriorityEditor
+          AnchorSideTop.Control = tbsPriorityEditor
+          AnchorSideRight.Control = tbsPriorityEditor
+          AnchorSideRight.Side = asrBottom
+          AnchorSideBottom.Control = tbsPriorityEditor
+          AnchorSideBottom.Side = asrBottom
+          Left = 0
+          Height = 156
+          Top = 0
+          Width = 558
+          Anchors = [akTop, akLeft, akRight, akBottom]
           BevelOuter = bvNone
-          ClientHeight = 31
-          ClientWidth = 168
-          TabOrder = 1
-          object BackPriorEdit: TEdit
-            AnchorSideRight.Control = BackPriorUpDown
+          ClientHeight = 156
+          ClientWidth = 558
+          TabOrder = 0
+          object ForePriorPanel: TPanel
+            AnchorSideLeft.Control = PriorityEditor
+            AnchorSideTop.Control = PriorityEditor
+            AnchorSideBottom.Control = PriorityEditor
+            AnchorSideBottom.Side = asrBottom
             Left = 0
-            Height = 23
+            Height = 156
             Top = 0
-            Width = 148
-            Anchors = [akTop, akLeft, akRight]
-            BorderSpacing.Right = 3
-            OnEditingDone = ForePriorEditChange
-            OnKeyPress = ForePriorEditKeyPress
+            Width = 123
+            Anchors = [akTop, akLeft, akBottom]
+            BevelOuter = bvNone
+            ClientHeight = 156
+            ClientWidth = 123
             TabOrder = 0
-            Text = '0'
+            object ForePriorLabel: TLabel
+              AnchorSideLeft.Control = ForePriorPanel
+              AnchorSideTop.Control = ForePriorPanel
+              AnchorSideRight.Control = ForePriorPanel
+              AnchorSideRight.Side = asrBottom
+              Left = 0
+              Height = 19
+              Top = 0
+              Width = 123
+              Anchors = [akTop, akLeft, akRight]
+              Caption = 'ForePriorLabel'
+              ParentColor = False
+            end
+            object ForePriorList: TTreeView
+              AnchorSideLeft.Control = ForePriorPanel
+              AnchorSideTop.Control = ForePriorLabel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = ForePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = ForePriorValPanel
+              Left = 0
+              Height = 98
+              Top = 19
+              Width = 123
+              Anchors = [akTop, akLeft, akRight, akBottom]
+              ReadOnly = True
+              ScrollBars = ssAutoVertical
+              ShowButtons = False
+              ShowLines = False
+              ShowRoot = False
+              SortType = stData
+              TabOrder = 0
+              OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
+              OnClick = ForePriorListClick
+              OnCompare = ForePriorListCompare
+              Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
+              TreeLinePenStyle = psClear
+            end
+            object ForePriorValPanel: TPanel
+              AnchorSideLeft.Control = ForePriorPanel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = ForePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = ForePriorPanel
+              AnchorSideBottom.Side = asrBottom
+              Left = 0
+              Height = 39
+              Top = 117
+              Width = 123
+              Anchors = [akLeft, akRight, akBottom]
+              AutoSize = True
+              BevelOuter = bvNone
+              ClientHeight = 39
+              ClientWidth = 123
+              TabOrder = 1
+              object ForePriorEdit: TEdit
+                AnchorSideLeft.Control = ForePriorValPanel
+                AnchorSideTop.Control = ForePriorValPanel
+                AnchorSideRight.Control = ForePriorUpDown
+                AnchorSideBottom.Side = asrBottom
+                Left = 0
+                Height = 39
+                Top = 0
+                Width = 103
+                Anchors = [akTop, akLeft, akRight]
+                BorderSpacing.Right = 3
+                OnEditingDone = ForePriorEditChange
+                OnKeyPress = ForePriorEditKeyPress
+                TabOrder = 0
+                Text = '0'
+              end
+              object ForePriorUpDown: TUpDown
+                AnchorSideTop.Control = ForePriorValPanel
+                AnchorSideRight.Control = ForePriorValPanel
+                AnchorSideRight.Side = asrBottom
+                AnchorSideBottom.Control = ForePriorValPanel
+                AnchorSideBottom.Side = asrBottom
+                Left = 106
+                Height = 39
+                Top = 0
+                Width = 17
+                Anchors = [akTop, akRight, akBottom]
+                Min = 0
+                OnClick = ForePriorUpDownClick
+                Position = 0
+                TabOrder = 1
+              end
+            end
           end
-          object BackPriorUpDown: TUpDown
-            AnchorSideTop.Control = BackPriorValPanel
-            AnchorSideRight.Control = BackPriorValPanel
-            AnchorSideRight.Side = asrBottom
-            AnchorSideBottom.Control = BackPriorValPanel
+          object BackPriorPanel: TPanel
+            AnchorSideLeft.Control = ForePriorPanel
+            AnchorSideLeft.Side = asrBottom
+            AnchorSideTop.Control = PriorityEditor
+            AnchorSideBottom.Control = PriorityEditor
             AnchorSideBottom.Side = asrBottom
-            Left = 151
-            Height = 31
+            Left = 129
+            Height = 156
             Top = 0
-            Width = 17
-            Anchors = [akTop, akRight, akBottom]
-            Min = 0
-            OnClick = ForePriorUpDownClick
-            Position = 0
+            Width = 123
+            Anchors = [akTop, akLeft, akBottom]
+            BorderSpacing.Left = 6
+            BevelOuter = bvNone
+            ClientHeight = 156
+            ClientWidth = 123
             TabOrder = 1
-            Wrap = False
+            object BackPriorLabel: TLabel
+              AnchorSideLeft.Control = BackPriorPanel
+              AnchorSideTop.Control = BackPriorPanel
+              AnchorSideRight.Control = BackPriorPanel
+              AnchorSideRight.Side = asrBottom
+              Left = 0
+              Height = 19
+              Top = 0
+              Width = 123
+              Anchors = [akTop, akLeft, akRight]
+              Caption = 'BackPriorLabel'
+              ParentColor = False
+            end
+            object BackPriorList: TTreeView
+              AnchorSideLeft.Control = BackPriorPanel
+              AnchorSideTop.Control = BackPriorLabel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = BackPriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = BackPriorValPanel
+              Left = 0
+              Height = 97
+              Top = 19
+              Width = 123
+              Anchors = [akTop, akLeft, akRight, akBottom]
+              ReadOnly = True
+              ScrollBars = ssAutoVertical
+              ShowButtons = False
+              ShowLines = False
+              ShowRoot = False
+              SortType = stData
+              TabOrder = 0
+              OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
+              OnClick = ForePriorListClick
+              OnCompare = ForePriorListCompare
+              Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
+              TreeLinePenStyle = psClear
+            end
+            object BackPriorValPanel: TPanel
+              AnchorSideLeft.Control = BackPriorPanel
+              AnchorSideTop.Control = BackPriorList
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = BackPriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = BackPriorPanel
+              AnchorSideBottom.Side = asrBottom
+              Left = 0
+              Height = 39
+              Top = 117
+              Width = 123
+              Anchors = [akLeft, akRight, akBottom]
+              AutoSize = True
+              BorderSpacing.Top = 1
+              BevelOuter = bvNone
+              ClientHeight = 39
+              ClientWidth = 123
+              TabOrder = 1
+              object BackPriorEdit: TEdit
+                AnchorSideLeft.Control = BackPriorValPanel
+                AnchorSideTop.Control = BackPriorValPanel
+                AnchorSideRight.Control = BackPriorUpDown
+                AnchorSideBottom.Side = asrBottom
+                Left = 0
+                Height = 39
+                Top = 0
+                Width = 103
+                Anchors = [akTop, akLeft, akRight]
+                BorderSpacing.Right = 3
+                OnEditingDone = ForePriorEditChange
+                OnKeyPress = ForePriorEditKeyPress
+                TabOrder = 0
+                Text = '0'
+              end
+              object BackPriorUpDown: TUpDown
+                AnchorSideTop.Control = BackPriorValPanel
+                AnchorSideRight.Control = BackPriorValPanel
+                AnchorSideRight.Side = asrBottom
+                AnchorSideBottom.Control = BackPriorValPanel
+                AnchorSideBottom.Side = asrBottom
+                Left = 106
+                Height = 39
+                Top = 0
+                Width = 17
+                Anchors = [akTop, akRight, akBottom]
+                Min = 0
+                OnClick = ForePriorUpDownClick
+                Position = 0
+                TabOrder = 1
+              end
+            end
           end
-        end
-      end
-      object FramePriorPanel: TPanel
-        Left = 353
-        Height = 151
-        Top = 1
-        Width = 170
-        Align = alLeft
-        BorderSpacing.Left = 6
-        ClientHeight = 151
-        ClientWidth = 170
-        TabOrder = 2
-        object FramePriorLabel: TLabel
-          Left = 1
-          Height = 15
-          Top = 1
-          Width = 168
-          Align = alTop
-          Caption = 'Label1'
-          ParentColor = False
-        end
-        object FramePriorList: TTreeView
-          Left = 1
-          Height = 102
-          Top = 16
-          Width = 168
-          Align = alClient
-          AutoExpand = True
-          ReadOnly = True
-          ScrollBars = ssAutoVertical
-          ShowButtons = False
-          ShowLines = False
-          ShowRoot = False
-          SortType = stData
-          TabOrder = 0
-          OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
-          OnClick = ForePriorListClick
-          OnCompare = ForePriorListCompare
-          Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
-          TreeLinePenStyle = psClear
-        end
-        object FramePriorValPanel: TPanel
-          Left = 1
-          Height = 31
-          Top = 119
-          Width = 168
-          Align = alBottom
-          AutoSize = True
-          BorderSpacing.Top = 1
-          BevelOuter = bvNone
-          ClientHeight = 31
-          ClientWidth = 168
-          TabOrder = 1
-          object FramePriorEdit: TEdit
-            AnchorSideRight.Control = FramePriorUpDown
-            Left = 0
-            Height = 23
+          object FramePriorPanel: TPanel
+            AnchorSideLeft.Control = BackPriorPanel
+            AnchorSideLeft.Side = asrBottom
+            AnchorSideTop.Control = PriorityEditor
+            AnchorSideBottom.Control = PriorityEditor
+            AnchorSideBottom.Side = asrBottom
+            Left = 258
+            Height = 156
             Top = 0
-            Width = 148
-            Anchors = [akTop, akLeft, akRight]
-            BorderSpacing.Right = 3
-            OnEditingDone = ForePriorEditChange
-            OnKeyPress = ForePriorEditKeyPress
-            TabOrder = 0
-            Text = '0'
+            Width = 123
+            Anchors = [akTop, akLeft, akBottom]
+            BorderSpacing.Left = 6
+            BevelOuter = bvNone
+            ClientHeight = 156
+            ClientWidth = 123
+            TabOrder = 3
+            object FramePriorLabel: TLabel
+              AnchorSideLeft.Control = FramePriorPanel
+              AnchorSideTop.Control = FramePriorPanel
+              AnchorSideRight.Control = FramePriorPanel
+              AnchorSideRight.Side = asrBottom
+              Left = 0
+              Height = 19
+              Top = 0
+              Width = 123
+              Anchors = [akTop, akLeft, akRight]
+              Caption = 'FramePriorLabel'
+              ParentColor = False
+            end
+            object FramePriorList: TTreeView
+              AnchorSideLeft.Control = FramePriorPanel
+              AnchorSideTop.Control = FramePriorLabel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = FramePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = FramePriorValPanel
+              Left = 0
+              Height = 97
+              Top = 19
+              Width = 123
+              Anchors = [akTop, akLeft, akRight, akBottom]
+              ReadOnly = True
+              ScrollBars = ssAutoVertical
+              ShowButtons = False
+              ShowLines = False
+              ShowRoot = False
+              SortType = stData
+              TabOrder = 0
+              OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
+              OnClick = ForePriorListClick
+              OnCompare = ForePriorListCompare
+              Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
+              TreeLinePenStyle = psClear
+            end
+            object FramePriorValPanel: TPanel
+              AnchorSideLeft.Control = FramePriorPanel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = FramePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = FramePriorPanel
+              AnchorSideBottom.Side = asrBottom
+              Left = 0
+              Height = 39
+              Top = 117
+              Width = 123
+              Anchors = [akLeft, akRight, akBottom]
+              AutoSize = True
+              BorderSpacing.Top = 1
+              BevelOuter = bvNone
+              ClientHeight = 39
+              ClientWidth = 123
+              TabOrder = 1
+              object FramePriorEdit: TEdit
+                AnchorSideLeft.Control = FramePriorValPanel
+                AnchorSideTop.Control = FramePriorValPanel
+                AnchorSideRight.Control = FramePriorUpDown
+                AnchorSideBottom.Side = asrBottom
+                Left = 0
+                Height = 39
+                Top = 0
+                Width = 103
+                Anchors = [akTop, akLeft, akRight]
+                BorderSpacing.Right = 3
+                OnEditingDone = ForePriorEditChange
+                OnKeyPress = ForePriorEditKeyPress
+                TabOrder = 0
+                Text = '0'
+              end
+              object FramePriorUpDown: TUpDown
+                AnchorSideTop.Control = FramePriorValPanel
+                AnchorSideRight.Control = FramePriorValPanel
+                AnchorSideRight.Side = asrBottom
+                AnchorSideBottom.Control = FramePriorValPanel
+                AnchorSideBottom.Side = asrBottom
+                Left = 106
+                Height = 39
+                Top = 0
+                Width = 17
+                Anchors = [akTop, akRight, akBottom]
+                Min = 0
+                OnClick = ForePriorUpDownClick
+                Position = 0
+                TabOrder = 1
+              end
+            end
           end
-          object FramePriorUpDown: TUpDown
-            AnchorSideTop.Control = FramePriorValPanel
-            AnchorSideRight.Control = FramePriorValPanel
+          object StylePriorPanel: TPanel
+            AnchorSideLeft.Control = FramePriorPanel
+            AnchorSideLeft.Side = asrBottom
+            AnchorSideTop.Control = PriorityEditor
+            AnchorSideRight.Control = PriorityEditor
             AnchorSideRight.Side = asrBottom
-            AnchorSideBottom.Control = FramePriorValPanel
+            AnchorSideBottom.Control = PriorityEditor
             AnchorSideBottom.Side = asrBottom
-            Left = 151
-            Height = 31
+            Left = 387
+            Height = 156
             Top = 0
-            Width = 17
-            Anchors = [akTop, akRight, akBottom]
-            Min = 0
-            OnClick = ForePriorUpDownClick
-            Position = 0
-            TabOrder = 1
-            Wrap = False
+            Width = 171
+            Anchors = [akTop, akLeft, akRight, akBottom]
+            BorderSpacing.Left = 6
+            BevelOuter = bvNone
+            ClientHeight = 156
+            ClientWidth = 171
+            TabOrder = 2
+            object StylePriorLabel: TLabel
+              AnchorSideLeft.Control = StylePriorPanel
+              AnchorSideTop.Control = StylePriorPanel
+              AnchorSideRight.Control = StylePriorPanel
+              AnchorSideRight.Side = asrBottom
+              Left = 0
+              Height = 19
+              Top = 0
+              Width = 171
+              Anchors = [akTop, akLeft, akRight]
+              Caption = 'FramePriorLabel'
+              ParentColor = False
+            end
+            object StylePriorList: TTreeView
+              AnchorSideLeft.Control = StylePriorPanel
+              AnchorSideTop.Control = StylePriorLabel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = StylePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = StylePriorValPanel
+              Left = 0
+              Height = 97
+              Top = 19
+              Width = 171
+              Anchors = [akTop, akLeft, akRight, akBottom]
+              ReadOnly = True
+              ScrollBars = ssAutoVertical
+              ShowButtons = False
+              ShowLines = False
+              ShowRoot = False
+              SortType = stData
+              TabOrder = 0
+              OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
+              OnClick = ForePriorListClick
+              OnCompare = ForePriorListCompare
+              Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
+              TreeLinePenStyle = psClear
+            end
+            object StylePriorValPanel: TPanel
+              AnchorSideLeft.Control = StylePriorPanel
+              AnchorSideTop.Side = asrBottom
+              AnchorSideRight.Control = StylePriorPanel
+              AnchorSideRight.Side = asrBottom
+              AnchorSideBottom.Control = StylePriorPanel
+              AnchorSideBottom.Side = asrBottom
+              Left = 0
+              Height = 39
+              Top = 117
+              Width = 171
+              Anchors = [akLeft, akRight, akBottom]
+              AutoSize = True
+              BorderSpacing.Top = 1
+              BevelOuter = bvNone
+              ClientHeight = 39
+              ClientWidth = 171
+              TabOrder = 1
+              object StylePriorEdit: TEdit
+                AnchorSideLeft.Control = StylePriorValPanel
+                AnchorSideTop.Control = StylePriorValPanel
+                AnchorSideRight.Control = StylePriorUpDown
+                AnchorSideBottom.Side = asrBottom
+                Left = 0
+                Height = 39
+                Top = 0
+                Width = 151
+                Anchors = [akTop, akLeft, akRight]
+                BorderSpacing.Right = 3
+                OnEditingDone = ForePriorEditChange
+                OnKeyPress = ForePriorEditKeyPress
+                TabOrder = 0
+                Text = '0'
+              end
+              object StylePriorUpDown: TUpDown
+                AnchorSideTop.Control = StylePriorValPanel
+                AnchorSideRight.Control = StylePriorValPanel
+                AnchorSideRight.Side = asrBottom
+                AnchorSideBottom.Control = StylePriorValPanel
+                AnchorSideBottom.Side = asrBottom
+                Left = 154
+                Height = 39
+                Top = 0
+                Width = 17
+                Anchors = [akTop, akRight, akBottom]
+                Min = 0
+                OnClick = ForePriorUpDownClick
+                Position = 0
+                TabOrder = 1
+              end
+            end
           end
         end
       end
-      object StylePriorPanel: TPanel
-        Left = 529
-        Height = 151
-        Top = 1
-        Width = 170
-        Align = alLeft
+    end
+    object pnlSchemeLayerAndReset: TPanel
+      AnchorSideLeft.Control = pnlElementAttributes
+      AnchorSideTop.Control = bvlAttributeSection
+      AnchorSideTop.Side = asrBottom
+      AnchorSideRight.Control = pnlElementAttributes
+      AnchorSideRight.Side = asrBottom
+      Left = 0
+      Height = 45
+      Top = 19
+      Width = 564
+      Anchors = [akTop, akLeft, akRight]
+      AutoSize = True
+      BevelOuter = bvNone
+      ClientHeight = 45
+      ClientWidth = 564
+      TabOrder = 1
+      object rbtnSchemeLayerGlobal: TRadioButton
+        AnchorSideLeft.Control = pnlSchemeLayerAndReset
+        AnchorSideTop.Control = pnlSchemeLayerAndReset
+        Left = 6
+        Height = 32
+        Top = 6
+        Width = 194
+        BorderSpacing.Left = 6
+        BorderSpacing.Top = 6
+        Caption = 'rbtnSchemeLayerGlobal'
+        Checked = True
+        OnClick = tglGlobalChange
+        TabOrder = 0
+        TabStop = True
+      end
+      object rbtnSchemeLayerLocal: TRadioButton
+        AnchorSideLeft.Control = rbtnSchemeLayerGlobal
+        AnchorSideLeft.Side = asrBottom
+        AnchorSideTop.Control = rbtnSchemeLayerGlobal
+        Left = 206
+        Height = 32
+        Top = 6
+        Width = 186
         BorderSpacing.Left = 6
-        ClientHeight = 151
-        ClientWidth = 170
-        TabOrder = 3
-        object StylePriorLabel: TLabel
-          Left = 1
-          Height = 15
-          Top = 1
-          Width = 168
-          Align = alTop
-          Caption = 'StylePriorLabel'
-          ParentColor = False
-        end
-        object StylePriorList: TTreeView
-          Left = 1
-          Height = 102
-          Top = 16
-          Width = 168
-          Align = alClient
-          AutoExpand = True
-          ReadOnly = True
-          ScrollBars = ssAutoVertical
-          ShowButtons = False
-          ShowLines = False
-          ShowRoot = False
-          SortType = stData
-          TabOrder = 0
-          OnAdvancedCustomDrawItem = ColorElementTreeAdvancedCustomDrawItem
-          OnClick = ForePriorListClick
-          OnCompare = ForePriorListCompare
-          Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoToolTips, tvoNoDoubleClickExpand, tvoThemedDraw]
-          TreeLinePenStyle = psClear
-        end
-        object StylePriorValPanel: TPanel
-          Left = 1
-          Height = 31
-          Top = 119
-          Width = 168
-          Align = alBottom
-          AutoSize = True
-          BorderSpacing.Top = 1
-          BevelOuter = bvNone
-          ClientHeight = 31
-          ClientWidth = 168
-          TabOrder = 1
-          object StylePriorEdit: TEdit
-            AnchorSideRight.Control = StylePriorUpDown
-            Left = 0
-            Height = 23
-            Top = 0
-            Width = 148
-            Anchors = [akTop, akLeft, akRight]
-            BorderSpacing.Right = 3
-            OnEditingDone = ForePriorEditChange
-            OnKeyPress = ForePriorEditKeyPress
-            TabOrder = 0
-            Text = '0'
-          end
-          object StylePriorUpDown: TUpDown
-            AnchorSideTop.Control = StylePriorValPanel
-            AnchorSideRight.Control = StylePriorValPanel
-            AnchorSideRight.Side = asrBottom
-            AnchorSideBottom.Control = StylePriorValPanel
-            AnchorSideBottom.Side = asrBottom
-            Left = 151
-            Height = 31
-            Top = 0
-            Width = 17
-            Anchors = [akTop, akRight, akBottom]
-            Min = 0
-            OnClick = ForePriorUpDownClick
-            Position = 0
-            TabOrder = 1
-            Wrap = False
-          end
-        end
+        Caption = 'rbtnSchemeLayerLocal'
+        OnClick = tglGlobalChange
+        TabOrder = 1
+      end
+      object btnSetAttributeToDefault: TBitBtn
+        AnchorSideTop.Control = pnlSchemeLayerAndReset
+        AnchorSideRight.Control = pnlSchemeLayerAndReset
+        AnchorSideRight.Side = asrBottom
+        Left = 370
+        Height = 39
+        Top = 6
+        Width = 188
+        Anchors = [akTop, akRight]
+        AutoSize = True
+        BorderSpacing.Top = 6
+        BorderSpacing.Right = 6
+        Caption = 'btnSetAttributeToDefault'
+        OnClick = SetAttributeToDefaultButtonClick
+        TabOrder = 2
       end
     end
   end
-  object pnlTop: TPanel
-    Left = 0
-    Height = 0
-    Top = 25
-    Width = 640
-    Align = alTop
-    AutoSize = True
-    BevelOuter = bvNone
-    ChildSizing.HorizontalSpacing = 3
-    ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
-    ChildSizing.ShrinkHorizontal = crsHomogenousChildResize
-    ChildSizing.Layout = cclLeftToRightThenTopToBottom
-    ChildSizing.ControlsPerLine = 4
-    Constraints.MaxWidth = 1000
-    ParentShowHint = False
-    ShowHint = True
-    TabOrder = 0
-  end
-  object PnlTop2: TPanel
+  object PnlSelectAndPreview: TPanel
     AnchorSideLeft.Control = Owner
-    AnchorSideTop.Control = pnlTop
+    AnchorSideTop.Control = ddlLanguageSelection
     AnchorSideTop.Side = asrBottom
     AnchorSideRight.Control = Owner
     AnchorSideRight.Side = asrBottom
     AnchorSideBottom.Control = pnlElementAttributes
     Left = 0
-    Height = 226
-    Top = 25
-    Width = 640
+    Height = 156
+    Top = 119
+    Width = 564
     Anchors = [akTop, akLeft, akRight, akBottom]
+    AutoSize = True
+    BorderSpacing.Top = 6
     BevelOuter = bvNone
-    ClientHeight = 226
-    ClientWidth = 640
-    TabOrder = 2
+    ClientHeight = 156
+    ClientWidth = 564
+    TabOrder = 1
     object ColorElementTree: TTreeView
-      Left = 0
-      Height = 220
+      Left = 6
+      Height = 150
       Top = 6
       Width = 200
       Align = alLeft
       AutoExpand = True
+      BorderSpacing.Left = 6
       BorderSpacing.Top = 6
       BorderSpacing.Right = 1
       Constraints.MinWidth = 150
@@ -756,17 +898,18 @@ object EditorColorOptionsFrame: TEditorColorOptionsFrame
     inline ColorPreview: TSynEdit
       AnchorSideLeft.Control = Splitter1
       AnchorSideLeft.Side = asrBottom
-      AnchorSideTop.Control = PnlTop2
-      AnchorSideRight.Control = PnlTop2
+      AnchorSideTop.Control = PnlSelectAndPreview
+      AnchorSideRight.Control = PnlSelectAndPreview
       AnchorSideRight.Side = asrBottom
       AnchorSideBottom.Control = ColorElementTree
       AnchorSideBottom.Side = asrBottom
-      Left = 207
-      Height = 220
+      Left = 213
+      Height = 150
       Top = 6
-      Width = 433
+      Width = 345
       BorderSpacing.Left = 1
       BorderSpacing.Top = 6
+      BorderSpacing.Right = 6
       Anchors = [akTop, akLeft, akRight, akBottom]
       Font.Height = -16
       Font.Name = 'courier'
@@ -778,7 +921,7 @@ object EditorColorOptionsFrame: TEditorColorOptionsFrame
       TabStop = False
       OnMouseUp = ColorPreviewMouseUp
       BookMarkOptions.Xoffset = 30
-      Gutter.Width = 59
+      Gutter.Width = 61
       Gutter.MouseActions = <      
         item
           ClickCount = ccAny
@@ -1218,7 +1361,7 @@ object EditorColorOptionsFrame: TEditorColorOptionsFrame
           MouseActions = <>
         end
         object TSynGutterLineNumber
-          Width = 19
+          Width = 21
           MouseActions = <>
           MarkupInfo.Background = clBtnFace
           MarkupInfo.Foreground = clNone
@@ -1293,103 +1436,168 @@ object EditorColorOptionsFrame: TEditorColorOptionsFrame
       end
     end
     object Splitter1: TSplitter
-      Left = 201
-      Height = 226
+      Left = 207
+      Height = 156
       Top = 0
       Width = 5
     end
   end
-  object ToolBar: TToolBar
-    Left = 0
-    Height = 25
-    Top = 0
-    Width = 640
+  object tglUseSyntaxHighlight: TToggleBox
+    AnchorSideLeft.Control = Owner
+    AnchorSideTop.Control = Owner
+    AnchorSideRight.Side = asrBottom
+    Left = 6
+    Height = 39
+    Top = 6
+    Width = 166
     AutoSize = True
-    Caption = 'ToolBar'
-    EdgeBorders = [ebBottom]
-    ParentShowHint = False
-    ShowCaptions = True
-    ShowHint = True
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    Caption = 'tglUseSyntaxHighlight'
+    OnClick = tglUseSyntaxHighlightClick
+    TabOrder = 2
+  end
+  object lblUseSyntaxHighlight: TLabel
+    AnchorSideLeft.Control = tglUseSyntaxHighlight
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = tglUseSyntaxHighlight
+    AnchorSideTop.Side = asrCenter
+    Left = 178
+    Height = 19
+    Top = 16
+    Width = 145
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    Caption = 'lblUseSyntaxHighlight'
+    ParentColor = False
+  end
+  object ddlLanguageSelection: TComboBox
+    AnchorSideLeft.Control = Owner
+    AnchorSideTop.Control = lblLanguageSelection
+    AnchorSideTop.Side = asrBottom
+    Left = 6
+    Height = 39
+    Top = 74
+    Width = 100
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 4
+    ItemHeight = 0
+    OnSelect = ddlLanguageSelectionSelect
+    Style = csDropDownList
     TabOrder = 3
-    object UseSyntaxHighlightCheckBox: TToolButton
-      Left = 1
-      Top = 0
-      OnClick = GeneralCheckBoxOnChange
-      ShowCaption = False
-      Style = tbsCheck
-    end
-    object ToolButton2: TToolButton
-      Left = 24
-      Height = 22
-      Top = 0
-      Caption = 'ToolButton2'
-      Style = tbsDivider
-    end
-    object LanguageButton: TToolButton
-      Left = 29
-      Top = 0
-      DropdownMenu = LanguageMenu
-      OnClick = LanguageButtonClick
-      Style = tbsButtonDrop
-    end
-    object ColorSchemeButton: TToolButton
-      Left = 62
-      Top = 0
-      DropdownMenu = ColorSchemeMenu
-      OnClick = ColorSchemeButtonClick
-      Style = tbsButtonDrop
-    end
-    object FileExtensionsComboBox: TComboBox
-      AnchorSideTop.Side = asrBottom
-      Left = 95
-      Height = 23
-      Top = 0
-      Width = 139
-      BorderSpacing.Top = 3
-      ItemHeight = 15
-      Items.Strings = (
-        'pp;pas;inc;lpr;lrs;dpr;dpk'
-        'pp;pas;inc;lpr;lrs'
-        'pp;pas;inc'
-      )
-      OnChange = ComboBoxOnChange
-      OnExit = ComboBoxOnExit
-      OnKeyDown = ComboBoxOnKeyDown
-      TabOrder = 0
-    end
-    object ToolButton5: TToolButton
-      Left = 234
-      Height = 22
-      Top = 0
-      Caption = 'ToolButton5'
-      Style = tbsDivider
-    end
-    object btnExport: TToolButton
-      Left = 239
-      Top = 0
-      OnClick = btnExportClick
-      ShowCaption = False
-    end
-    object SetAllAttributesToDefaultButton: TToolButton
-      Left = 262
-      Top = 0
-      OnClick = SetAllAttributesToDefaultButtonClick
-      ShowCaption = False
-    end
   end
-  object ExportSaveDialog: TSaveDialog
+  object lblLanguageSelection: TLabel
+    AnchorSideLeft.Control = Owner
+    AnchorSideTop.Control = tglUseSyntaxHighlight
+    AnchorSideTop.Side = asrBottom
+    Left = 6
+    Height = 19
+    Top = 51
+    Width = 141
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    Caption = 'lblLanguageSelection'
+    ParentColor = False
+  end
+  object ddlColorScheme: TComboBox
+    AnchorSideLeft.Control = ddlLanguageSelection
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = lblColorScheme
+    AnchorSideTop.Side = asrBottom
+    Left = 112
+    Height = 39
+    Top = 74
+    Width = 100
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 4
+    ItemHeight = 0
+    OnSelect = ddlColorSchemeSelect
+    Style = csDropDownList
+    TabOrder = 4
+  end
+  object lblColorScheme: TLabel
+    AnchorSideLeft.Control = ddlColorScheme
+    AnchorSideTop.Control = lblLanguageSelection
+    Left = 112
+    Height = 19
+    Top = 51
+    Width = 105
+    Caption = 'lblColorScheme'
+    ParentColor = False
+  end
+  object ddeFileExtensions: TComboBox
+    AnchorSideLeft.Control = ddlColorScheme
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = ddlColorScheme
+    Left = 218
+    Height = 39
+    Top = 74
+    Width = 139
+    BorderSpacing.Left = 6
+    ItemHeight = 0
+    Items.Strings = (
+      'pp;pas;inc;lpr;lrs;dpr;dpk'
+      'pp;pas;inc;lpr;lrs'
+      'pp;pas;inc'
+    )
+    OnChange = ComboBoxOnChange
+    OnExit = ComboBoxOnExit
+    OnKeyDown = ComboBoxOnKeyDown
+    TabOrder = 5
+  end
+  object lblFileExtensions: TLabel
+    AnchorSideLeft.Control = ddeFileExtensions
+    AnchorSideTop.Control = lblColorScheme
+    Left = 218
+    Height = 19
+    Top = 51
+    Width = 112
+    Caption = 'lblFileExtensions'
+    ParentColor = False
+  end
+  object btnExportToFile: TBitBtn
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = Owner
+    Left = 213
+    Height = 39
+    Top = 6
+    Width = 126
+    Anchors = [akTop, akRight]
+    AutoSize = True
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    BorderSpacing.Right = 6
+    Caption = 'btnExportToFile'
+    OnClick = btnExportToFileClick
+    TabOrder = 6
+  end
+  object btnSetAllAttributesToDefault: TBitBtn
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = Owner
+    AnchorSideRight.Control = Owner
+    AnchorSideRight.Side = asrBottom
+    Left = 345
+    Height = 39
+    Top = 6
+    Width = 213
+    Anchors = [akTop, akRight]
+    AutoSize = True
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    BorderSpacing.Right = 6
+    Caption = 'btnSetAllAttributesToDefault'
+    OnClick = btnSetAllAttributesToDefaultClick
+    TabOrder = 7
+  end
+  object dlgSaveExportFile: TSaveDialog
     DefaultExt = '.xml'
     Filter = 'xml|*.xml'
     Options = [ofOverwritePrompt, ofPathMustExist, ofEnableSizing, ofViewDetail]
-    left = 568
-    top = 56
-  end
-  object LanguageMenu: TPopupMenu
-    left = 568
-    top = 104
+    Left = 568
+    Top = 56
   end
-  object ColorSchemeMenu: TPopupMenu
-    left = 568
-    top = 160
+  object imButtons: TImageList
+    Left = 456
+    Top = 72
   end
 end
diff --git a/ide/frames/editor_color_options.pas b/ide/frames/editor_color_options.pas
index b6d6e561bd..2c584df7e7 100644
--- a/ide/frames/editor_color_options.pas
+++ b/ide/frames/editor_color_options.pas
@@ -29,7 +29,8 @@ uses
   // LazUtils
   Laz2_XMLCfg, LazFileUtils, LazUTF8,
   // LCL
-  LCLProc, LCLType, LCLIntf, StdCtrls, ExtCtrls, Graphics, ComCtrls, Dialogs, Menus,
+  LCLProc, LCLType, LCLIntf, StdCtrls, ExtCtrls, Graphics, ComCtrls, Dialogs,
+  Menus, Buttons,
   // LazControls
   DividerBevel,
   // SynEdit
@@ -50,20 +51,30 @@ type
   { TEditorColorOptionsFrame }
 
   TEditorColorOptionsFrame = class(TAbstractIDEOptionsEditor)
+    btnExportToFile: TBitBtn;
+    btnSetAllAttributesToDefault: TBitBtn;
+    btnSetAttributeToDefault: TBitBtn;
+    imButtons: TImageList;
+    pnlSchemeLayerAndReset: TPanel;
+    rbtnSchemeLayerGlobal: TRadioButton;
+    rbtnSchemeLayerLocal: TRadioButton;
     StylePriorEdit: TEdit;
     StylePriorLabel: TLabel;
-    BackPriorList: TTreeView;
     StylePriorList: TTreeView;
     StylePriorPanel: TPanel;
     StylePriorUpDown: TUpDown;
-    BackPriorValPanel: TPanel;
     StylePriorValPanel: TPanel;
+    BackPriorList: TTreeView;
+    BackPriorValPanel: TPanel;
+    ddeFileExtensions: TComboBox;
+    ddlColorScheme: TComboBox;
+    PageControl1: TPageControl;
     bvlAttributeSection: TDividerBevel;
     BackPriorEdit: TEdit;
+    ddlLanguageSelection: TComboBox;
     FramePriorEdit: TEdit;
     ForePriorEdit: TEdit;
-    FileExtensionsComboBox: TComboBox;
-    ExportSaveDialog: TSaveDialog;
+    dlgSaveExportFile: TSaveDialog;
     ForePriorLabel: TLabel;
     BackPriorLabel: TLabel;
     ForePriorList: TTreeView;
@@ -74,36 +85,26 @@ type
     FramePriorList: TTreeView;
     FramePriorPanel: TPanel;
     FramePriorValPanel: TPanel;
+    lblFileExtensions: TLabel;
+    lblColorScheme: TLabel;
+    lblLanguageSelection: TLabel;
+    lblUseSyntaxHighlight: TLabel;
     PriorityEditor: TPanel;
-    PnlTop2: TPanel;
-    pnlTop: TPanel;
-    LanguageMenu: TPopupMenu;
-    ColorSchemeMenu: TPopupMenu;
+    PnlSelectAndPreview: TPanel;
     Splitter1: TSplitter;
     ColorElementTree: TTreeView;
     SynColorAttrEditor1: TSynColorAttrEditor;
-    ToolBar: TToolBar;
-    ToolBar1: TToolBar;
-    tbtnGlobal: TToolButton;
-    tbtnLocal: TToolButton;
-    ToolButton1: TToolButton;
-    ToolButton3: TToolButton;
-    tbnColor: TToolButton;
-    tbnPrior: TToolButton;
+    tbsColorEditor: TTabSheet;
+    tbsPriorityEditor: TTabSheet;
+    tglUseSyntaxHighlight: TToggleBox;
     ForePriorUpDown: TUpDown;
     BackPriorUpDown: TUpDown;
     FramePriorUpDown: TUpDown;
-    UseSyntaxHighlightCheckBox: TToolButton;
-    ToolButton2: TToolButton;
-    LanguageButton: TToolButton;
-    ColorSchemeButton: TToolButton;
-    ToolButton5: TToolButton;
-    btnExport: TToolButton;
-    SetAllAttributesToDefaultButton: TToolButton;
-    SetAttributeToDefaultButton: TToolButton;
     ColorPreview: TSynEdit;
     pnlElementAttributes: TPanel;
-    procedure btnExportClick(Sender: TObject);
+    procedure btnExportToFileClick(Sender: TObject);
+    procedure ddlColorSchemeSelect(Sender: TObject);
+    procedure ddlLanguageSelectionSelect(Sender: TObject);
     procedure ColorElementTreeAdvancedCustomDrawItem(Sender: TCustomTreeView; Node: TTreeNode;
       State: TCustomDrawState; Stage: TCustomDrawStage; var {%H-}PaintImages, DefaultDraw: Boolean);
     procedure ColorElementTreeChange(Sender: TObject; {%H-}Node: TTreeNode);
@@ -111,7 +112,6 @@ type
     procedure ColorElementTreeKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);
     procedure ColorPreviewMouseUp(Sender: TObject; {%H-}Button: TMouseButton;
       {%H-}Shift: TShiftState; X, Y: Integer);
-    procedure ColorSchemeButtonClick(Sender: TObject);
     procedure DoColorChanged(Sender: TObject);
     procedure ForePriorEditKeyPress(Sender: TObject; var Key: char);
     procedure ForePriorListClick(Sender: TObject);
@@ -119,28 +119,28 @@ type
       var Compare: Integer);
     procedure ForePriorEditChange(Sender: TObject);
     procedure ForePriorUpDownClick(Sender: TObject; Button: TUDBtnType);
-    procedure GeneralCheckBoxOnChange(Sender: TObject);
     procedure ComboBoxOnExit(Sender: TObject);
-    procedure LanguageButtonClick(Sender: TObject);
-    procedure SetAllAttributesToDefaultButtonClick(Sender: TObject);
+    procedure FrameResize(Sender: TObject);
+    procedure btnSetAllAttributesToDefaultClick(Sender: TObject);
     procedure SetAttributeToDefaultButtonClick(Sender: TObject);
     procedure ComboBoxOnChange(Sender: TObject);
     procedure ComboBoxOnKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
     procedure tbnColorClick(Sender: TObject);
     procedure tglGlobalChange(Sender: TObject);
+    procedure tglUseSyntaxHighlightClick(Sender: TObject);
   private
     FTempColorSchemeSettings: TColorSchemeFactory;
 
     FDialog: TAbstractOptionsEditorDialog;
-    FCurHighlightElement: TColorSchemeAttribute;
+    FCurrentHighlightElement: TColorSchemeAttribute;
+    FFileExtensionsList: TStringList;  // list of LanguageName=FileExtensions
+    FColorSchemesList: TStringList;    // list of LanguageName=ColorScheme
 
-    FFileExtensions: TStringList;  // list of LanguageName=FileExtensions
-    FColorSchemes: TStringList;    // list of LanguageName=ColorScheme
-
-    FCurrentHighlighter: TSrcIDEHighlighter;
+    FCurrentLanguageHighlighter: TSrcIDEHighlighter;
     FCurrentColorScheme: TColorSchemeLanguage;
-    FIsEditingDefaults, FInPriorUpdating: Boolean;
-    CurLanguageID: Integer;
+    FIsEditingDefaults: Boolean;
+    FIsPriorUpdating: Boolean;
+    FCurrentLanguageID: Integer;
 
     procedure FillPriorEditor;
     procedure SelectCurInPriorEditor;
@@ -174,10 +174,9 @@ type
     function GeneralPage: TEditorGeneralOptionsFrame;
     function DoSynEditMouse(var AnInfo: TSynEditMouseActionInfo;
                          {%H-}HandleActionProc: TSynEditMouseActionHandler): Boolean;
-    procedure LanguageMenuItemClick(Sender: TObject);
-    procedure ColorSchemeMenuItemClick(Sender: TObject);
     procedure SetLanguageItem(ALanguage: String);
     procedure SetColorSchemeItem(AScheme: String);
+    procedure ResizeComboBox(Sender: TComboBox);
   public
     constructor Create(TheOwner : TComponent); override;
     destructor Destroy; override;
@@ -189,7 +188,7 @@ type
     procedure SelectAhaColor(aha: TAdditionalHilightAttribute);
     class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
     property UnsavedColorSchemeSettings: TColorSchemeFactory read FTempColorSchemeSettings;
-    property UnsavedColorSchemeDefaultNames: TStringList read FColorSchemes;
+    property UnsavedColorSchemeDefaultNames: TStringList read FColorSchemesList;
   end;
 
 implementation
@@ -293,7 +292,7 @@ begin
     exit;
   end;
 
-  // Special draw oultine color // Caret color
+  // Special draw oultine color
   if (Attri.Group = agnOutlineColors) or (AttriIdx = ord(ahaCaretColor)) then begin
     c := Attri.MarkupFoldLineColor;
     if (AttriIdx = ord(ahaCaretColor)) then
@@ -393,16 +392,16 @@ begin
   end;
 end;
 
-procedure TEditorColorOptionsFrame.btnExportClick(Sender: TObject);
+procedure TEditorColorOptionsFrame.btnExportToFileClick(Sender: TObject);
 var
   XMLConfig: TRttiXMLConfig;
   NewScheme: TColorScheme;
   NewName: String;
   l: Integer;
 begin
-  ExportSaveDialog.InitialDir := UserSchemeDirectory(True);
-  if ExportSaveDialog.Execute then begin
-    NewName := ExtractFileName(ExportSaveDialog.FileName);
+  dlgSaveExportFile.InitialDir := UserSchemeDirectory(True);
+  if dlgSaveExportFile.Execute then begin
+    NewName := ExtractFileName(dlgSaveExportFile.FileName);
     l := length(ExtractFileExt(NewName));
     if (l > 0) and (l+1 < Length(NewName)) then
       NewName := Copy(NewName, 1, Length(NewName) - l);
@@ -410,12 +409,12 @@ begin
     if l > 0 then
       NewName := UTF8UpperCase(copy(NewName, 1, l)) + copy(NewName, 1+l, length(NewName));
 
-    XMLConfig := TRttiXMLConfig.CreateClean(ExportSaveDialog.FileName);
+    XMLConfig := TRttiXMLConfig.CreateClean(dlgSaveExportFile.FileName);
     XMLConfig.SetValue('Lazarus/ColorSchemes/Names/Count', 1);
     XMLConfig.SetValue('Lazarus/ColorSchemes/Names/Item1/Value', NewName);
 
     NewScheme := TColorScheme.Create(NewName);
-    NewScheme.Assign(FTempColorSchemeSettings.ColorSchemeGroup[ColorSchemeButton.Caption]);
+    NewScheme.Assign(FTempColorSchemeSettings.ColorSchemeGroup[ddlColorScheme.Items[ddlColorScheme.ItemIndex]]);
     NewScheme.SaveToXml(XMLConfig, 'Lazarus/ColorSchemes/',nil);
     NewScheme.Free;
 
@@ -425,6 +424,54 @@ begin
   end;
 end;
 
+procedure TEditorColorOptionsFrame.ddlColorSchemeSelect(Sender: TObject);
+var
+  Scheme: String;
+begin
+  Scheme := ddlColorScheme.Items[ddlColorScheme.ItemIndex];
+  if Scheme <> FCurrentColorScheme.Name then
+  begin
+    // change the colorscheme
+    if not FIsEditingDefaults then
+      SetColorSchemeForLang(FCurrentLanguageHighlighter.LanguageName, Scheme);
+    SetCurrentScheme(TCustomSynClass(FCurrentLanguageHighlighter.ClassType), Scheme);
+  end;
+  ResizeComboBox(ddlColorScheme);
+end;
+
+procedure TEditorColorOptionsFrame.ddlLanguageSelectionSelect(Sender: TObject);
+var
+  Language: String;
+  NewVal: LongInt;
+begin
+  if (ddlLanguageSelection.ItemIndex = 0) then
+  begin
+    if not FIsEditingDefaults then
+    begin
+      FIsEditingDefaults := True;
+      SetCurrentScheme(TCustomSynClass(FCurrentLanguageHighlighter.ClassType), ddlColorScheme.Items[ddlColorScheme.ItemIndex]);
+    end;
+  end else
+  begin
+    Language := ddlLanguageSelection.Items[ddlLanguageSelection.ItemIndex];
+    if (Language <> FCurrentLanguageHighlighter.LanguageName) or FIsEditingDefaults then
+    begin
+      FIsEditingDefaults := False;
+      NewVal := EditorOpts.HighlighterList.FindByName(Language);
+      if NewVal >= 0 then
+      begin
+        FCurrentLanguageID := NewVal;
+        SetCurrentScheme(EditorOpts.HighlighterList[FCurrentLanguageID].SynClass,
+          GetColorSchemeForLang(EditorOpts.HighlighterList[FCurrentLanguageID].SynClass.GetLanguageName));
+        SetColorSchemeItem(GetColorSchemeForLang(FCurrentLanguageHighlighter.LanguageName));
+        SetComboBoxText(ddeFileExtensions, GetCurFileExtensions(FCurrentLanguageHighlighter.LanguageName),
+          cstFilename);
+      end;
+    end;
+  end;
+  ResizeComboBox(ddlLanguageSelection);
+end;
+
 procedure TEditorColorOptionsFrame.ColorElementTreeClick(Sender: TObject);
 begin
   FindCurHighlightElement;
@@ -481,9 +528,9 @@ begin
     exit;
   end;
   // Line Highlights
-  if CurLanguageID >= 0 then
+  if FCurrentLanguageID >= 0 then
   begin
-    AddAttr := EditorOpts.HighlighterList[CurLanguageID].SampleLineToAddAttr(XY.Y);
+    AddAttr := EditorOpts.HighlighterList[FCurrentLanguageID].SampleLineToAddAttr(XY.Y);
     if AddAttr = ahaFoldedCode then begin
       if not( (XY.X >= Length(ColorPreview.Lines[XY.Y-1]) + 4) and
               (XY.X <= Length(ColorPreview.Lines[XY.Y-1]) + 6) )
@@ -511,7 +558,7 @@ begin
   Attri := nil;
   ColorPreview.GetHighlighterAttriAtRowCol(XY, Token, Attri);
   if Attri = nil then
-    Attri := FCurrentHighlighter.WhitespaceAttribute;
+    Attri := FCurrentLanguageHighlighter.WhitespaceAttribute;
   if Attri <> nil then begin
     NewNode := ColorElementTree.Items.GetFirstNode;
     while Assigned(NewNode) do begin
@@ -527,11 +574,6 @@ begin
   end;
 end;
 
-procedure TEditorColorOptionsFrame.ColorSchemeButtonClick(Sender: TObject);
-begin
-  ColorSchemeButton.CheckMenuDropdown;
-end;
-
 procedure TEditorColorOptionsFrame.DoColorChanged(Sender: TObject);
 begin
   UpdateCurrentScheme;
@@ -550,9 +592,9 @@ begin
   Node := TTreeView(Sender).Selected;
   if Node = nil then
     exit;
-  FCurHighlightElement := TColorSchemeAttribute(Node.Data);
+  FCurrentHighlightElement := TColorSchemeAttribute(Node.Data);
 
-  N2 := ColorElementTree.Items.FindNodeWithData(FCurHighlightElement);
+  N2 := ColorElementTree.Items.FindNodeWithData(FCurrentHighlightElement);
   if N2 <> nil then
     N2.Selected := True;
 
@@ -560,10 +602,10 @@ begin
   //if (i < 0) or (i >= TTreeView(Sender).Height div Node.Height) then
   //  i := Max(0, (TTreeView(Sender).Height div Node.Height div 2) - 1);
 
-  FInPriorUpdating := True;
+  FIsPriorUpdating := True;
   ShowCurAttribute;
   SelectCurInPriorEditor;
-  FInPriorUpdating := False;
+  FIsPriorUpdating := False;
 
   //TTreeView(Sender).TopItem := TTreeView(Sender).Items[Max(0, Node.Index - i)];
 end;
@@ -594,7 +636,7 @@ var
   i: Integer;
   f: TMarkupField;
 begin
-  if FInPriorUpdating then
+  if FIsPriorUpdating then
     exit;
 
   f := PriorSenderToField(Sender);
@@ -800,37 +842,35 @@ begin
   end;
 end;
 
-procedure TEditorColorOptionsFrame.GeneralCheckBoxOnChange(Sender: TObject);
-begin
-  if Sender = UseSyntaxHighlightCheckBox then
-  begin
-    ApplyCurrentScheme;
-    Exit;
-  end;
-end;
-
 procedure TEditorColorOptionsFrame.ComboBoxOnExit(Sender: TObject);
 var
   Box: TComboBox absolute Sender;
 begin
-  if Sender = FileExtensionsComboBox then
+  if Sender = ddeFileExtensions then
   begin
-    //DebugLn(['TEditorOptionsForm.ComboBoxOnExit Box.Text="',Box.Text,'" Old="',GetCurFileExtensions(FCurrentHighlighter.LanguageName),'" FCurrentHighlighter.LanguageName=',FCurrentHighlighter.LanguageName]);
-    if Box.Text <> GetCurFileExtensions(FCurrentHighlighter.LanguageName) then
+    //DebugLn(['TEditorOptionsForm.ComboBoxOnExit Box.Text="',Box.Text,'" Old="',GetCurFileExtensions(FCurrentLanguageHighlighter.LanguageName),'" FCurrentHighlighter.LanguageName=',FCurrentLanguageHighlighter.LanguageName]);
+    if Box.Text <> GetCurFileExtensions(FCurrentLanguageHighlighter.LanguageName) then
     begin
-      SetCurFileExtensions(FCurrentHighlighter.LanguageName, Box.Text);
+      SetCurFileExtensions(FCurrentLanguageHighlighter.LanguageName, Box.Text);
       SetComboBoxText(Box, Box.Text,cstCaseInsensitive);
     end;
-    //DebugLn(['TEditorOptionsForm.ComboBoxOnExit Box.Text="',Box.Text,'" Now="',GetCurFileExtensions(FCurrentHighlighter.LanguageName),'" FCurrentHighlighter.LanguageName=',FCurrentHighlighter.LanguageName]);
+    //DebugLn(['TEditorOptionsForm.ComboBoxOnExit Box.Text="',Box.Text,'" Now="',GetCurFileExtensions(FCurrentLanguageHighlighter.LanguageName),'" FCurrentHighlighter.LanguageName=',FCurrentLanguageHighlighter.LanguageName]);
+    ResizeComboBox(ddeFileExtensions);
   end
 end;
 
-procedure TEditorColorOptionsFrame.LanguageButtonClick(Sender: TObject);
+procedure TEditorColorOptionsFrame.FrameResize(Sender: TObject);
+var
+  SubPanelWidth: Integer;
 begin
-  LanguageButton.CheckMenuDropdown;
+  SubPanelWidth := PageControl1.Width div 4;
+  ForePriorPanel.Width := SubPanelWidth;
+  BackPriorPanel.Width := (SubPanelWidth) - BackPriorPanel.BorderSpacing.Left;
+  FramePriorPanel.Width := (SubPanelWidth) - FramePriorPanel.BorderSpacing.Left;
+  SynColorAttrEditor1.AdjustSize;
 end;
 
-procedure TEditorColorOptionsFrame.SetAllAttributesToDefaultButtonClick(
+procedure TEditorColorOptionsFrame.btnSetAllAttributesToDefaultClick(
   Sender: TObject);
 begin
   SetColorElementsToDefaults(False);
@@ -846,26 +886,27 @@ procedure TEditorColorOptionsFrame.ShowCurAttribute;
 var
   CanGlobal: Boolean;
 begin
-  if (FCurHighlightElement = nil) then
+  if (FCurrentHighlightElement = nil) then
     Exit;
   DisableAlign;
   try
-
-    CanGlobal := (FCurHighlightElement.GetSchemeGlobal <> nil) and
+    CanGlobal := (FCurrentHighlightElement.GetSchemeGlobal <> nil) and
                             not FIsEditingDefaults;
-    tbtnGlobal.Enabled := CanGlobal;
-    tbtnLocal.Enabled := CanGlobal;
-    tbtnGlobal.AllowAllUp := not CanGlobal;
-    tbtnLocal.AllowAllUp := not CanGlobal;
-    tbtnGlobal.Down := FCurHighlightElement.IsUsingSchemeGlobals and
-                       CanGlobal;
-    tbtnLocal.Down  := (not FCurHighlightElement.IsUsingSchemeGlobals) and
-                       CanGlobal;
-
-    if FCurHighlightElement.IsUsingSchemeGlobals then
-      SynColorAttrEditor1.CurHighlightElement := FCurHighlightElement.GetSchemeGlobal
+    rbtnSchemeLayerGlobal.Enabled := CanGlobal;
+    rbtnSchemeLayerLocal.Enabled := CanGlobal;
+
+    rbtnSchemeLayerGlobal.Checked := not CanGlobal;
+    rbtnSchemeLayerLocal.Checked := not CanGlobal;
+
+    rbtnSchemeLayerGlobal.Checked := FCurrentHighlightElement.IsUsingSchemeGlobals and
+                                CanGlobal;
+    rbtnSchemeLayerLocal.Checked := (not FCurrentHighlightElement.IsUsingSchemeGlobals) and
+                                CanGlobal;
+
+    if FCurrentHighlightElement.IsUsingSchemeGlobals then
+      SynColorAttrEditor1.CurHighlightElement := FCurrentHighlightElement.GetSchemeGlobal
     else
-      SynColorAttrEditor1.CurHighlightElement := FCurHighlightElement;
+      SynColorAttrEditor1.CurHighlightElement := FCurrentHighlightElement;
     //SynColorAttrEditor1.UpdateAll;
     FillPriorEditor;
   finally
@@ -895,7 +936,7 @@ procedure TEditorColorOptionsFrame.FillPriorEditor;
                      (AnAttr.FrameColor <> clNone) and
                      (AnAttr.FrameColor <> clDefault);
         mfStyle:     Result := (hafStyle in AnAttr.Features) and
-                     ( (AnAttr.Style <> []) or (AnAttr.StyleMask <> []) );
+                     ((AnAttr.Style <> []) or (AnAttr.StyleMask <> []));
     end
   end;
 
@@ -917,11 +958,10 @@ procedure TEditorColorOptionsFrame.FillPriorEditor;
     AList.AlphaSort;
   end;
 begin
-  if (not PriorityEditor.Visible) or (FCurHighlightElement = nil) or FInPriorUpdating
-  then
+  if (not (PageControl1.TabIndex = 1)) or (FCurrentHighlightElement = nil) or FIsPriorUpdating then
     exit;
 
-  FInPriorUpdating := True;
+  FIsPriorUpdating := True;
 
   FillList(ForePriorList, mfForeGround);
   FillList(BackPriorList, mfBackGround);
@@ -930,7 +970,7 @@ begin
 
   SelectCurInPriorEditor;
 
-  FInPriorUpdating := False;
+  FIsPriorUpdating := False;
 end;
 
 procedure TEditorColorOptionsFrame.SelectCurInPriorEditor;
@@ -938,7 +978,7 @@ var
   n: TTreeNode;
   i: Integer;
 begin
-  n := ForePriorList.Items.FindNodeWithData(FCurHighlightElement);
+  n := ForePriorList.Items.FindNodeWithData(FCurrentHighlightElement);
   ForePriorValPanel.Enabled := n <> nil;
   if (n <> nil) and not(n.Selected) then begin
     n.Selected := True;
@@ -948,9 +988,9 @@ begin
   else
   if n = nil then
     ForePriorList.Selected := nil;
-  SetPriorEditVal(ForePriorEdit, GetAttrPriorVal(FCurHighlightElement, mfForeGround));
+  SetPriorEditVal(ForePriorEdit, GetAttrPriorVal(FCurrentHighlightElement, mfForeGround));
 
-  n := BackPriorList.Items.FindNodeWithData(FCurHighlightElement);
+  n := BackPriorList.Items.FindNodeWithData(FCurrentHighlightElement);
   BackPriorValPanel.Enabled := n <> nil;
   if (n <> nil) and not(n.Selected) then begin
     n.Selected := True;
@@ -960,9 +1000,9 @@ begin
   else
   if n = nil then
     BackPriorList.Selected := nil;
-  SetPriorEditVal(BackPriorEdit, GetAttrPriorVal(FCurHighlightElement, mfBackGround));
+  SetPriorEditVal(BackPriorEdit, GetAttrPriorVal(FCurrentHighlightElement, mfBackGround));
 
-  n := FramePriorList.Items.FindNodeWithData(FCurHighlightElement);
+  n := FramePriorList.Items.FindNodeWithData(FCurrentHighlightElement);
   FramePriorValPanel.Enabled := n <> nil;
   if (n <> nil) and not(n.Selected) then begin
     n.Selected := True;
@@ -972,9 +1012,9 @@ begin
   else
   if n = nil then
     FramePriorList.Selected := nil;
-  SetPriorEditVal(FramePriorEdit, GetAttrPriorVal(FCurHighlightElement, mfFrame));
+  SetPriorEditVal(FramePriorEdit, GetAttrPriorVal(FCurrentHighlightElement, mfFrame));
 
-  n := StylePriorList.Items.FindNodeWithData(FCurHighlightElement);
+  n := StylePriorList.Items.FindNodeWithData(FCurrentHighlightElement);
   StylePriorValPanel.Enabled := n <> nil;
   if (n <> nil) and not(n.Selected) then begin
     n.Selected := True;
@@ -984,7 +1024,7 @@ begin
   else
   if n = nil then
     StylePriorList.Selected := nil;
-  SetPriorEditVal(StylePriorEdit, GetAttrPriorVal(FCurHighlightElement, mfStyle));
+  SetPriorEditVal(StylePriorEdit, GetAttrPriorVal(FCurrentHighlightElement, mfStyle));
 end;
 
 function TEditorColorOptionsFrame.AttrForNode(ANode: TTreeNode): TColorSchemeAttribute;
@@ -1068,7 +1108,8 @@ begin
     mfForeGround: AnAttr.ForePriority := AValue;
     mfBackGround: AnAttr.BackPriority := AValue;
     mfFrame:      AnAttr.FramePriority := AValue;
-    mfStyle:      begin
+    mfStyle:
+      begin
         AnAttr.StylePriority[fsBold] := AValue;
         AnAttr.StylePriority[fsItalic] := AValue;
         AnAttr.StylePriority[fsUnderline] := AValue;
@@ -1116,10 +1157,10 @@ begin
   if (ColorElementTree.Selected = nil) or (ColorElementTree.Selected.Data = nil) then
     exit;
 
-  if FCurHighlightElement = TColorSchemeAttribute(ColorElementTree.Selected.Data) then
+  if FCurrentHighlightElement = TColorSchemeAttribute(ColorElementTree.Selected.Data) then
     exit;
 
-  FCurHighlightElement := TColorSchemeAttribute(ColorElementTree.Selected.Data);
+  FCurrentHighlightElement := TColorSchemeAttribute(ColorElementTree.Selected.Data);
   ShowCurAttribute;
 end;
 
@@ -1137,7 +1178,7 @@ begin
 
   // Create Groups
   if not FIsEditingDefaults then
-    ColorElementTree.Items.Add(nil, FCurrentHighlighter.LanguageName)
+    ColorElementTree.Items.Add(nil, FCurrentLanguageHighlighter.LanguageName)
   else
     ColorElementTree.Items.Add(nil, AdditionalHighlightGroupNames[agnDefault]);
   for j := low(TAhaGroupName) to high(TAhaGroupName) do
@@ -1156,7 +1197,7 @@ begin
             if FIsEditingDefaults then
               ParentName := AdditionalHighlightGroupNames[agnDefault]
             else
-              ParentName := FCurrentHighlighter.LanguageName;
+              ParentName := FCurrentLanguageHighlighter.LanguageName;
           end;
         else
           ParentName := AdditionalHighlightGroupNames[Attr.Group];
@@ -1181,7 +1222,7 @@ begin
   if ColorElementTree.Items.GetFirstNode <> nil then
     ColorElementTree.Items.GetFirstNode.Selected := True;
 
-  FCurHighlightElement := nil;
+  FCurrentHighlightElement := nil;
   FindCurHighlightElement;
 end;
 
@@ -1192,7 +1233,7 @@ var
   DefAttri: TColorSchemeAttribute;
   i: Integer;
 begin
-  DefaultSchemeGrp := ColorSchemeFactory.ColorSchemeGroup[ColorSchemeButton.Caption];
+  DefaultSchemeGrp := ColorSchemeFactory.ColorSchemeGroup[ddlColorScheme.Items[ddlColorScheme.ItemIndex]];
   if DefaultSchemeGrp = nil then
     exit;
   if FIsEditingDefaults then
@@ -1201,8 +1242,8 @@ begin
     DefaultColorScheme := DefaultSchemeGrp.ColorScheme[FCurrentColorScheme.Language];
 
   if OnlySelected then begin
-    DefAttri := DefaultColorScheme.Attribute[FCurHighlightElement.StoredName];
-    FCurHighlightElement.Assign(DefAttri);
+    DefAttri := DefaultColorScheme.Attribute[FCurrentHighlightElement.StoredName];
+    FCurrentHighlightElement.Assign(DefAttri);
   end else begin
     FCurrentColorScheme.Assign(DefaultColorScheme);
   end;
@@ -1226,10 +1267,10 @@ end;
 
 function TEditorColorOptionsFrame.GetColorSchemeForLang(const LanguageName: String): String;
 begin
-  if FColorSchemes = nil then
+  if FColorSchemesList = nil then
     Result := ''
   else
-    Result := FColorSchemes.Values[LanguageName];
+    Result := FColorSchemesList.Values[LanguageName];
   if Result = '' then
     Result := EditorOpts.ReadColorScheme(LanguageName);
 end;
@@ -1237,9 +1278,9 @@ end;
 procedure TEditorColorOptionsFrame.SetColorSchemeForLang(const LanguageName,
   ColorScheme: String);
 begin
-  if FColorSchemes = nil then
-    FColorSchemes := TStringList.Create;
-  FColorSchemes.Values[LanguageName] := ColorScheme;
+  if FColorSchemesList = nil then
+    FColorSchemesList := TStringList.Create;
+  FColorSchemesList.Values[LanguageName] := ColorScheme;
 end;
 
 procedure TEditorColorOptionsFrame.SetCurrentScheme(SynClass: TCustomSynClass;
@@ -1262,7 +1303,7 @@ begin
 
   FCurrentColorScheme := NewColorScheme;
   if not FIsEditingDefaults then begin
-    FCurrentHighlighter := FCurrentColorScheme.Highlighter;
+    FCurrentLanguageHighlighter := FCurrentColorScheme.Highlighter;
     SynColorAttrEditor1.CurrentColorScheme := FCurrentColorScheme;
     FillPriorEditor;
   end;
@@ -1282,12 +1323,12 @@ begin
       PreviewEdits[a].BeginUpdate;
     try
       for a := Low(PreviewEdits) to High(PreviewEdits) do begin
-        if UseSyntaxHighlightCheckBox.Down then
-          PreviewEdits[a].Highlighter := FCurrentHighlighter
+        if tglUseSyntaxHighlight.Checked then
+          PreviewEdits[a].Highlighter := FCurrentLanguageHighlighter
         else
           PreviewEdits[a].Highlighter := nil;
-        PreviewEdits[a].Lines.Text := EditorOpts.HighlighterList[CurLanguageID].SampleSource;
-        PreviewEdits[a].CaretXY := EditorOpts.HighlighterList[CurLanguageID].CaretXY;
+        PreviewEdits[a].Lines.Text := EditorOpts.HighlighterList[FCurrentLanguageID].SampleSource;
+        PreviewEdits[a].CaretXY := EditorOpts.HighlighterList[FCurrentLanguageID].CaretXY;
         PreviewEdits[a].TopLine := 1;
         PreviewEdits[a].LeftChar := 1;
         PreviewEdits[a].Keystrokes.Clear;
@@ -1323,7 +1364,7 @@ begin
       PreviewEdits[a].BeginUpdate;
     try
       if not FIsEditingDefaults then
-        FCurrentColorScheme.ApplyTo(FCurrentHighlighter);
+        FCurrentColorScheme.ApplyTo(FCurrentLanguageHighlighter);
       for a := Low(PreviewEdits) to High(PreviewEdits) do begin
         FCurrentColorScheme.ApplyTo(PreviewEdits[a]);
         PreviewEdits[a].Invalidate;
@@ -1347,89 +1388,51 @@ begin
   Result := not(AnInfo.Button in [mbXWheelDown, mbXWheelUp, mbXWheelLeft, mbXWheelRight]);
 end;
 
-procedure TEditorColorOptionsFrame.LanguageMenuItemClick(Sender: TObject);
+procedure TEditorColorOptionsFrame.SetLanguageItem(ALanguage: String);
 var
-  Language: String;
-  NewVal: LongInt;
+  i: Integer;
 begin
-  if (Sender as TMenuItem).MenuIndex = 0 then
-  begin
-    if not FIsEditingDefaults then
+  for i := 0 to ddlLanguageSelection.Items.Count - 1 do
+    if (ddlLanguageSelection.Items[i] = ALanguage) then
     begin
-      FIsEditingDefaults := True;
-      SetCurrentScheme(TCustomSynClass(FCurrentHighlighter.ClassType), ColorSchemeButton.Caption);
+      ddlLanguageSelection.ItemIndex := i;
+      Break;
     end;
-    LanguageButton.Caption := (Sender as TMenuItem).Caption;
-  end
-  else
-  begin
-    Language := (Sender as TMenuItem).Caption;
-    if (Language <> FCurrentHighlighter.LanguageName) or FIsEditingDefaults then
-    begin
-      FIsEditingDefaults := False;
-      NewVal := EditorOpts.HighlighterList.FindByName(Language);
-      if NewVal >= 0 then
-      begin
-        CurLanguageID := NewVal;
-        SetCurrentScheme(EditorOpts.HighlighterList[CurLanguageID].SynClass,
-                        GetColorSchemeForLang(EditorOpts.HighlighterList
-                                     [CurLanguageID].SynClass.GetLanguageName));
-        SetColorSchemeItem(GetColorSchemeForLang(FCurrentHighlighter.LanguageName));
-        SetComboBoxText(FileExtensionsComboBox,
-          GetCurFileExtensions(FCurrentHighlighter.LanguageName),cstFilename);
-      end;
-    end;
-    LanguageButton.Caption := Language;
-  end;
+  ResizeComboBox(ddlLanguageSelection);
 end;
 
-procedure TEditorColorOptionsFrame.ColorSchemeMenuItemClick(Sender: TObject);
-var
-  Scheme: String;
-begin
-  Scheme := (Sender as TMenuItem).Caption;
-  if Scheme <> FCurrentColorScheme.Name then
-  begin
-    // change the colorscheme
-    if not FIsEditingDefaults then
-      SetColorSchemeForLang(FCurrentHighlighter.LanguageName, Scheme);
-    SetCurrentScheme(TCustomSynClass(FCurrentHighlighter.ClassType), Scheme);
-  end;
-  ColorSchemeButton.Caption := Scheme;
-end;
-
-procedure TEditorColorOptionsFrame.SetLanguageItem(ALanguage: String);
+procedure TEditorColorOptionsFrame.SetColorSchemeItem(AScheme: String);
 var
   i: Integer;
 begin
-  for i := 0 to LanguageMenu.Items.Count - 1 do
-    LanguageMenu.Items[i].Checked := LanguageMenu.Items[i].Caption = ALanguage;
-  LanguageButton.Caption := ALanguage;
+  for i := 0 to ddlColorScheme.Items.Count - 1 do
+    if (ddlColorScheme.Items[i] = AScheme) then
+    begin
+      ddlColorScheme.ItemIndex := i;
+      Break;
+    end;
+  ResizeComboBox(ddlColorScheme); ;
 end;
 
-procedure TEditorColorOptionsFrame.SetColorSchemeItem(AScheme: String);
-var
-  i: Integer;
+procedure TEditorColorOptionsFrame.ResizeComboBox(Sender: TComboBox);
 begin
-  for i := 0 to ColorSchemeMenu.Items.Count - 1 do
-    ColorSchemeMenu.Items[i].Checked := ColorSchemeMenu.Items[i].Caption = AScheme;
-  ColorSchemeButton.Caption := AScheme;
+  Sender.Width := Canvas.TextWidth(Sender.Text) + 55;
 end;
 
 constructor TEditorColorOptionsFrame.Create(TheOwner: TComponent);
 begin
   inherited Create(TheOwner);
   FTempColorSchemeSettings := TColorSchemeFactory.Create;
-
-  ExportSaveDialog.Title := lisExport;
-  ExportSaveDialog.Filter := Format('%s|*.xml|', [dlgFilterXML]);
+  InvalidatePreferredSize;
+  dlgSaveExportFile.Title := lisExport;
+  dlgSaveExportFile.Filter := Format('%s|*.xml|', [dlgFilterXML]);
 end;
 
 destructor TEditorColorOptionsFrame.Destroy;
 begin
   FreeAndNil(FTempColorSchemeSettings);
-  FFileExtensions.Free;
-  FColorSchemes.Free;
+  FFileExtensionsList.Free;
+  FColorSchemesList.Free;
   inherited Destroy;
 end;
 
@@ -1441,50 +1444,38 @@ end;
 procedure TEditorColorOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
 var
   Items: TStringList;
-  Item: TMenuItem;
-  I: Integer;
 begin
   // Prevent the caret from moving
   ColorPreview.RegisterMouseActionSearchHandler(@DoSynEditMouse);
   FDialog := ADialog;
-  FCurHighlightElement := nil;
-  ToolBar.Images := IDEImages.Images_16;
-  ToolBar1.Images := IDEImages.Images_16;
+  FCurrentHighlightElement := nil;
 
   Items := TStringList.Create;
   try
     Items.Sorted := True;
     ColorSchemeFactory.GetRegisteredSchemes(Items);
-    for I := 0 to Items.Count - 1 do
-    begin
-      Item := NewItem(Items[I], 0, I = 0, True, @ColorSchemeMenuItemClick, 0, '');
-      Item.RadioItem := True;
-      Item.AutoCheck := True;
-      Item.GroupIndex := 1;
-      ColorSchemeMenu.Items.Add(Item);
-    end;
+    ddlColorScheme.Items.AddStrings(Items);
   finally
     Items.Free;
   end;
 
+  tglUseSyntaxHighlight.Caption := dlgEdOn;
+  lblUseSyntaxHighlight.Caption := dlgUseSyntaxHighlight;
+  lblLanguageSelection.Caption  := dlgLang;
+  lblColorScheme.Caption        := dlgClrScheme;
+  lblFileExtensions.Caption     := dlgFileExts;
+  btnSetAttributeToDefault.Caption := dlgSetElementDefault;
+  IDEImages.AssignImage(btnSetAttributeToDefault, 'restore_defaults');
+  btnSetAllAttributesToDefault.Caption := dlgSetAllElementDefault;
+  IDEImages.AssignImage(btnSetAllAttributesToDefault, 'restore_default');
+  btnExportToFile.Caption := lisDlgExport;
+  IDEImages.AssignImage(btnExportToFile, 'laz_save');
 
-  UseSyntaxHighlightCheckBox.ImageIndex := IDEImages.LoadImage('laz_highlighter');
-  UseSyntaxHighlightCheckBox.Hint := dlgUseSyntaxHighlight;
-  LanguageButton.Hint := dlgLang;
-  ColorSchemeButton.Hint := dlgClrScheme;
-  FileExtensionsComboBox.hint := dlgFileExts;
-  SetAttributeToDefaultButton.ImageIndex := IDEImages.LoadImage('restore_default');
-  SetAttributeToDefaultButton.Hint := dlgSetElementDefault;
-  SetAllAttributesToDefaultButton.ImageIndex := IDEImages.LoadImage('restore_defaults');
-  SetAllAttributesToDefaultButton.Hint := dlgSetAllElementDefault;
-  btnExport.ImageIndex := IDEImages.LoadImage('laz_save');
-  btnExport.Hint := lisExport;
-
-  tbtnGlobal.Caption := dlgUseSchemeDefaults;
-  tbtnLocal.Caption := dlgUseSchemeLocal;
+  rbtnSchemeLayerGlobal.Caption := dlgUseSchemeDefaults;
+  rbtnSchemeLayerLocal.Caption := dlgUseSchemeLocal;
 
-  tbnColor.Caption := dlgColors;
-  tbnPrior.Caption := dlgPriorities;
+  tbsColorEditor.Caption := dlgColors;
+  tbsPriorityEditor.Caption := dlgPriorities;
 
   ForePriorLabel.Caption := dlgForecolor;
   BackPriorLabel.Caption := dlgBackColor;
@@ -1503,7 +1494,6 @@ end;
 procedure TEditorColorOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
 var
   i: integer;
-  Item: TMenuItem;
 begin
   // here we are sure that Setup has been called for every frame =>
   // we can assign events to every registered preview control
@@ -1518,31 +1508,24 @@ begin
   with AOptions as TEditorOptions do
   begin
     FTempColorSchemeSettings.Assign(UserColorSchemeGroup);
-    UseSyntaxHighlightCheckBox.Down := UseSyntaxHighlight;
+    tglUseSyntaxHighlight.Checked := UseSyntaxHighlight;
 
-    Item := NewItem('- '+dlgEditSchemDefaults+' -', 0, False, True, @LanguageMenuItemClick, 0, '');
-    Item.RadioItem := True;
-    Item.AutoCheck := True;
-    Item.GroupIndex := 1;
-    LanguageMenu.Items.Add(Item);
+    ddlLanguageSelection.Items.Add('- ' + dlgEditSchemDefaults + ' -');
     for i := 0 to EditorOpts.HighlighterList.Count - 1 do
-    begin
-      Item := NewItem(HighlighterList[i].SynClass.GetLanguageName, 0, False, True, @LanguageMenuItemClick, 0, '');
-      Item.RadioItem := True;
-      Item.AutoCheck := True;
-      Item.GroupIndex := 1;
-      LanguageMenu.Items.Add(Item);
-    end;
+      ddlLanguageSelection.Items.Add(HighlighterList[i].SynClass.GetLanguageName);
 
-    with FileExtensionsComboBox, GeneralPage do
-      if CurLanguageID >= 0 then
-        SetComboBoxText(FileExtensionsComboBox,
-          HighlighterList[CurLanguageID].FileExtensions,cstFilename);
+    with ddeFileExtensions, GeneralPage do
+      if FCurrentLanguageID >= 0 then
+      begin
+        SetComboBoxText(ddeFileExtensions,
+          HighlighterList[FCurrentLanguageID].FileExtensions,cstFilename);
+        ResizeComboBox(ddeFileExtensions);
+      end;
 
     SetCurrentScheme(TPreviewPasSyn, GetColorSchemeForLang(TPreviewPasSyn.GetLanguageName));
-    CurLanguageID := HighlighterList.FindByClass(TCustomSynClass(FCurrentHighlighter.ClassType));
-    SetLanguageItem(FCurrentHighlighter.LanguageName);
-    SetColorSchemeItem(GetColorSchemeForLang(FCurrentHighlighter.LanguageName));
+    FCurrentLanguageID := HighlighterList.FindByClass(TCustomSynClass(FCurrentLanguageHighlighter.ClassType));
+    SetLanguageItem(FCurrentLanguageHighlighter.LanguageName);
+    SetColorSchemeItem(GetColorSchemeForLang(FCurrentLanguageHighlighter.LanguageName));
 
     tbnColorClick(nil);
     ShowCurAttribute;
@@ -1556,20 +1539,20 @@ var
 begin
   with AOptions as TEditorOptions do
   begin
-    UseSyntaxHighlight := UseSyntaxHighlightCheckBox.Down;
+    UseSyntaxHighlight := tglUseSyntaxHighlight.Checked;
 
-    if FFileExtensions <> nil then begin
-      for i := 0 to FFileExtensions.Count - 1 do begin
-        j := HighlighterList.FindByName(FFileExtensions.Names[i]);
+    if FFileExtensionsList <> nil then begin
+      for i := 0 to FFileExtensionsList.Count - 1 do begin
+        j := HighlighterList.FindByName(FFileExtensionsList.Names[i]);
         if j >= 0 then
-          HighlighterList[j].FileExtensions := FFileExtensions.ValueFromIndex[i];
+          HighlighterList[j].FileExtensions := FFileExtensionsList.ValueFromIndex[i];
       end;
     end;
 
-    if FColorSchemes <> nil then
-      for i := 0 to FColorSchemes.Count - 1 do
-         WriteColorScheme(FColorSchemes.Names[i],
-                          FColorSchemes.Values[FColorSchemes.Names[i]]);
+    if FColorSchemesList <> nil then
+      for i := 0 to FColorSchemesList.Count - 1 do
+         WriteColorScheme(FColorSchemesList.Names[i],
+                          FColorSchemesList.Values[FColorSchemesList.Names[i]]);
 
     // Write from userFactory
     UserColorSchemeGroup.Assign(FTempColorSchemeSettings);
@@ -1613,31 +1596,38 @@ end;
 
 procedure TEditorColorOptionsFrame.tbnColorClick(Sender: TObject);
 begin
-  PriorityEditor.Visible      := tbnPrior.Down;
-  SynColorAttrEditor1.Visible := not tbnPrior.Down;
   FillPriorEditor;
 end;
 
 procedure TEditorColorOptionsFrame.tglGlobalChange(Sender: TObject);
 begin
-  if (FCurHighlightElement = nil) then
+  if (FCurrentHighlightElement = nil) then
     exit;
 
-  if (FCurHighlightElement.GetSchemeGlobal <> nil) then begin
-    FCurHighlightElement.UseSchemeGlobals := tbtnGlobal.Down;
+  if (FCurrentHighlightElement.GetSchemeGlobal <> nil) then begin
+    FCurrentHighlightElement.UseSchemeGlobals := rbtnSchemeLayerGlobal.Checked;
     ShowCurAttribute;
     UpdateCurrentScheme;
   end;
 end;
 
+procedure TEditorColorOptionsFrame.tglUseSyntaxHighlightClick(Sender: TObject);
+begin
+  if tglUseSyntaxHighlight.Checked then
+     tglUseSyntaxHighlight.Caption := dlgEdOn
+  else
+     tglUseSyntaxHighlight.Caption := dlgEdOff;
+  ApplyCurrentScheme;
+end;
+
 function TEditorColorOptionsFrame.GetCurFileExtensions(const LanguageName: String): String;
 var
   i: Integer;
 begin
-  if FFileExtensions = nil then
+  if FFileExtensionsList = nil then
     Result := ''
   else
-    Result := FFileExtensions.Values[LanguageName];
+    Result := FFileExtensionsList.Values[LanguageName];
   if Result = '' then
   begin
     i := EditorOpts.HighlighterList.FindByName(LanguageName);
@@ -1648,9 +1638,9 @@ end;
 
 procedure TEditorColorOptionsFrame.SetCurFileExtensions(const LanguageName, FileExtensions: String);
 begin
-  if FFileExtensions = nil then
-    FFileExtensions := TStringList.Create;
-  FFileExtensions.Values[LanguageName] := FileExtensions;
+  if FFileExtensionsList = nil then
+    FFileExtensionsList := TStringList.Create;
+  FFileExtensionsList.Values[LanguageName] := FileExtensions;
 end;
 
 procedure TEditorColorOptionsFrame.OnSpecialLineMarkup(Sender: TObject;
@@ -1659,9 +1649,9 @@ var
   e: TColorSchemeAttribute;
   AddAttr: TAdditionalHilightAttribute;
 begin
-  if CurLanguageID < 0 then
+  if FCurrentLanguageID < 0 then
     exit;
-  AddAttr := EditorOpts.HighlighterList[CurLanguageID].SampleLineToAddAttr(Line);
+  AddAttr := EditorOpts.HighlighterList[FCurrentLanguageID].SampleLineToAddAttr(Line);
   if (AddAttr <> ahaNone) and (AddAttr <> ahaFoldedCode) then begin
     e := FCurrentColorScheme.AttributeByEnum[AddAttr];
     if e <> nil then begin
@@ -1676,7 +1666,7 @@ var
   Syn: TSynEdit;
   p: TPoint;
 begin
-  p := EditorOpts.HighlighterList[CurLanguageID].CaretXY;
+  p := EditorOpts.HighlighterList[FCurrentLanguageID].CaretXY;
   Syn := Sender as TSynEdit;
   if p.y > Syn.Lines.Count then exit;
   if (Syn.CaretX = p.x) and (Syn.Carety = p.y) then exit;
-- 
2.20.1

Martin Friebe

2019-04-27 15:59

manager   ~0115854

I will look into the radio buttons. They are a good idea. Maybe combine it with the text changes I mentioned earlier.
However there should not be a need for such a massive free space below them.
I also need to see where/how to place the reset-element button. It should match the design of the "reset-all" button, which at current is not going to change.

I might also review, if the low section could use tabs instead of tool-buttons to toggle the pages. Undecided yet.

I might apply changes as in the attached mockup.

-------------------------

About adding more caption.
On other dialogs, that have or used to have captions, users have ask for them to be removed. So the only real solution is to have a global option, if toolbars should show captions or not.
Yet I could see some captions being added, within the toolbar (and having them as part of the toolbar, would allow to later have such an option).
I attached a mockup of how that would look. (If an option were introduced, the option could include if the caption should be in the same line, or below the icon).

Aside the changes that I mentioned in the Top of the issue, I will not apply the other changes.
I do not believe the changes to the top toolbar are an improvement.

However I will leave the issue un-assigned/new. If any other developer should think different they can take the issue and act on it. If no one takes it, it will eventually get closed.

Martin Friebe

2019-04-30 23:05

manager   ~0115934

Added some captions, and changed to radio buttons.

Martin Friebe

2019-07-31 23:43

manager   ~0117531

Resolved for the selected changes that were applied earlier.
The remainder - in its current form - will not be applied.

You can still seek the opinion of other members of the team. This can be done on the mail list.

Thanks for your patches and feedback

Issue History

Date Modified Username Field Change
2019-04-25 17:04 Phemtik New Issue
2019-04-25 17:04 Phemtik File Added: IDE-Options--Editor-Display-Colors--Windows-NEW.png
2019-04-25 17:04 Phemtik File Added: IDE-Options--Editor-Display-Colors--Windows-OLD.png
2019-04-25 17:04 Phemtik File Added: IDE-Options--Editor-Display-Colors--Linux-OLD.png
2019-04-25 17:04 Phemtik File Added: IDE-Options--Editor-Display-Colors--Linux-new.png
2019-04-25 17:04 Phemtik File Added: 0001-redesign-of-Tools-Display-Colors.patch
2019-04-25 18:27 Martin Friebe Note Added: 0115804
2019-04-27 02:33 Phemtik File Added: 0001-redesign-of-Tools-Display-Colors-2.patch
2019-04-27 02:33 Phemtik File Added: IDE-Options--Editor-Display-Colors--Linux-new-2.png
2019-04-27 02:33 Phemtik Note Added: 0115840
2019-04-27 15:59 Martin Friebe File Added: MOCKUP_color_opt_toolbar_captions.png
2019-04-27 15:59 Martin Friebe Note Added: 0115854
2019-04-30 23:05 Martin Friebe Note Added: 0115934
2019-07-31 23:43 Martin Friebe Assigned To => Martin Friebe
2019-07-31 23:43 Martin Friebe Status new => resolved
2019-07-31 23:43 Martin Friebe Resolution open => fixed
2019-07-31 23:43 Martin Friebe LazTarget => -
2019-07-31 23:43 Martin Friebe Note Added: 0117531