ColorPalette: Fix palette size after loading from stream.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4322 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2015-09-09 21:28:25 +00:00
parent 106c5a90f6
commit f5a8d28ec2

View File

@ -145,6 +145,7 @@ type
function GetCellWidth: Integer; inline;
function GetColorIndex(X,Y: Integer): Integer;
function GetHintText(AIndex: Integer): String; virtual;
procedure Loaded; override;
procedure MouseDown(Button: TMouseButton; Shift:TShiftState; X, Y:Integer); override;
procedure MouseEnter; override;
procedure MouseLeave; override;
@ -507,6 +508,12 @@ begin
DoInsertColor(AIndex, AColor, AColorName);
end;
procedure TCustomColorPalette.Loaded;
begin
inherited;
UpdateSize;
end;
procedure TCustomColorPalette.LoadPalette(const FileName: String;
AItems: TPaletteItems = [piColors, piColumnCount]);
var