You've already forked lazarus-ccr
callite: New component palette icon, in particular for hi res screens. Replace lrs resource by res. Fix form scaling at high res. Remove folder icons (it is in image_sources now). Version 0.3.1.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5943 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -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
|
It is not a fixed-size component, as are most calendars, but will align
|
||||||
and resize as needed.
|
and resize as needed.
|
||||||
|
|
||||||
License: modified LGPL (with linking exception)
|
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.
|
@ -13,7 +13,7 @@
|
|||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="A lightweight calendar component"/>
|
<Description Value="A lightweight calendar component"/>
|
||||||
<License Value="Modified LGL2 (with linking exception)"/>
|
<License Value="Modified LGL2 (with linking exception)"/>
|
||||||
<Version Minor="3"/>
|
<Version Minor="3" Release="1"/>
|
||||||
<Files Count="1">
|
<Files Count="1">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="source/calendarlite.pas"/>
|
<Filename Value="source/calendarlite.pas"/>
|
||||||
@ -32,5 +32,8 @@
|
|||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
</PublishOptions>
|
</PublishOptions>
|
||||||
|
<CustomOptions Items="ExternHelp" Version="2">
|
||||||
|
<_ExternHelp Items="Count"/>
|
||||||
|
</CustomOptions>
|
||||||
</Package>
|
</Package>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<Version Value="9"/>
|
<Version Value="10"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<General>
|
<General>
|
||||||
<SessionStorage Value="InProjectDir"/>
|
<SessionStorage Value="InProjectDir"/>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 886 B |
@ -1,5 +0,0 @@
|
|||||||
The TCalendarLite palette icon is the image
|
|
||||||
|
|
||||||
calendar-day.png
|
|
||||||
|
|
||||||
of the Fugue Icons collection (http://p.yusukekamiyamane.com/)
|
|
@ -1 +0,0 @@
|
|||||||
lazres ..\source\calendarlite_icon.lrs TCALENDARLITE.PNG
|
|
@ -397,11 +397,14 @@ procedure Register;
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
{$R calendarlite_icon.res}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
LCLType, LazUTF8, dateutils, math;
|
LCLType, LazUTF8, dateutils, math;
|
||||||
|
|
||||||
const
|
const
|
||||||
DBLCLICK_INTERVAL = 300; // Interval (ms) for detection of a double-click
|
DBLCLICK_INTERVAL = 300; // Interval (ms) for detection of a double-click
|
||||||
|
DESIGNTIME_PPI = 96;
|
||||||
|
|
||||||
|
|
||||||
{ Holiday helpers }
|
{ Holiday helpers }
|
||||||
@ -1284,8 +1287,8 @@ begin
|
|||||||
FStartingDayOfWeek:= dowSunday;
|
FStartingDayOfWeek:= dowSunday;
|
||||||
with GetControlClassDefaultSize do
|
with GetControlClassDefaultSize do
|
||||||
SetInitialBounds(0, 0, cx, cy);
|
SetInitialBounds(0, 0, cx, cy);
|
||||||
Constraints.MinHeight := DefMinHeight;
|
Constraints.MinHeight := ScaleX(DefMinHeight, DESIGNTIME_PPI);
|
||||||
Constraints.MinWidth := DefMinWidth;
|
Constraints.MinWidth := ScaleY(DefMinWidth, DESIGNTIME_PPI);
|
||||||
Canvas.Brush.Style := bsSolid;
|
Canvas.Brush.Style := bsSolid;
|
||||||
TabStop := true;
|
TabStop := true;
|
||||||
FDayNames := TStringList.Create;
|
FDayNames := TStringList.Create;
|
||||||
@ -1421,8 +1424,8 @@ end;
|
|||||||
|
|
||||||
class function TCalendarLite.GetControlClassDefaultSize: TSize;
|
class function TCalendarLite.GetControlClassDefaultSize: TSize;
|
||||||
begin
|
begin
|
||||||
Result.cx := DefCalWidth;
|
Result.cx := ScaleX(DefCalWidth, DESIGNTIME_PPI);
|
||||||
Result.cy := DefCalHeight;
|
Result.cy := ScaleY(DefCalHeight, DESIGNTIME_PPI);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCalendarLite.GetDayName(ADayOfWeek: TDayOfWeek): String;
|
function TCalendarLite.GetDayName(ADayOfWeek: TDayOfWeek): String;
|
||||||
@ -1913,7 +1916,6 @@ end;
|
|||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
{$I calendarlite_icon.lrs}
|
|
||||||
RegisterComponents('Misc', [TCalendarLite]);
|
RegisterComponents('Misc', [TCalendarLite]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
BIN
components/callite/source/calendarlite_icon.res
Normal file
BIN
components/callite/source/calendarlite_icon.res
Normal file
Binary file not shown.
@ -2,7 +2,7 @@ This folder contains the png images used by the callite component in the
|
|||||||
component palette
|
component palette
|
||||||
|
|
||||||
The icon is taken from icons8.com
|
The icon is taken from icons8.com
|
||||||
Download link: <a href="https://de.icons8.com/icon/12776/Calendar">
|
Download link: https://icons8.com/icon/12776/Calendar
|
||||||
|
|
||||||
Except for renaming to fit the requirements as a FPC/Lazarus resource it has
|
Except for renaming to fit the requirements as a FPC/Lazarus resource it has
|
||||||
not been modified.
|
not been modified.
|
||||||
|
Reference in New Issue
Block a user