Răsfoiți Sursa

Merge pull request #50 from bgrabitmap/dev-bgracontrols

Dev bgracontrols
lainz 6 ani în urmă
părinte
comite
f83c5fe861
5 a modificat fișierele cu 12 adăugiri și 10 ștergeri
  1. 7 5
      bccombobox.pas
  2. 1 1
      bgracontrols.lpk
  3. 1 1
      bgracontrolsinfo.pas
  4. 1 1
      bgrapascalscriptcomponent.lpk
  5. 2 2
      update_bgracontrols_force.json

+ 7 - 5
bccombobox.pas

@@ -114,7 +114,7 @@ procedure Register;
 
 
 implementation
 implementation
 
 
-uses math, LCLType, PropEdits;
+uses math, LCLType, PropEdits, BGRAText;
 
 
 procedure Register;
 procedure Register;
 begin
 begin
@@ -152,13 +152,15 @@ begin
     FForm.Color := FDropDownBorderColor;
     FForm.Color := FDropDownBorderColor;
     FListBox.Font.Name := Button.StateNormal.FontEx.Name;
     FListBox.Font.Name := Button.StateNormal.FontEx.Name;
     FListBox.Font.Style := Button.StateNormal.FontEx.Style;
     FListBox.Font.Style := Button.StateNormal.FontEx.Style;
-    FListBox.Font.Height := Button.StateNormal.FontEx.Height;
-    FListBox.Canvas.Font.Assign(FListBox.Font);
+    FListBox.Font.Height := FontEmHeightSign*Button.StateNormal.FontEx.Height;
+    self.Canvas.Font.Assign(FListBox.Font);
     if Assigned(FOnDrawItem) and (FItemHeight <> 0) then
     if Assigned(FOnDrawItem) and (FItemHeight <> 0) then
-      h := FItemHeight else h := FListBox.Canvas.GetTextHeight('Hg');
+      h := FItemHeight else h := self.Canvas.GetTextHeight('Hg');
+    {$IFDEF WINDOWS}inc(h,6);{$ENDIF}
     FListBox.ItemHeight := h;
     FListBox.ItemHeight := h;
+    {$IFDEF LINUX}inc(h,6);{$ENDIF}
     FForm.ClientWidth := FButton.Width;
     FForm.ClientWidth := FButton.Width;
-    FForm.ClientHeight := (h+6)*min(Items.Count, FDropDownCount) + 2*FDropDownBorderSize;
+    FForm.ClientHeight := h*min(Items.Count, FDropDownCount) + 2*FDropDownBorderSize;
     FListBox.SetBounds(FDropDownBorderSize,FDropDownBorderSize,
     FListBox.SetBounds(FDropDownBorderSize,FDropDownBorderSize,
       FForm.ClientWidth-2*FDropDownBorderSize,
       FForm.ClientWidth-2*FDropDownBorderSize,
       FForm.ClientHeight-2*FDropDownBorderSize);
       FForm.ClientHeight-2*FDropDownBorderSize);

+ 1 - 1
bgracontrols.lpk

@@ -28,7 +28,7 @@
     </CompilerOptions>
     </CompilerOptions>
     <Description Value="BGRA Controls is a set of graphical UI elements that you can use with Lazarus LCL applications."/>
     <Description Value="BGRA Controls is a set of graphical UI elements that you can use with Lazarus LCL applications."/>
     <License Value="Modified LGPL"/>
     <License Value="Modified LGPL"/>
-    <Version Major="6" Minor="4"/>
+    <Version Major="6" Minor="5"/>
     <Files Count="56">
     <Files Count="56">
       <Item1>
       <Item1>
         <Filename Value="bcbasectrls.pas"/>
         <Filename Value="bcbasectrls.pas"/>

+ 1 - 1
bgracontrolsinfo.pas

@@ -8,7 +8,7 @@ uses
   Classes, SysUtils;
   Classes, SysUtils;
 
 
 const
 const
-  BGRAControlsVersion = 6040000;
+  BGRAControlsVersion = 6050000;
 
 
   function BGRAControlsVersionStr: string;
   function BGRAControlsVersionStr: string;
 
 

+ 1 - 1
bgrapascalscriptcomponent.lpk

@@ -11,7 +11,7 @@
         <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
         <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
       </SearchPaths>
       </SearchPaths>
     </CompilerOptions>
     </CompilerOptions>
-    <Version Major="6" Minor="4"/>
+    <Version Major="6" Minor="5"/>
     <Files Count="3">
     <Files Count="3">
       <Item1>
       <Item1>
         <Filename Value="bgrapascalscript.pas"/>
         <Filename Value="bgrapascalscript.pas"/>

+ 2 - 2
update_bgracontrols_force.json

@@ -8,13 +8,13 @@
       "ForceNotify" : true,
       "ForceNotify" : true,
       "InternalVersion" : 25,
       "InternalVersion" : 25,
       "Name" : "bgracontrols.lpk",
       "Name" : "bgracontrols.lpk",
-      "Version" : "6.4.0.0"
+      "Version" : "6.5.0.0"
     },
     },
     {
     {
       "ForceNotify" : false,
       "ForceNotify" : false,
       "InternalVersion" : 1,
       "InternalVersion" : 1,
       "Name" : "bgrapascalscriptcomponent.lpk",
       "Name" : "bgrapascalscriptcomponent.lpk",
-      "Version" : "6.4.0.0"
+      "Version" : "6.5.0.0"
     }
     }
   ]
   ]
 }
 }