tvplanit: Every internal icon has three versions at 100%, 125% and 150% resolution now. (Icons from icon8.com). Old icons can be re-activated by undefining NEW_ICONS in vp.inc.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5896 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-05-23 17:39:54 +00:00
parent 7bfa2da31d
commit 2a4643b959
31 changed files with 355 additions and 161 deletions

View File

@ -9,7 +9,7 @@ object MainForm: TMainForm
Menu = MainMenu1 Menu = MainMenu1
OnCloseQuery = FormCloseQuery OnCloseQuery = FormCloseQuery
OnCreate = FormCreate OnCreate = FormCreate
LCLVersion = '1.6.4.0' LCLVersion = '1.9.0.0'
object Panel1: TPanel object Panel1: TPanel
Left = 125 Left = 125
Height = 576 Height = 576
@ -58,7 +58,7 @@ object MainForm: TMainForm
Height = 528 Height = 528
Top = 48 Top = 48
Width = 834 Width = 834
PageIndex = 1 PageIndex = 0
Align = alClient Align = alClient
TabOrder = 1 TabOrder = 1
TabStop = True TabStop = True

View File

@ -167,6 +167,7 @@ implementation
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
{$DEFINE NEW_ICONS} // The same as in vp.inc
uses uses
{$IFDEF WINDOWS} {$IFDEF WINDOWS}
@ -511,8 +512,13 @@ begin
CategoryColorMap.Category0.BackgroundColor := clSkyBlue; CategoryColorMap.Category0.BackgroundColor := clSkyBlue;
CategoryColorMap.Category0.Color := clNavy; CategoryColorMap.Category0.Color := clNavy;
CategoryColorMap.Category0.Description := 'Appointment'; CategoryColorMap.Category0.Description := 'Appointment';
// CategoryColorMap.Category0.Bitmap.Transparent := true; // <-- not working //CategoryColorMap.Category0.Bitmap.Transparent := true; // <-- not working
CategoryColorMap.Category0.Bitmap.LoadFromResourceName(HINSTANCE, 'VPUPARROW'); LoadGlyphFromRCDATA(CategoryColorMap.Category0.Bitmap, 'SORTASC');
{
bmp := CreateBitmapFromRCDATA('SORTASC');
CategoryColorMap.Category0.Bitmap.Assign(bmp);
bmp.Free;
}
CategoryColorMap.Category1.BackgroundColor := 13290239; CategoryColorMap.Category1.BackgroundColor := 13290239;
CategoryColorMap.Category1.Color := clRed; CategoryColorMap.Category1.Color := clRed;
CategoryColorMap.Category1.Description := 'Urgent'; CategoryColorMap.Category1.Description := 'Urgent';

View File

@ -251,16 +251,6 @@ msgstr "Datei"
msgid "Help" msgid "Help"
msgstr "Hilfe" msgstr "Hilfe"
#: tmainform.menuitem3.caption
msgctxt "tmainform.menuitem3.caption"
msgid "-"
msgstr ""
#: tmainform.menuitem4.caption
msgctxt "tmainform.menuitem4.caption"
msgid "-"
msgstr ""
#: tmainform.mnuabout.caption #: tmainform.mnuabout.caption
msgid "About Visual PlanIt" msgid "About Visual PlanIt"
msgstr "Über Visual PlanIt" msgstr "Über Visual PlanIt"

View File

@ -240,16 +240,6 @@ msgstr "Tiedosto"
msgid "Help" msgid "Help"
msgstr "Ohje" msgstr "Ohje"
#: tmainform.menuitem3.caption
msgctxt "tmainform.menuitem3.caption"
msgid "-"
msgstr ""
#: tmainform.menuitem4.caption
msgctxt "tmainform.menuitem4.caption"
msgid "-"
msgstr ""
#: tmainform.mnuabout.caption #: tmainform.mnuabout.caption
msgid "About Visual PlanIt" msgid "About Visual PlanIt"
msgstr "Tietoja Visual PlanIt:stä" msgstr "Tietoja Visual PlanIt:stä"

View File

@ -245,16 +245,6 @@ msgstr "Bestand"
msgid "Help" msgid "Help"
msgstr "Help" msgstr "Help"
#: tmainform.menuitem3.caption
msgctxt "tmainform.menuitem3.caption"
msgid "-"
msgstr ""
#: tmainform.menuitem4.caption
msgctxt "tmainform.menuitem4.caption"
msgid "-"
msgstr ""
#: tmainform.mnuabout.caption #: tmainform.mnuabout.caption
msgid "About Visual PlanIt" msgid "About Visual PlanIt"
msgstr "Over Visual PlanIt" msgstr "Over Visual PlanIt"

View File

@ -240,16 +240,6 @@ msgstr ""
msgid "Help" msgid "Help"
msgstr "" msgstr ""
#: tmainform.menuitem3.caption
msgctxt "TMAINFORM.MENUITEM3.CAPTION"
msgid "-"
msgstr ""
#: tmainform.menuitem4.caption
msgctxt "tmainform.menuitem4.caption"
msgid "-"
msgstr ""
#: tmainform.mnuabout.caption #: tmainform.mnuabout.caption
msgid "About Visual PlanIt" msgid "About Visual PlanIt"
msgstr "" msgstr ""

View File

@ -254,16 +254,6 @@ msgstr "Файл"
msgid "Help" msgid "Help"
msgstr "Справка" msgstr "Справка"
#: tmainform.menuitem3.caption
msgctxt "tmainform.menuitem3.caption"
msgid "-"
msgstr ""
#: tmainform.menuitem4.caption
msgctxt "tmainform.menuitem4.caption"
msgid "-"
msgstr ""
#: tmainform.mnuabout.caption #: tmainform.mnuabout.caption
msgid "About Visual PlanIt" msgid "About Visual PlanIt"
msgstr "О Visual PlanIt" msgstr "О Visual PlanIt"

View File

@ -31,7 +31,8 @@
{$ENDIF} {$ENDIF}
{Conditional defines that affect compilation} {Conditional defines that affect compilation}
{ But we don't want to override Lazarus Build modes here... }
{$IFDEF DELPHI}
{$Q-} {Overflow Checking} {$Q-} {Overflow Checking}
{$R-} {Range-Checking} {$R-} {Range-Checking}
{$S-} {Stack-Overflow Checking} {$S-} {Stack-Overflow Checking}
@ -44,6 +45,7 @@
{$H+} {Huge strings} {$H+} {Huge strings}
{$A+} {Word Align Data} {$A+} {Word Align Data}
{$I+} {Input/Output-Checking} {$I+} {Input/Output-Checking}
{$ENDIF}
{-Invalid Platform Defines----------------------------------------------} {-Invalid Platform Defines----------------------------------------------}
{ Visual PlanIt only supports D3 - D6 and BCB3 - BCB6 } { Visual PlanIt only supports D3 - D6 and BCB3 - BCB6 }
@ -117,3 +119,6 @@
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
{ This defines whether the new icons will be linked into the package. }
{$DEFINE NEW_ICONS}

View File

@ -1,6 +1,6 @@
object frmAbout: TfrmAbout object frmAbout: TfrmAbout
Left = 368 Left = 368
Height = 339 Height = 387
Top = 312 Top = 312
Width = 634 Width = 634
HorzScrollBar.Page = 470 HorzScrollBar.Page = 470
@ -8,7 +8,7 @@ object frmAbout: TfrmAbout
AutoSize = True AutoSize = True
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'About Visual PlanIt' Caption = 'About Visual PlanIt'
ClientHeight = 339 ClientHeight = 387
ClientWidth = 634 ClientWidth = 634
OnActivate = FormActivate OnActivate = FormActivate
Position = poScreenCenter Position = poScreenCenter
@ -21,7 +21,7 @@ object frmAbout: TfrmAbout
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 0 Left = 0
Height = 55 Height = 55
Top = 272 Top = 310
Width = 634 Width = 634
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
@ -81,32 +81,32 @@ object frmAbout: TfrmAbout
end end
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 264 Height = 302
Top = 0 Top = 0
Width = 634 Width = 634
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 264 ClientHeight = 302
ClientWidth = 634 ClientWidth = 634
TabOrder = 1 TabOrder = 1
object ImagePanel: TPanel object ImagePanel: TPanel
Left = 4 Left = 4
Height = 252 Height = 290
Top = 8 Top = 8
Width = 139 Width = 164
Align = alLeft Align = alLeft
BorderSpacing.Top = 4 BorderSpacing.Top = 4
BorderSpacing.Around = 4 BorderSpacing.Around = 4
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 252 ClientHeight = 290
ClientWidth = 139 ClientWidth = 164
TabOrder = 0 TabOrder = 0
object Image1: TImage object Image1: TImage
Left = 0 Left = 0
Height = 252 Height = 290
Top = 0 Top = 0
Width = 139 Width = 164
Align = alClient Align = alClient
Picture.Data = { Picture.Data = {
07544269746D6170628C0000424D628C00000000000036040000280000008900 07544269746D6170628C0000424D628C00000000000036040000280000008900
@ -1239,17 +1239,17 @@ object frmAbout: TfrmAbout
end end
end end
object TextPanel: TPanel object TextPanel: TPanel
Left = 151 Left = 176
Height = 256 Height = 294
Top = 8 Top = 8
Width = 483 Width = 458
Align = alClient Align = alClient
AutoSize = True AutoSize = True
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Top = 8 BorderSpacing.Top = 8
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 256 ClientHeight = 294
ClientWidth = 483 ClientWidth = 458
TabOrder = 1 TabOrder = 1
object ProgramName: TLabel object ProgramName: TLabel
AnchorSideLeft.Control = TextPanel AnchorSideLeft.Control = TextPanel
@ -1453,6 +1453,36 @@ object frmAbout: TfrmAbout
OnMouseLeave = lblLinkMouseLeave OnMouseLeave = lblLinkMouseLeave
end end
end end
object Label6: TLabel
AnchorSideTop.Control = SupportPanel
AnchorSideTop.Side = asrBottom
Left = 0
Height = 15
Top = 264
Width = 193
BorderSpacing.Top = 8
Caption = 'Internally used icons are provided by'
ParentColor = False
end
object lblLazPortLink1: TLabel
AnchorSideLeft.Control = TextPanel
AnchorSideTop.Control = Label6
AnchorSideTop.Side = asrBottom
Cursor = crHandPoint
Left = 12
Height = 15
Top = 279
Width = 96
BorderSpacing.Left = 12
BorderSpacing.Right = 8
Caption = 'http://icons8.com'
Font.Color = clBlue
ParentColor = False
ParentFont = False
OnClick = lblLinkClick
OnMouseEnter = lblLinkMouseEnter
OnMouseLeave = lblLinkMouseLeave
end
end end
end end
end end

View File

@ -59,10 +59,12 @@ type
Bevel3: TBevel; Bevel3: TBevel;
Label4: TLabel; Label4: TLabel;
Label5: TLabel; Label5: TLabel;
Label6: TLabel;
lblLazForumLink: TLabel; lblLazForumLink: TLabel;
lblLazPortLink: TLabel; lblLazPortLink: TLabel;
ImagePanel: TPanel; ImagePanel: TPanel;
Image1: TImage; Image1: TImage;
lblLazPortLink1: TLabel;
Panel1: TPanel; Panel1: TPanel;
TextPanel: TPanel; TextPanel: TPanel;
SupportPanel: TPanel; SupportPanel: TPanel;

View File

@ -370,8 +370,11 @@ type
implementation implementation
{$R vpbase.res} {$IFDEF NEW_ICONS}
{$R vpbasepng.res} {$R vpbasepng.res}
{$ELSE}
{$R vpbase.res}
{$ENDIF}
uses uses
{$IFNDEF LCL} {$IFNDEF LCL}

View File

@ -808,28 +808,44 @@ begin
{create navigation buttons} {create navigation buttons}
clBtnLeft := TSpeedButton.Create(Self); clBtnLeft := TSpeedButton.Create(Self);
clBtnLeft.Parent := Self; clBtnLeft.Parent := Self;
{$IFDEF NEW_ICONS}
LoadGlyphFromRCDATA(clBtnLeft.Glyph, 'VpLArrow', 16, 24, 32);
{$ELSE}
clBtnLeft.Glyph.LoadFromResourceName(HINSTANCE,'VPLEFTARROW'); //soner geändert: clBtnLeft.Glyph.Handle := LoadBaseBitmap('VPLEFTARROW'); clBtnLeft.Glyph.LoadFromResourceName(HINSTANCE,'VPLEFTARROW'); //soner geändert: clBtnLeft.Glyph.Handle := LoadBaseBitmap('VPLEFTARROW');
{$ENDIF}
clBtnLeft.OnClick := calBtnClick; clBtnLeft.OnClick := calBtnClick;
clBtnLeft.Hint := RSPrevMonth; clBtnLeft.Hint := RSPrevMonth;
clBtnLeft.ShowHint := True; clBtnLeft.ShowHint := True;
clBtnRight := TSpeedButton.Create(Self); clBtnRight := TSpeedButton.Create(Self);
clBtnRight.Parent := Self; clBtnRight.Parent := Self;
{$IFDEF NEW_ICONS}
LoadGlyphFromRCDATA(clBtnRight.Glyph, 'VpRArrow', 16, 24, 32);
{$ELSE}
clBtnRight.Glyph.LoadFromResourceName(HINSTANCE,'VPRIGHTARROW'); //soner geändert: clBtnRight.Glyph.Handle := LoadBaseBitmap('VPRIGHTARROW'); clBtnRight.Glyph.LoadFromResourceName(HINSTANCE,'VPRIGHTARROW'); //soner geändert: clBtnRight.Glyph.Handle := LoadBaseBitmap('VPRIGHTARROW');
{$ENDIF}
clBtnRight.OnClick := calBtnClick; clBtnRight.OnClick := calBtnClick;
clBtnRight.Hint := RSNextMonth; clBtnRight.Hint := RSNextMonth;
clBtnRight.ShowHint := True; clBtnRight.ShowHint := True;
clBtnNextYear := TSpeedButton.Create(Self); clBtnNextYear := TSpeedButton.Create(Self);
clBtnNextYear.Parent := Self; clBtnNextYear.Parent := Self;
{$IFDEF NEW_ICONS}
LoadGlyphFromRCDATA(clBtnNextYear.Glyph, 'VpRArrows', 16, 24, 32);
{$ELSE}
clBtnNextYear.Glyph.LoadFromResourceName(HINSTANCE,'VPRIGHTARROWS'); //soner geöndert: clBtnNextYear.Glyph.Handle := LoadBaseBitmap('VPRIGHTARROWS'); clBtnNextYear.Glyph.LoadFromResourceName(HINSTANCE,'VPRIGHTARROWS'); //soner geöndert: clBtnNextYear.Glyph.Handle := LoadBaseBitmap('VPRIGHTARROWS');
{$ENDIF}
clBtnNextYear.OnClick := calBtnClick; clBtnNextYear.OnClick := calBtnClick;
clBtnNextYear.Hint := RSNextYear; clBtnNextYear.Hint := RSNextYear;
clBtnNextYear.ShowHint := True; clBtnNextYear.ShowHint := True;
clBtnPrevYear := TSpeedButton.Create(Self); clBtnPrevYear := TSpeedButton.Create(Self);
clBtnPrevYear.Parent := Self; clBtnPrevYear.Parent := Self;
{$IFDEF NEW_ICONS}
LoadGlyphFromRCData(clBtnNextYear.Glyph, 'VpLArrows', 16, 24, 32);
{$ELSE}
clBtnPrevYear.Glyph.LoadFromResourceName(HINSTANCE,'VPLEFTARROWS'); //soner geöndert: clBtnPrevYear.Glyph.Handle := LoadBaseBitmap('VPLEFTARROWS'); clBtnPrevYear.Glyph.LoadFromResourceName(HINSTANCE,'VPLEFTARROWS'); //soner geöndert: clBtnPrevYear.Glyph.Handle := LoadBaseBitmap('VPLEFTARROWS');
{$ENDIF}
clBtnPrevYear.OnClick := calBtnClick; clBtnPrevYear.OnClick := calBtnClick;
clBtnPrevYear.Hint := RSPrevYear; clBtnPrevYear.Hint := RSPrevYear;
clBtnPrevYear.ShowHint := True; clBtnPrevYear.ShowHint := True;
@ -837,7 +853,11 @@ begin
{create "revert" button} {create "revert" button}
clBtnRevert := TSpeedButton.Create(Self); clBtnRevert := TSpeedButton.Create(Self);
clBtnRevert.Parent := Self; clBtnRevert.Parent := Self;
{$IFDEF NEW_ICONS}
LoadGlyphFromRCData(clBtnRevert.Glyph, 'VpRevert', 16, 24, 32);
{$ELSE}
clBtnRevert.Glyph.LoadFromResourceName(HINSTANCE,'VPREVERT'); //soner geändert: clBtnRevert.Glyph.Handle := LoadBaseBitmap('VPREVERT'); clBtnRevert.Glyph.LoadFromResourceName(HINSTANCE,'VPREVERT'); //soner geändert: clBtnRevert.Glyph.Handle := LoadBaseBitmap('VPREVERT');
{$ENDIF}
clBtnRevert.OnClick := calBtnClick; clBtnRevert.OnClick := calBtnClick;
clBtnRevert.Hint := RSCalendarRevert; clBtnRevert.Hint := RSCalendarRevert;
clBtnRevert.ShowHint := True; clBtnRevert.ShowHint := True;
@ -845,7 +865,11 @@ begin
{create "today" button} {create "today" button}
clBtnToday := TSpeedButton.Create(Self); clBtnToday := TSpeedButton.Create(Self);
clBtnToday.Parent := Self; clBtnToday.Parent := Self;
{$IFDEF NEW_ICONS}
LoadGlyphFromRCData(clBtnToday.Glyph, 'VpToday', 16, 24, 32);
{$ELSE}
clBtnToday.Glyph.LoadFromResourceName(HINSTANCE,'VPTODAY'); //soner geändert: clBtnToday.Glyph.Handle := LoadBaseBitmap('VPTODAY'); clBtnToday.Glyph.LoadFromResourceName(HINSTANCE,'VPTODAY'); //soner geändert: clBtnToday.Glyph.Handle := LoadBaseBitmap('VPTODAY');
{$ENDIF}
clBtnToday.OnClick := calBtnClick; clBtnToday.OnClick := calBtnClick;
clBtnToday.Hint := RSToday; clBtnToday.Hint := RSToday;
clBtnToday.ShowHint := True; clBtnToday.ShowHint := True;

View File

@ -48,7 +48,7 @@ uses
const const
BuildTime = {$I %DATE%} + {$I %TIME}; //'09/13/2002 09:25 AM'; BuildTime = {$I %DATE%} + {$I %TIME}; //'09/13/2002 09:25 AM';
VpVersionStr = 'v1.05'; {Visual PlanIt library version} VpVersionStr = 'v1.08'; {Visual PlanIt library version}
VpProductName = 'Visual PlanIt'; VpProductName = 'Visual PlanIt';
BorderStyles : array[TBorderStyle] of LongInt = BorderStyles : array[TBorderStyle] of LongInt =

View File

@ -20,14 +20,14 @@ object ContactEditForm: TContactEditForm
Height = 577 Height = 577
Top = 0 Top = 0
Width = 506 Width = 506
ActivePage = tabAddresses ActivePage = tabBaseData
Align = alClient Align = alClient
TabIndex = 1 TabIndex = 0
TabOrder = 0 TabOrder = 0
OnChange = PageControlChange OnChange = PageControlChange
object tabBaseData: TTabSheet object tabBaseData: TTabSheet
Caption = 'tabBaseData' Caption = 'tabBaseData'
ClientHeight = 545 ClientHeight = 549
ClientWidth = 498 ClientWidth = 498
ImageIndex = 0 ImageIndex = 0
object lblLastName: TLabel object lblLastName: TLabel
@ -54,7 +54,7 @@ object ContactEditForm: TContactEditForm
Height = 23 Height = 23
Top = 8 Top = 8
Width = 384 Width = 384
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akRight]
BorderSpacing.Top = 8 BorderSpacing.Top = 8
BorderSpacing.Right = 8 BorderSpacing.Right = 8
MaxLength = 100 MaxLength = 100

View File

@ -521,7 +521,7 @@ begin
hBorder := ScaleX(hBorder, DesignTimeDPI); hBorder := ScaleX(hBorder, DesignTimeDPI);
vBorder := ScaleY(vBorder, DesignTimeDPI); vBorder := ScaleY(vBorder, DesignTimeDPI);
edBirthdate.ButtonWidth := edBirthdate.Height; edBirthdate.ButtonWidth := edBirthdate.Height;
comboArrowWidth := GetSystemMetrics(SM_CXVSCROLL); comboArrowWidth := GetSystemMetrics(SM_CXVSCROLL) * 2;
for i := 0 to ComponentCount-1 do for i := 0 to ComponentCount-1 do
if Components[i] is TControl then if Components[i] is TControl then
@ -542,6 +542,9 @@ begin
{----------------------------------------------------------------------------} {----------------------------------------------------------------------------}
edBirthdate.Width := edTitle.Width; edBirthdate.Width := edTitle.Width;
cbCategory.Width := edTitle.Width; cbCategory.Width := edTitle.Width;
{$IFDEF NEW_ICONS}
LoadGlyphFromRCDATA(edBirthDate.Button.Glyph, 'VpDateEdit', 16, 24, 32);
{$ENDIF}
{----------------------------------------------------------------------------} {----------------------------------------------------------------------------}
{ Page "Contact" } { Page "Contact" }

View File

@ -721,11 +721,19 @@ begin
dvDayUpBtn.Transparent := true; dvDayUpBtn.Transparent := true;
dvWeekUpBtn.Transparent := true; dvWeekUpBtn.Transparent := true;
{ load their images } { load their images }
{$IFDEF NEW_ICONS}
LoadGlyphFromRCDATA(dvDayUpBtn.Glyph, 'VpRArrow', 16, 24, 32);
LoadGlyphFromRCDATA(dvDayDownBtn.Glyph, 'VpLArrow', 16, 24, 32);
LoadGlyphFromRCDATA(dvTodayBtn.Glyph, 'VpToday', 16, 24, 32);
LoadGlyphFromRCDATA(dvWeekUpBtn.Glyph, 'VpRArrows', 16, 24, 32);
LoadGlyphFromRCDATA(dvWeekDownBtn.Glyph, 'VpLArrows', 16, 24, 32);
{$ELSE}
dvDayUpBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPRIGHTARROW'); dvDayUpBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPRIGHTARROW');
dvDayDownBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPLEFTARROW'); dvDayDownBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPLEFTARROW');
dvTodayBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPTODAY'); dvTodayBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPTODAY');
dvWeekUpBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPRIGHTARROWS'); dvWeekUpBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPRIGHTARROWS');
dvWeekDownBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPLEFTARROWS'); dvWeekDownBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPLEFTARROWS');
{$ENDIF}
{ set their OnClick handler } { set their OnClick handler }
dvDayUpBtn.OnClick := dvNavButtonsClick; dvDayUpBtn.OnClick := dvNavButtonsClick;
dvDayDownBtn.OnClick := dvNavButtonsClick; dvDayDownBtn.OnClick := dvNavButtonsClick;

View File

@ -1509,6 +1509,9 @@ begin
RenderCanvas.Font.Size := ScaleY(RenderCanvas.Font.Size, DesignTimeDPI); RenderCanvas.Font.Size := ScaleY(RenderCanvas.Font.Size, DesignTimeDPI);
{$ENDIF} {$ENDIF}
inc(Result, RenderCanvas.TextWidth('33')); inc(Result, RenderCanvas.TextWidth('33'));
with TVpDayViewOpener(FDayView) do
Result := Max(Result, dvDayUpBtn.Glyph.Width + dvDayDownBtn.Glyph.Width +
dvWeekUpBtn.Glyph.Width + dvWeekDownBtn.Glyph.Width);
end; end;
procedure TVpDayViewPainter.FixFontHeights; procedure TVpDayViewPainter.FixFontHeights;

View File

@ -122,7 +122,6 @@ type
implementation implementation
uses uses
Math,
VpMisc, VpEdShape; VpMisc, VpEdShape;
{$IFDEF LCL} {$IFDEF LCL}

View File

@ -363,18 +363,18 @@ object frmEditShape: TfrmEditShape
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = gbPen AnchorSideBottom.Control = gbPen
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 232 Left = 284
Height = 25 Height = 25
Top = 202 Top = 202
Width = 172 Width = 120
Anchors = [akLeft, akRight, akBottom] Anchors = [akRight, akBottom]
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 25 ClientHeight = 25
ClientWidth = 172 ClientWidth = 120
TabOrder = 3 TabOrder = 3
object btnOk: TButton object btnOk: TButton
Left = 60 Left = 8
Height = 25 Height = 25
Top = 0 Top = 0
Width = 42 Width = 42
@ -387,7 +387,7 @@ object frmEditShape: TfrmEditShape
TabOrder = 0 TabOrder = 0
end end
object btnCancel: TButton object btnCancel: TButton
Left = 110 Left = 58
Height = 25 Height = 25
Top = 0 Top = 0
Width = 62 Width = 62

View File

@ -1,27 +1,27 @@
object DlgEventEdit: TDlgEventEdit object DlgEventEdit: TDlgEventEdit
Left = 255 Left = 255
Height = 535 Height = 532
Top = 202 Top = 202
Width = 726 Width = 765
AutoSize = True AutoSize = True
BorderStyle = bsToolWindow BorderStyle = bsToolWindow
Caption = 'Add / Edit Events' Caption = 'Add / Edit Events'
ClientHeight = 535 ClientHeight = 532
ClientWidth = 726 ClientWidth = 765
OnCreate = FormCreate OnCreate = FormCreate
OnShow = FormShow OnShow = FormShow
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '1.6.4.0' LCLVersion = '1.9.0.0'
object ButtonPanel: TPanel object ButtonPanel: TPanel
Left = 0 Left = 0
Height = 37 Height = 37
Top = 498 Top = 495
Width = 726 Width = 765
Align = alBottom Align = alBottom
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 37 ClientHeight = 37
ClientWidth = 726 ClientWidth = 765
TabOrder = 1 TabOrder = 1
object ResourceNameLbl: TLabel object ResourceNameLbl: TLabel
AnchorSideLeft.Control = ButtonPanel AnchorSideLeft.Control = ButtonPanel
@ -40,7 +40,7 @@ object DlgEventEdit: TDlgEventEdit
ParentFont = False ParentFont = False
end end
object OKBtn: TButton object OKBtn: TButton
Left = 577 Left = 616
Height = 25 Height = 25
Top = 6 Top = 6
Width = 66 Width = 66
@ -54,7 +54,7 @@ object DlgEventEdit: TDlgEventEdit
TabOrder = 0 TabOrder = 0
end end
object CancelBtn: TButton object CancelBtn: TButton
Left = 649 Left = 688
Height = 25 Height = 25
Top = 6 Top = 6
Width = 71 Width = 71
@ -70,27 +70,27 @@ object DlgEventEdit: TDlgEventEdit
end end
object Panel1: TPanel object Panel1: TPanel
Left = 12 Left = 12
Height = 486 Height = 483
Top = 12 Top = 12
Width = 702 Width = 741
Align = alClient Align = alClient
BorderSpacing.Left = 12 BorderSpacing.Left = 12
BorderSpacing.Top = 12 BorderSpacing.Top = 12
BorderSpacing.Right = 12 BorderSpacing.Right = 12
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 486 ClientHeight = 483
ClientWidth = 702 ClientWidth = 741
TabOrder = 0 TabOrder = 0
object AppointmentGroupBox: TGroupBox object AppointmentGroupBox: TGroupBox
Left = 0 Left = 0
Height = 231 Height = 239
Top = 0 Top = 0
Width = 702 Width = 741
Align = alTop Align = alTop
AutoSize = True AutoSize = True
Caption = 'Appointment' Caption = 'Appointment'
ClientHeight = 211 ClientHeight = 219
ClientWidth = 698 ClientWidth = 737
TabOrder = 0 TabOrder = 0
object Bevel1: TBevel object Bevel1: TBevel
AnchorSideLeft.Control = AppointmentGroupBox AnchorSideLeft.Control = AppointmentGroupBox
@ -101,7 +101,7 @@ object DlgEventEdit: TDlgEventEdit
Left = 12 Left = 12
Height = 3 Height = 3
Top = 64 Top = 64
Width = 672 Width = 681
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12 BorderSpacing.Left = 12
BorderSpacing.Top = 12 BorderSpacing.Top = 12
@ -116,7 +116,7 @@ object DlgEventEdit: TDlgEventEdit
Left = 12 Left = 12
Height = 3 Height = 3
Top = 167 Top = 167
Width = 672 Width = 681
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12 BorderSpacing.Left = 12
BorderSpacing.Top = 12 BorderSpacing.Top = 12
@ -144,7 +144,7 @@ object DlgEventEdit: TDlgEventEdit
Left = 142 Left = 142
Height = 23 Height = 23
Top = 0 Top = 0
Width = 542 Width = 551
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
TabOrder = 0 TabOrder = 0
Text = 'DescriptionEdit' Text = 'DescriptionEdit'
@ -172,7 +172,7 @@ object DlgEventEdit: TDlgEventEdit
Left = 142 Left = 142
Height = 23 Height = 23
Top = 29 Top = 29
Width = 205 Width = 214
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Right = 12 BorderSpacing.Right = 12
@ -183,7 +183,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideTop.Control = Category AnchorSideTop.Control = Category
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Category AnchorSideRight.Control = Category
Left = 368 Left = 377
Height = 15 Height = 15
Top = 33 Top = 33
Width = 51 Width = 51
@ -199,7 +199,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = DescriptionEdit AnchorSideRight.Control = DescriptionEdit
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 431 Left = 440
Height = 23 Height = 23
Top = 29 Top = 29
Width = 253 Width = 253
@ -356,7 +356,7 @@ object DlgEventEdit: TDlgEventEdit
Left = 142 Left = 142
Height = 23 Height = 23
Top = 101 Top = 101
Width = 93 Width = 102
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames] CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
DateOrder = doNone DateOrder = doNone
ButtonWidth = 23 ButtonWidth = 23
@ -411,7 +411,7 @@ object DlgEventEdit: TDlgEventEdit
Left = 142 Left = 142
Height = 23 Height = 23
Top = 132 Top = 132
Width = 93 Width = 102
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames] CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
DateOrder = doNone DateOrder = doNone
ButtonWidth = 23 ButtonWidth = 23
@ -463,7 +463,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideTop.Control = CBAllDay AnchorSideTop.Control = CBAllDay
AnchorSideBottom.Control = EndDate AnchorSideBottom.Control = EndDate
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 356 Left = 365
Height = 79 Height = 79
Top = 76 Top = 76
Width = 3 Width = 3
@ -475,7 +475,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideLeft.Control = Bevel3 AnchorSideLeft.Control = Bevel3
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = imgClock AnchorSideTop.Control = imgClock
Left = 375 Left = 384
Height = 32 Height = 32
Top = 76 Top = 76
Width = 32 Width = 32
@ -541,7 +541,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = CBAllDay AnchorSideTop.Control = CBAllDay
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 419 Left = 428
Height = 15 Height = 15
Top = 78 Top = 78
Width = 136 Width = 136
@ -554,7 +554,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideTop.Control = StartDate AnchorSideTop.Control = StartDate
AnchorSideRight.Control = RecurringLbl AnchorSideRight.Control = RecurringLbl
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 419 Left = 428
Height = 23 Height = 23
Top = 101 Top = 101
Width = 136 Width = 136
@ -568,7 +568,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideTop.Control = EndDate AnchorSideTop.Control = EndDate
AnchorSideRight.Control = IntervalUpDown AnchorSideRight.Control = IntervalUpDown
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 522 Left = 531
Height = 23 Height = 23
Top = 132 Top = 132
Width = 162 Width = 162
@ -620,7 +620,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideTop.Control = RepeatUntil AnchorSideTop.Control = RepeatUntil
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = RepeatUntil AnchorSideRight.Control = RepeatUntil
Left = 482 Left = 491
Height = 15 Height = 15
Top = 136 Top = 136
Width = 28 Width = 28
@ -635,7 +635,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideTop.Control = RecurringLbl AnchorSideTop.Control = RecurringLbl
AnchorSideRight.Control = IntervalUpDown AnchorSideRight.Control = IntervalUpDown
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 607 Left = 616
Height = 15 Height = 15
Top = 78 Top = 78
Width = 77 Width = 77
@ -648,7 +648,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideLeft.Control = RecurringType AnchorSideLeft.Control = RecurringType
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = StartDate AnchorSideTop.Control = StartDate
Left = 563 Left = 572
Height = 23 Height = 23
Top = 101 Top = 101
Width = 106 Width = 106
@ -663,7 +663,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideLeft.Control = CustomInterval AnchorSideLeft.Control = CustomInterval
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 672 Left = 681
Height = 23 Height = 23
Top = 101 Top = 101
Width = 12 Width = 12
@ -685,6 +685,7 @@ object DlgEventEdit: TDlgEventEdit
Width = 32 Width = 32
BorderSpacing.Left = 16 BorderSpacing.Left = 16
BorderSpacing.Top = 12 BorderSpacing.Top = 12
BorderSpacing.Bottom = 8
Picture.Data = { Picture.Data = {
1754506F727461626C654E6574776F726B477261706869633E08000089504E47 1754506F727461626C654E6574776F726B477261706869633E08000089504E47
0D0A1A0A0000000D4948445200000020000000200806000000737A7AF4000000 0D0A1A0A0000000D4948445200000020000000200806000000737A7AF4000000
@ -792,7 +793,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = StartDate AnchorSideRight.Control = StartDate
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 223 Left = 232
Height = 23 Height = 23
Top = 178 Top = 178
Width = 12 Width = 12
@ -810,7 +811,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = AlarmAdvance AnchorSideTop.Control = AlarmAdvance
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 247 Left = 256
Height = 23 Height = 23
Top = 178 Top = 178
Width = 93 Width = 93
@ -825,7 +826,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideTop.Control = AlarmAdvanceType AnchorSideTop.Control = AlarmAdvanceType
AnchorSideBottom.Control = AlarmAdvanceType AnchorSideBottom.Control = AlarmAdvanceType
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 356 Left = 365
Height = 23 Height = 23
Top = 178 Top = 178
Width = 24 Width = 24
@ -849,7 +850,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideTop.Control = EndDate AnchorSideTop.Control = EndDate
AnchorSideRight.Control = AlarmAdvanceType AnchorSideRight.Control = AlarmAdvanceType
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 247 Left = 256
Height = 23 Height = 23
Top = 132 Top = 132
Width = 93 Width = 93
@ -864,7 +865,7 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideTop.Control = StartDate AnchorSideTop.Control = StartDate
AnchorSideRight.Control = AlarmAdvanceType AnchorSideRight.Control = AlarmAdvanceType
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 247 Left = 256
Height = 23 Height = 23
Top = 101 Top = 101
Width = 93 Width = 93
@ -876,9 +877,9 @@ object DlgEventEdit: TDlgEventEdit
end end
object NotesMemo: TMemo object NotesMemo: TMemo
Left = 0 Left = 0
Height = 243 Height = 232
Top = 243 Top = 251
Width = 702 Width = 741
Align = alClient Align = alClient
Constraints.MinHeight = 200 Constraints.MinHeight = 200
ScrollBars = ssVertical ScrollBars = ssVertical
@ -887,8 +888,8 @@ object DlgEventEdit: TDlgEventEdit
object Bevel4: TBevel object Bevel4: TBevel
Left = 0 Left = 0
Height = 12 Height = 12
Top = 231 Top = 239
Width = 702 Width = 741
Align = alTop Align = alTop
Shape = bsSpacer Shape = bsSpacer
end end

View File

@ -640,7 +640,8 @@ begin
cnv := TControlCanvas.Create; cnv := TControlCanvas.Create;
try try
cnv.Control := StartDate; cnv.Control := StartDate;
w := cnv.TextWidth(FormatDateTime(' dd. mm. yyyy ', EncodeDate(2000,12,30))); cnv.Font.Assign(startDate.Font);
w := cnv.TextWidth(FormatDateTime(' dd. mm. yyyy ', EncodeDate(2000,12,30)));
Startdate.Width := w + StartDate.ButtonWidth; Startdate.Width := w + StartDate.ButtonWidth;
EndDate.Width := StartDate.Width; EndDate.Width := StartDate.Width;
StartTime.Width := StartDate.Width; StartTime.Width := StartDate.Width;
@ -652,9 +653,25 @@ begin
AlarmAdvance.Width := AdvanceUpDown.Left - 2 - AlarmAdvance.Left; AlarmAdvance.Width := AdvanceUpDown.Left - 2 - AlarmAdvance.Left;
AlarmAdvanceType.Width := StartTime.Width; AlarmAdvanceType.Width := StartTime.Width;
SoundFinderBtn.Width := SoundFinderBtn.Height; SoundFinderBtn.Width := MulDiv(SoundFinderBtn.Height, 3, 2);
AlignOKCancel(OKBtn, CancelBtn, ButtonPanel); AlignOKCancel(OKBtn, CancelBtn, ButtonPanel);
{$IFDEF NEW_ICONS}
LoadGlyphFromRCDATA(SoundFinderBtn.Glyph, 'VpSpeaker', 16, 24, 32);
LoadGlyphFromRCDATA(StartDate.Button.Glyph, 'VpDateEdit', 16, 24, 32);
LoadGlyphFromRCDATA(EndDate.Button.Glyph, 'VpDateEdit', 16, 24, 32);
LoadGlyphFromRCDATA(RepeatUntil.Button.Glyph, 'VpDateEdit', 16, 24, 32);
{$IFDEF NEW_TIME_EDIT}
LoadGlyphFromRCDATA(StartTime.Button.Glyph, 'VpTimeEdit', 16, 24, 32);
LoadGlyphFromRCDATA(EndTime.Button.Glyph, 'VpTimeEdit', 16, 24, 32);
{$ENDIF}
LoadImageFromRCDATA(imgClock, 'VpDateTime', 32, 48, 64);
LoadImageFromRCDATA(imgRecurring, 'VPRecurringEvent', 32, 48, 64);
LoadImageFromRCDATA(imgAlarm, 'VpReminder', 32, 48, 64);
{$ENDIF}
end; end;

View File

@ -172,9 +172,16 @@ procedure AddResourceGroupMenu(AMenu: TMenuItem; AResource: TVpResource;
AEventHandler: TNotifyEvent); AEventHandler: TNotifyEvent);
function OverlayPatternToBrushStyle(APattern: TVpOverlayPattern): TBrushStyle; function OverlayPatternToBrushStyle(APattern: TVpOverlayPattern): TBrushStyle;
function CreatePngFromResourceName(AResName: String): TPortableNetworkGraphic; function CreateBitmapFromRCDATA(AResName: String): TBitmap;
function CreatePngFromRCDATA(AResName: String): TPortableNetworkGraphic;
{ Load a png picture from a resource (Note: OS resource, not vp resource! } { Load a png picture from a resource (Note: OS resource, not vp resource! }
procedure LoadGlyphFromRCDATA(AGlyph: TBitmap; AResName: String); overload;
procedure LoadGlyphFromRCDATA(AGlyph: TBitmap; ABaseResName: String;
ALowRes, AMedRes, AHighRes: Integer); overload;
procedure LoadImageFromRCDATA(AImage: TImage; ABaseResName: String;
ALowRes, AMedRes, AHighRes: Integer; AdjustSize: Boolean = true);
procedure Unused(const A1); overload; procedure Unused(const A1); overload;
procedure Unused(const A1, A2); overload; procedure Unused(const A1, A2); overload;
procedure Unused(const A1, A2, A3); overload; procedure Unused(const A1, A2, A3); overload;
@ -917,7 +924,26 @@ begin
Result := TBrushStyle(APattern); Result := TBrushStyle(APattern);
end; end;
function CreatePngFromResourceName(AResName: String): TPortableNetworkGraphic; function CreateBitmapFromRCDATA(AResName: String): TBitmap;
var
stream: TResourceStream;
pic: TPicture;
begin
stream := TResourceStream.Create(HINSTANCE, AResName, RT_RCDATA);
try
pic := TPicture.Create;
try
pic.LoadFromStream(stream);
Result := pic.Bitmap;
except
FreeAndNil(pic);
end;
finally
stream.Free;
end;
end;
function CreatePngFromRCDATA(AResName: String): TPortableNetworkGraphic;
var var
stream: TResourceStream; stream: TResourceStream;
begin begin
@ -934,6 +960,87 @@ begin
end; end;
end; end;
procedure LoadGlyphFromRCDATA(AGlyph: TBitmap; AResName: String);
var
stream: TResourceStream;
pic: TPicture;
bmp: TBitmap;
begin
stream := TResourceStream.Create(HINSTANCE, AResName, RT_RCDATA);
try
pic := TPicture.Create;
try
pic.LoadFromStream(stream);
AGlyph.Assign(pic.Bitmap);
finally
pic.Free;
end;
finally
stream.Free;
end;
end;
procedure LoadGlyphFromRCDATA(AGlyph: TBitmap; ABaseResName: String;
ALowRes, AMedRes, AHighRes: Integer);
var
stream: TResourceStream;
pic: TPicture;
ppiFactor: Integer;
resName: String;
begin
ppiFactor := MulDiv(Screen.PixelsPerInch, 100, 96);
if ppiFactor >= 145 then
resName := ABaseResName + IntToStr(AHighRes)
else if ppiFactor >= 115 then
resName := ABaseResName + IntToStr(AMedRes)
else
resName := ABaseResName + IntToStr(ALowRes);
LoadGlyphFromRCDATA(AGlyph, resName);
{
stream := TResourceStream.Create(HINSTANCE, resName, RT_RCDATA);
try
pic := TPicture.Create;
try
pic.LoadFromStream(stream);
AGlyph.Canvas.Draw(0, 0, pic.Bitmap);
// AGlyph.Assign(pic.Bitmap);
finally
pic.Free;
end;
finally
stream.Free;
end;
}
end;
procedure LoadImageFromRCDATA(AImage: TImage; ABaseResName: String;
ALowRes, AMedRes, AHighRes: Integer; AdjustSize: Boolean = true);
var
stream: TResourceStream;
ppiFactor: Integer;
resName: string;
begin
ppiFactor := MulDiv(Screen.PixelsPerInch, 100, 96);
if ppiFactor >= 145 then
resName := ABaseResName + IntToStr(AHighRes)
else if ppiFactor >= 115 then
resName := ABaseResName + IntToStr(AMedRes)
else
resName := ABaseResName + IntToStr(ALowRes);
stream := TResourceStream.Create(HINSTANCE, resName, RT_RCDATA);
try
AImage.Picture.LoadFromStream(stream);
if AdjustSize then begin
AImage.Width := AImage.Picture.Width;
AImage.Height := AImage.Picture.Height;
end;
finally
stream.Free;
end;
end;
{$PUSH}{$HINTS OFF} {$PUSH}{$HINTS OFF}
procedure Unused(const A1); procedure Unused(const A1);
begin begin

View File

@ -1030,7 +1030,7 @@ begin
Visible := False; Visible := False;
Parent := Self; Parent := Self;
OnClick := nabScrollUpBtnClick; OnClick := nabScrollUpBtnClick;
Glyph.LoadFromResourceName(HINSTANCE, 'VPUPARROW'); // Glyph.LoadFromResourceName(HINSTANCE, 'VPUPARROW');
NumGlyphs := 1; NumGlyphs := 1;
Left := -20; Left := -20;
Height := 15; Height := 15;
@ -1042,7 +1042,7 @@ begin
Visible := False; Visible := False;
Parent := Self; Parent := Self;
OnClick := nabScrollDownBtnClick; OnClick := nabScrollDownBtnClick;
Glyph.LoadFromResourceName(HINSTANCE, 'VPDOWNARROW'); // Glyph.LoadFromResourceName(HINSTANCE, 'VPDOWNARROW');
NumGlyphs := 1; NumGlyphs := 1;
Left := -20; Left := -20;
Height := 15; Height := 15;

View File

@ -12,7 +12,7 @@ object ResEditForm: TResEditForm
Constraints.MinWidth = 400 Constraints.MinWidth = 400
OnCreate = FormCreate OnCreate = FormCreate
OnShow = FormShow OnShow = FormShow
LCLVersion = '1.6.4.0' LCLVersion = '1.9.0.0'
object pnlBottom: TPanel object pnlBottom: TPanel
Left = 0 Left = 0
Height = 33 Height = 33
@ -134,13 +134,15 @@ object ResEditForm: TResEditForm
AnchorSideLeft.Control = lblDescription AnchorSideLeft.Control = lblDescription
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = tabResource AnchorSideTop.Control = tabResource
AnchorSideRight.Control = imgResources
Left = 83 Left = 83
Height = 23 Height = 23
Top = 16 Top = 16
Width = 326 Width = 325
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12 BorderSpacing.Left = 12
BorderSpacing.Top = 16 BorderSpacing.Top = 16
BorderSpacing.Right = 8
MaxLength = 255 MaxLength = 255
OnChange = Change OnChange = Change
TabOrder = 0 TabOrder = 0

View File

@ -214,6 +214,9 @@ end;
procedure TResEditForm.PositionControls; procedure TResEditForm.PositionControls;
begin begin
AlignOKCancel(OKBtn, CancelBtn, pnlBottom); AlignOKCancel(OKBtn, CancelBtn, pnlBottom);
{$IFDEF NEW_ICONS}
LoadImageFromRCDATA(imgResources, 'VpPersons', 32, 48, 64);
{$ENDIF}
end; end;
procedure TResEditForm.OKBtnClick(Sender: TObject); procedure TResEditForm.OKBtnClick(Sender: TObject);

View File

@ -11,7 +11,7 @@ object TaskEditForm: TTaskEditForm
OnCreate = FormCreate OnCreate = FormCreate
OnShow = FormShow OnShow = FormShow
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '1.6.4.0' LCLVersion = '1.9.0.0'
object ButtonPanel: TPanel object ButtonPanel: TPanel
Left = 0 Left = 0
Height = 33 Height = 33
@ -89,11 +89,11 @@ object TaskEditForm: TTaskEditForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = DueDateEdit AnchorSideTop.Control = DueDateEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 56 Left = 48
Height = 15 Height = 15
Top = 68 Top = 68
Width = 50 Width = 50
BorderSpacing.Left = 16 BorderSpacing.Left = 8
BorderSpacing.Right = 8 BorderSpacing.Right = 8
Caption = 'Due date:' Caption = 'Due date:'
FocusControl = DueDateEdit FocusControl = DueDateEdit
@ -103,7 +103,7 @@ object TaskEditForm: TTaskEditForm
AnchorSideLeft.Control = DueDateLbl AnchorSideLeft.Control = DueDateLbl
AnchorSideTop.Control = DueDateEdit AnchorSideTop.Control = DueDateEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 56 Left = 48
Height = 15 Height = 15
Top = 91 Top = 91
Width = 61 Width = 61
@ -114,7 +114,7 @@ object TaskEditForm: TTaskEditForm
object LblCompletedOn: TLabel object LblCompletedOn: TLabel
AnchorSideLeft.Control = CbPriority AnchorSideLeft.Control = CbPriority
AnchorSideTop.Control = LblCreatedOn AnchorSideTop.Control = LblCreatedOn
Left = 326 Left = 358
Height = 15 Height = 15
Top = 91 Top = 91
Width = 79 Width = 79
@ -251,7 +251,7 @@ object TaskEditForm: TTaskEditForm
AnchorSideLeft.Control = LblPriority AnchorSideLeft.Control = LblPriority
AnchorSideTop.Control = Bevel1 AnchorSideTop.Control = Bevel1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 277 Left = 309
Height = 32 Height = 32
Top = 64 Top = 64
Width = 32 Width = 32
@ -304,7 +304,7 @@ object TaskEditForm: TTaskEditForm
AnchorSideLeft.Control = CbPriority AnchorSideLeft.Control = CbPriority
AnchorSideTop.Control = DueDateEdit AnchorSideTop.Control = DueDateEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 326 Left = 358
Height = 19 Height = 19
Top = 66 Top = 66
Width = 72 Width = 72
@ -343,7 +343,7 @@ object TaskEditForm: TTaskEditForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Bevel1 AnchorSideTop.Control = Bevel1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 114 Left = 106
Height = 23 Height = 23
Top = 64 Top = 64
Width = 110 Width = 110
@ -360,7 +360,7 @@ object TaskEditForm: TTaskEditForm
AnchorSideTop.Control = CbCategory AnchorSideTop.Control = CbCategory
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = CbCategory AnchorSideRight.Control = CbCategory
Left = 55 Left = 47
Height = 15 Height = 15
Top = 35 Top = 35
Width = 51 Width = 51
@ -374,7 +374,7 @@ object TaskEditForm: TTaskEditForm
AnchorSideLeft.Control = DueDateEdit AnchorSideLeft.Control = DueDateEdit
AnchorSideTop.Control = DescriptionEdit AnchorSideTop.Control = DescriptionEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 114 Left = 106
Height = 23 Height = 23
Top = 31 Top = 31
Width = 139 Width = 139
@ -397,11 +397,11 @@ object TaskEditForm: TTaskEditForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = CbPriority AnchorSideTop.Control = CbPriority
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 277 Left = 309
Height = 15 Height = 15
Top = 35 Top = 35
Width = 41 Width = 41
BorderSpacing.Left = 24 BorderSpacing.Left = 64
Caption = 'Priority:' Caption = 'Priority:'
FocusControl = CbPriority FocusControl = CbPriority
ParentColor = False ParentColor = False
@ -411,7 +411,7 @@ object TaskEditForm: TTaskEditForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = DescriptionEdit AnchorSideTop.Control = DescriptionEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 326 Left = 358
Height = 23 Height = 23
Top = 31 Top = 31
Width = 120 Width = 120

View File

@ -229,6 +229,12 @@ begin
AlignOKCancel(OKBtn, CancelBtn, ButtonPanel); AlignOKCancel(OKBtn, CancelBtn, ButtonPanel);
{$IFDEF NEW_ICONS}
LoadImageFromRCDATA(imgCalendar, 'VpDateDue', 32, 48, 64);
LoadImageFromRCDATA(imgCompleted, 'VpToDoList', 32, 48, 64);
LoadGlyphFromRCDATA(DueDateEdit.Button.Glyph, 'VpDateEdit', 16, 24, 32);
{$ENDIF}
AutoSize := true; AutoSize := true;
end; end;
{=====} {=====}

View File

@ -267,13 +267,14 @@ begin
{ Draw the glyph } { Draw the glyph }
if FTaskList.ShowIcon then begin if FTaskList.ShowIcon then begin
{$IFDEF NEW_ICONS}
h0 := HeightOf(HeadRect) - 2; h0 := HeightOf(HeadRect) - 2;
if h0 >= 32 then if h0 >= 32 then
png := CreatePngFromResourceName('VPCHECKPAD32') png := CreatePngFromRCDATA('VPTASKS32')
else if h0 >= 24 then else if h0 >= 24 then
png := CreatePngFromResourceName('VPCHECKPAD24') png := CreatePngFromRCDATA('VPTASKS24')
else else
png := CreatePngFromResourceName('VPCHECKPAD16'); png := CreatePngFromRCDATA('VPTASKS16');
try try
if png.Height > 0 then begin if png.Height > 0 then begin
bmp := TBitmap.Create; bmp := TBitmap.Create;
@ -305,6 +306,25 @@ begin
finally finally
png.Free; png.Free;
end; end;
{$ELSE}
Bmp := Graphics.TBitmap.Create;
try
Bmp.LoadFromResourceName(HINSTANCE, 'VPCHECKPAD'); //soner changed: Bmp.Handle := LoadBaseBitmap('VPCHECKPAD');
if Bmp.Height > 0 then begin
w := Round(Bmp.Width * Scale);
h := Round(Bmp.Height * Scale);
GlyphRect.TopLeft := Point(HeadRect.Left + TextMargin, HeadRect.Top + TextMargin);
GlyphRect.BottomRight := Point(GlyphRect.Left + w, GlyphRect.Top + h);
{$IFDEF FPC}
RotateBitmap(Bmp, Angle);
{$ENDIF}
TPSStretchDraw(RenderCanvas, Angle, RenderIn, GlyphRect, Bmp);
HeadRect.Left := HeadRect.Left + w + TextMargin;
end;
finally
Bmp.Free;
end;
{$ENDIF}
end; end;
{ draw the text } { draw the text }

View File

@ -12,7 +12,7 @@ object FrmSoundDialog: TFrmSoundDialog
OnCreate = FormCreate OnCreate = FormCreate
OnShow = FormShow OnShow = FormShow
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '1.6.4.0' LCLVersion = '1.9.0.0'
object PageControl1: TPageControl object PageControl1: TPageControl
Left = 0 Left = 0
Height = 474 Height = 474
@ -73,14 +73,14 @@ object FrmSoundDialog: TFrmSoundDialog
ClientWidth = 515 ClientWidth = 515
TabOrder = 2 TabOrder = 2
object PlayButton: TSpeedButton object PlayButton: TSpeedButton
AnchorSideTop.Control = ButtonPanel AnchorSideTop.Control = OkBtn
AnchorSideTop.Side = asrCenter AnchorSideBottom.Control = OkBtn
AnchorSideBottom.Side = asrBottom
Left = 0 Left = 0
Height = 25 Height = 25
Top = 4 Top = 4
Width = 29 Width = 48
BorderSpacing.Top = 4 Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Bottom = 4
Glyph.Data = { Glyph.Data = {
DE010000424DDE01000000000000760000002800000024000000120000000100 DE010000424DDE01000000000000760000002800000024000000120000000100
0400000000006801000000000000000000001000000010000000000000000000 0400000000006801000000000000000000001000000010000000000000000000
@ -99,6 +99,7 @@ object FrmSoundDialog: TFrmSoundDialog
6666666666666688666666660000666666666666666666666666666666666666 6666666666666688666666660000666666666666666666666666666666666666
0000 0000
} }
Layout = blGlyphRight
NumGlyphs = 2 NumGlyphs = 2
OnClick = PlayButtonClick OnClick = PlayButtonClick
end end

View File

@ -140,6 +140,10 @@ end;
procedure TFrmSoundDialog.FormShow(Sender: TObject); procedure TFrmSoundDialog.FormShow(Sender: TObject);
begin begin
AlignOKCancel(OkBtn, CancelBtn, ButtonPanel); AlignOKCancel(OkBtn, CancelBtn, ButtonPanel);
PlayButton.Width := MulDiv(PlayButton.Height, 3, 2) ;
{$IFDEF NEW_ICONS}
LoadGlyphFromRCDATA(PlayButton.Glyph, 'VpSpeaker', 16, 24, 32);
{$ENDIF}
end; end;
function TFrmSoundDialog.GetSelectedFileName: String; function TFrmSoundDialog.GetSelectedFileName: String;