Unknown 6 роки тому
батько
коміт
413f78ba6d
3 змінених файлів з 68 додано та 45 видалено
  1. 3 1
      vectoredit/lctoolbars.pas
  2. 57 41
      vectoredit/umain.lfm
  3. 8 3
      vectoredit/umain.pas

+ 3 - 1
vectoredit/lctoolbars.pas

@@ -29,10 +29,12 @@ function CreateToolBar(AImages: TImageList; AOwner: TComponent): TToolbar;
 begin
   result := TToolBar.Create(AOwner);
   result.Align := alNone;
-  result.Height := AImages.Height + 9;
+  result.Height := AImages.Height+4;
   result.ShowHint:= true;
   result.ShowCaptions:= false;
   result.Images := AImages;
+  result.ButtonWidth := AImages.Width+5;
+  result.ButtonHeight := AImages.Height+4;
   result.ParentColor := false;
 end;
 

+ 57 - 41
vectoredit/umain.lfm

@@ -1,7 +1,7 @@
 object Form1: TForm1
-  Left = 617
+  Left = 616
   Height = 622
-  Top = 117
+  Top = 92
   Width = 981
   Caption = 'Vector Edit'
   ClientHeight = 622
@@ -952,51 +952,67 @@ object Form1: TForm1
         Rounding.RoundY = 1
         Rounding.RoundOptions = []
         TabOrder = 2
-        object Label2: TLabel
-          Left = 7
-          Height = 17
-          Top = 6
-          Width = 27
-          Caption = 'Back'
-          ParentColor = False
-          ParentFont = False
-        end
-        object ToolBar1: TToolBar
-          Left = 6
-          Height = 28
-          Top = 28
-          Width = 28
-          Align = alNone
-          ButtonHeight = 28
-          ButtonWidth = 28
-          Caption = 'ToolBar1'
-          EdgeBorders = []
-          EdgeInner = esNone
-          EdgeOuter = esNone
-          Images = VectorImageList24
-          Indent = 0
-          ParentColor = False
-          ParentShowHint = False
-          ShowHint = True
-          TabOrder = 0
-          object ButtonMoveBackFillPoints: TToolButton
-            Left = 0
-            Hint = 'Move gradient/texture points'
-            Top = 0
-            Caption = 'ButtonMoveBackFillPoints'
-            ImageIndex = 12
-            OnClick = ToolButtonClick
-            Style = tbsCheck
-          end
-        end
         object PanelBackFillIntf: TPanel
-          Left = 42
-          Height = 55
+          Left = 32
+          Height = 58
           Top = 1
           Width = 22
+          Align = alLeft
           BevelOuter = bvNone
+          TabOrder = 0
+          OnResize = PanelBackFillIntfResize
+        end
+        object PanelBackFillHead: TPanel
+          Left = 1
+          Height = 58
+          Top = 1
+          Width = 31
+          Align = alLeft
+          BevelOuter = bvNone
+          ClientHeight = 58
+          ClientWidth = 31
           TabOrder = 1
           OnResize = PanelBackFillIntfResize
+          object LBack: TLabel
+            Left = 0
+            Height = 28
+            Top = 0
+            Width = 31
+            Align = alTop
+            AutoSize = False
+            Caption = 'Back'
+            Layout = tlCenter
+            ParentColor = False
+            ParentFont = False
+          end
+          object ToolBarBackFill: TToolBar
+            Left = 0
+            Height = 30
+            Top = 28
+            Width = 31
+            Align = alClient
+            ButtonHeight = 28
+            ButtonWidth = 28
+            Caption = 'ToolBarBackFill'
+            EdgeBorders = []
+            EdgeInner = esNone
+            EdgeOuter = esNone
+            Images = VectorImageList24
+            Indent = 0
+            ParentColor = False
+            ParentShowHint = False
+            ShowHint = True
+            TabOrder = 0
+            object ButtonMoveBackFillPoints: TToolButton
+              Left = 0
+              Hint = 'Move gradient/texture points'
+              Top = 0
+              Caption = 'ButtonMoveBackFillPoints'
+              ImageIndex = 12
+              OnClick = ToolButtonClick
+              Style = tbsCheck
+            end
+          end
         end
       end
       object PanelShape: TBCPanel

+ 8 - 3
vectoredit/umain.pas

@@ -41,12 +41,14 @@ type
 
   TForm1 = class(TForm)
     ButtonMoveBackFillPoints: TToolButton;
+    LBack: TLabel;
+    PanelBackFillHead: TPanel;
     PanelBackFillIntf: TPanel;
     ShapeSendToBack: TAction;
     ShapeBringToFront: TAction;
     ShapeMoveDown: TAction;
     ShapeMoveUp: TAction;
-    ToolBar1: TToolBar;
+    ToolBarBackFill: TToolBar;
     VectorImageList24: TBGRAImageList;
     ActionList: TActionList;
     EditCopy: TAction;
@@ -59,7 +61,6 @@ type
     FileSaveAs: TAction;
     ButtonPenStyle: TBCButton;
     Label1: TLabel;
-    Label2: TLabel;
     Label3: TLabel;
     PanelBackFill: TBCPanel;
     PanelBasicStyle: TBCPanel;
@@ -267,7 +268,7 @@ procedure TForm1.LoadVectorImages;
 var
   vectorImageList: TBGRAImageList;
   lst: TStringList;
-  i: Integer;
+  i, fullIconHeight: Integer;
 begin
   if VectorImageList24.Height = ActionIconSize then exit;
 
@@ -282,6 +283,10 @@ begin
 
   SetToolbarImages(ToolBarFile, vectorImageList);
   SetToolbarImages(ToolBarEdit, vectorImageList);
+  SetToolBarImages(ToolBarBackFill, vectorImageList);
+  fullIconHeight := ActionIconSize+4;
+  ToolbarTop.ButtonHeight:= 2*fullIconHeight+4;
+  LBack.Height := fullIconHeight;
 end;
 
 { TForm1 }