diff --git a/components/callite/README.txt b/components/callite/README.txt index 72eb305c1..18f01dcea 100644 --- a/components/callite/README.txt +++ b/components/callite/README.txt @@ -3,4 +3,9 @@ descendant which consequently is not dependent on any widgetset. It is not a fixed-size component, as are most calendars, but will align and resize as needed. -License: modified LGPL (with linking exception) \ No newline at end of file +License: modified LGPL (with linking exception) (the license same as Lazarus) + +The palette icon is taken from icons8.com +Download link: https://icons8.com/icon/12776/Calendar +The icons of icon8 have a "Creative Commons Attribution-NoDerivs 3.0 Unported" +license. \ No newline at end of file diff --git a/components/callite/callight_pkg.lpk b/components/callite/callight_pkg.lpk index e8498effb..81a9475d1 100644 --- a/components/callite/callight_pkg.lpk +++ b/components/callite/callight_pkg.lpk @@ -13,7 +13,7 @@ - + @@ -32,5 +32,8 @@ + + <_ExternHelp Items="Count"/> + diff --git a/components/callite/demo1/CalLiteTest.lpi b/components/callite/demo1/CalLiteTest.lpi index f990be5eb..2671a64f8 100644 --- a/components/callite/demo1/CalLiteTest.lpi +++ b/components/callite/demo1/CalLiteTest.lpi @@ -1,7 +1,7 @@ - + diff --git a/components/callite/icon/TCALENDARLITE.PNG b/components/callite/icon/TCALENDARLITE.PNG deleted file mode 100644 index 81ea0a4e9..000000000 Binary files a/components/callite/icon/TCALENDARLITE.PNG and /dev/null differ diff --git a/components/callite/icon/icon-source.txt b/components/callite/icon/icon-source.txt deleted file mode 100644 index 6e404f59b..000000000 --- a/components/callite/icon/icon-source.txt +++ /dev/null @@ -1,5 +0,0 @@ -The TCalendarLite palette icon is the image - - calendar-day.png - -of the Fugue Icons collection (http://p.yusukekamiyamane.com/) \ No newline at end of file diff --git a/components/callite/icon/make_lrs.bat b/components/callite/icon/make_lrs.bat deleted file mode 100644 index e134d6b3e..000000000 --- a/components/callite/icon/make_lrs.bat +++ /dev/null @@ -1 +0,0 @@ -lazres ..\source\calendarlite_icon.lrs TCALENDARLITE.PNG diff --git a/components/callite/source/calendarlite.pas b/components/callite/source/calendarlite.pas index f60e14571..57181c4fd 100644 --- a/components/callite/source/calendarlite.pas +++ b/components/callite/source/calendarlite.pas @@ -397,11 +397,14 @@ procedure Register; implementation +{$R calendarlite_icon.res} + uses LCLType, LazUTF8, dateutils, math; const DBLCLICK_INTERVAL = 300; // Interval (ms) for detection of a double-click + DESIGNTIME_PPI = 96; { Holiday helpers } @@ -1284,8 +1287,8 @@ begin FStartingDayOfWeek:= dowSunday; with GetControlClassDefaultSize do SetInitialBounds(0, 0, cx, cy); - Constraints.MinHeight := DefMinHeight; - Constraints.MinWidth := DefMinWidth; + Constraints.MinHeight := ScaleX(DefMinHeight, DESIGNTIME_PPI); + Constraints.MinWidth := ScaleY(DefMinWidth, DESIGNTIME_PPI); Canvas.Brush.Style := bsSolid; TabStop := true; FDayNames := TStringList.Create; @@ -1421,8 +1424,8 @@ end; class function TCalendarLite.GetControlClassDefaultSize: TSize; begin - Result.cx := DefCalWidth; - Result.cy := DefCalHeight; + Result.cx := ScaleX(DefCalWidth, DESIGNTIME_PPI); + Result.cy := ScaleY(DefCalHeight, DESIGNTIME_PPI); end; function TCalendarLite.GetDayName(ADayOfWeek: TDayOfWeek): String; @@ -1913,7 +1916,6 @@ end; procedure Register; begin - {$I calendarlite_icon.lrs} RegisterComponents('Misc', [TCalendarLite]); end; diff --git a/components/callite/source/calendarlite_icon.res b/components/callite/source/calendarlite_icon.res new file mode 100644 index 000000000..bf94c84fc Binary files /dev/null and b/components/callite/source/calendarlite_icon.res differ diff --git a/image_sources/ccr/components/callite/readme.txt b/image_sources/ccr/components/callite/readme.txt index c14bb4951..5d961e66b 100644 --- a/image_sources/ccr/components/callite/readme.txt +++ b/image_sources/ccr/components/callite/readme.txt @@ -2,7 +2,7 @@ This folder contains the png images used by the callite component in the component palette The icon is taken from icons8.com -Download link: +Download link: https://icons8.com/icon/12776/Calendar Except for renaming to fit the requirements as a FPC/Lazarus resource it has not been modified.