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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -31,7 +31,8 @@
{$ENDIF}
{Conditional defines that affect compilation}
{ But we don't want to override Lazarus Build modes here... }
{$IFDEF DELPHI}
{$Q-} {Overflow Checking}
{$R-} {Range-Checking}
{$S-} {Stack-Overflow Checking}
@ -44,6 +45,7 @@
{$H+} {Huge strings}
{$A+} {Word Align Data}
{$I+} {Input/Output-Checking}
{$ENDIF}
{-Invalid Platform Defines----------------------------------------------}
{ Visual PlanIt only supports D3 - D6 and BCB3 - BCB6 }
@ -117,3 +119,6 @@
{$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
Left = 368
Height = 339
Height = 387
Top = 312
Width = 634
HorzScrollBar.Page = 470
@ -8,7 +8,7 @@ object frmAbout: TfrmAbout
AutoSize = True
BorderStyle = bsDialog
Caption = 'About Visual PlanIt'
ClientHeight = 339
ClientHeight = 387
ClientWidth = 634
OnActivate = FormActivate
Position = poScreenCenter
@ -21,7 +21,7 @@ object frmAbout: TfrmAbout
AnchorSideRight.Side = asrBottom
Left = 0
Height = 55
Top = 272
Top = 310
Width = 634
Anchors = [akTop, akLeft, akRight]
AutoSize = True
@ -81,32 +81,32 @@ object frmAbout: TfrmAbout
end
object Panel1: TPanel
Left = 0
Height = 264
Height = 302
Top = 0
Width = 634
Align = alTop
AutoSize = True
BevelOuter = bvNone
ClientHeight = 264
ClientHeight = 302
ClientWidth = 634
TabOrder = 1
object ImagePanel: TPanel
Left = 4
Height = 252
Height = 290
Top = 8
Width = 139
Width = 164
Align = alLeft
BorderSpacing.Top = 4
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 252
ClientWidth = 139
ClientHeight = 290
ClientWidth = 164
TabOrder = 0
object Image1: TImage
Left = 0
Height = 252
Height = 290
Top = 0
Width = 139
Width = 164
Align = alClient
Picture.Data = {
07544269746D6170628C0000424D628C00000000000036040000280000008900
@ -1239,17 +1239,17 @@ object frmAbout: TfrmAbout
end
end
object TextPanel: TPanel
Left = 151
Height = 256
Left = 176
Height = 294
Top = 8
Width = 483
Width = 458
Align = alClient
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BevelOuter = bvNone
ClientHeight = 256
ClientWidth = 483
ClientHeight = 294
ClientWidth = 458
TabOrder = 1
object ProgramName: TLabel
AnchorSideLeft.Control = TextPanel
@ -1453,6 +1453,36 @@ object frmAbout: TfrmAbout
OnMouseLeave = lblLinkMouseLeave
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

View File

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

View File

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

View File

@ -808,28 +808,44 @@ begin
{create navigation buttons}
clBtnLeft := TSpeedButton.Create(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');
{$ENDIF}
clBtnLeft.OnClick := calBtnClick;
clBtnLeft.Hint := RSPrevMonth;
clBtnLeft.ShowHint := True;
clBtnRight := TSpeedButton.Create(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');
{$ENDIF}
clBtnRight.OnClick := calBtnClick;
clBtnRight.Hint := RSNextMonth;
clBtnRight.ShowHint := True;
clBtnNextYear := TSpeedButton.Create(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');
{$ENDIF}
clBtnNextYear.OnClick := calBtnClick;
clBtnNextYear.Hint := RSNextYear;
clBtnNextYear.ShowHint := True;
clBtnPrevYear := TSpeedButton.Create(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');
{$ENDIF}
clBtnPrevYear.OnClick := calBtnClick;
clBtnPrevYear.Hint := RSPrevYear;
clBtnPrevYear.ShowHint := True;
@ -837,7 +853,11 @@ begin
{create "revert" button}
clBtnRevert := TSpeedButton.Create(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');
{$ENDIF}
clBtnRevert.OnClick := calBtnClick;
clBtnRevert.Hint := RSCalendarRevert;
clBtnRevert.ShowHint := True;
@ -845,7 +865,11 @@ begin
{create "today" button}
clBtnToday := TSpeedButton.Create(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');
{$ENDIF}
clBtnToday.OnClick := calBtnClick;
clBtnToday.Hint := RSToday;
clBtnToday.ShowHint := True;

View File

@ -48,7 +48,7 @@ uses
const
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';
BorderStyles : array[TBorderStyle] of LongInt =

View File

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

View File

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

View File

@ -721,11 +721,19 @@ begin
dvDayUpBtn.Transparent := true;
dvWeekUpBtn.Transparent := true;
{ 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');
dvDayDownBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPLEFTARROW');
dvTodayBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPTODAY');
dvWeekUpBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPRIGHTARROWS');
dvWeekDownBtn.Glyph.LoadFromResourceName(HINSTANCE, 'VPLEFTARROWS');
{$ENDIF}
{ set their OnClick handler }
dvDayUpBtn.OnClick := dvNavButtonsClick;
dvDayDownBtn.OnClick := dvNavButtonsClick;

View File

@ -1509,6 +1509,9 @@ begin
RenderCanvas.Font.Size := ScaleY(RenderCanvas.Font.Size, DesignTimeDPI);
{$ENDIF}
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;
procedure TVpDayViewPainter.FixFontHeights;

View File

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

View File

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

View File

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

View File

@ -640,7 +640,8 @@ begin
cnv := TControlCanvas.Create;
try
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;
EndDate.Width := StartDate.Width;
StartTime.Width := StartDate.Width;
@ -652,9 +653,25 @@ begin
AlarmAdvance.Width := AdvanceUpDown.Left - 2 - AlarmAdvance.Left;
AlarmAdvanceType.Width := StartTime.Width;
SoundFinderBtn.Width := SoundFinderBtn.Height;
SoundFinderBtn.Width := MulDiv(SoundFinderBtn.Height, 3, 2);
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;

View File

@ -172,9 +172,16 @@ procedure AddResourceGroupMenu(AMenu: TMenuItem; AResource: TVpResource;
AEventHandler: TNotifyEvent);
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! }
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, A2); overload;
procedure Unused(const A1, A2, A3); overload;
@ -917,7 +924,26 @@ begin
Result := TBrushStyle(APattern);
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
stream: TResourceStream;
begin
@ -934,6 +960,87 @@ begin
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}
procedure Unused(const A1);
begin

View File

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

View File

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

View File

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

View File

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

View File

@ -229,6 +229,12 @@ begin
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;
end;
{=====}

View File

@ -267,13 +267,14 @@ begin
{ Draw the glyph }
if FTaskList.ShowIcon then begin
{$IFDEF NEW_ICONS}
h0 := HeightOf(HeadRect) - 2;
if h0 >= 32 then
png := CreatePngFromResourceName('VPCHECKPAD32')
png := CreatePngFromRCDATA('VPTASKS32')
else if h0 >= 24 then
png := CreatePngFromResourceName('VPCHECKPAD24')
png := CreatePngFromRCDATA('VPTASKS24')
else
png := CreatePngFromResourceName('VPCHECKPAD16');
png := CreatePngFromRCDATA('VPTASKS16');
try
if png.Height > 0 then begin
bmp := TBitmap.Create;
@ -305,6 +306,25 @@ begin
finally
png.Free;
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;
{ draw the text }

View File

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

View File

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