jvcllaz: Better color selection in JvTimeFrameWork demo.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7113 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-08-09 23:22:20 +00:00
parent 141290dc94
commit e3d87ffab7
2 changed files with 30 additions and 8 deletions

View File

@ -22,9 +22,9 @@ object MainForm: TMainForm
Height = 515
Top = 73
Width = 477
ActivePage = TabSheet3
ActivePage = TabSheet1
Align = alClient
TabIndex = 2
TabIndex = 0
TabOrder = 0
object TabSheet1: TTabSheet
Caption = 'Day View'
@ -48,6 +48,7 @@ object MainForm: TMainForm
Template.LinearEndDate = 36406
Template.LinearStartDate = 36406
Grouping = grNone
GroupHdrHeight = 28
GridStartTime = 0
GridEndTime = 0
TimeBlocks = <>
@ -63,6 +64,7 @@ object MainForm: TMainForm
SelApptAttr.Font.Color = clWindowText
SelApptAttr.ParentFont = False
HdrAttr.Font.Color = clWindowText
HdrAttr.Font.Style = [fsBold]
HdrAttr.ParentFont = False
HdrAttr.FrameColor = clBlack
SelHdrAttr.Font.Color = clBlack
@ -79,7 +81,10 @@ object MainForm: TMainForm
SelFancyRowHdrAttr.TickColor = clBlack
PrimeTime.StartTime = 0.333333333333333
PrimeTime.EndTime = 0.708333333333333
GroupHdrAttr.Color = clWindow
GroupHdrAttr.Font.Color = clWindowText
GroupHdrAttr.Font.Height = -19
GroupHdrAttr.Font.Style = [fsBold]
GroupHdrAttr.ParentFont = False
GroupHdrAttr.FrameColor = clBlack
SelGroupHdrAttr.Font.Color = clBlack
@ -145,16 +150,19 @@ object MainForm: TMainForm
CellPics = <>
CanSelect = True
end>
BorderStyle = bsNone
GapSize = 4
TitleAttr.Color = clWindow
TitleAttr.TxtAttr.Font.Color = clWindowText
TitleAttr.TxtAttr.Font.Height = -19
TitleAttr.TxtAttr.Font.Style = [fsBold]
TitleAttr.Title = 'Week of Jan 14, 2002'
CellAttr.Font.Color = clWindowText
CellAttr.FrameAttr.Color = clGray
CellAttr.TitleAttr.FrameAttr.Color = clGray
CellAttr.TitleAttr.DayTxtAttr.Font.Color = clWindowText
CellAttr.TitleAttr.DayTxtAttr.Font.Style = [fsBold]
CellAttr.DrawBottomLine = True
CellAttr.DrawBottomLine = False
SelCellAttr.Font.Color = clWindowText
SelCellAttr.TitleAttr.Color = clHighlight
SelCellAttr.TitleAttr.DayTxtAttr.Font.Color = clHighlightText
@ -445,14 +453,17 @@ object MainForm: TMainForm
CellPics = <>
CanSelect = True
end>
BorderStyle = bsNone
GapSize = 0
TitleAttr.Color = clWindow
TitleAttr.TxtAttr.Font.Color = clWindowText
TitleAttr.TxtAttr.Font.Height = -19
TitleAttr.TxtAttr.Font.Style = [fsBold]
TitleAttr.Title = 'Januar 2002'
CellAttr.Font.Color = clWindowText
CellAttr.FrameAttr.Color = clGray
CellAttr.TitleAttr.DayTxtAttr.Font.Style = [fsBold]
CellAttr.DrawBottomLine = True
CellAttr.DrawBottomLine = False
SelCellAttr.Font.Color = clWindowText
SelCellAttr.TitleAttr.Color = clHighlight
SelCellAttr.TitleAttr.DayTxtAttr.Font.Color = clHighlightText
@ -481,16 +492,16 @@ object MainForm: TMainForm
DWTitleAttr.TxtAttr.Font.Style = [fsBold]
DWTitleAttr.TxtAttr.AlignH = taCenter
ExtraDayCellAttr.Font.Color = clWindowText
ExtraDayCellAttr.TitleAttr.Color = clWindow
ExtraDayCellAttr.FrameAttr.Color = clGray
ExtraDayCellAttr.TitleAttr.FrameAttr.Color = clSilver
ExtraDayCellAttr.TitleAttr.DayTxtAttr.Font.Color = clSilver
ExtraDayCellAttr.TitleAttr.DayTxtAttr.Font.Style = [fsBold]
ExtraDayCellAttr.DrawBottomLine = True
ExtraDayCellAttr.DrawBottomLine = False
OffDayCellAttr.Font.Color = clWindowText
OffDayCellAttr.TitleAttr.Color = clWhite
OffDayCellAttr.FrameAttr.Color = clGray
OffDayCellAttr.TitleAttr.DayTxtAttr.Font.Color = clRed
OffDayCellAttr.TitleAttr.DayTxtAttr.Font.Style = [fsBold]
OffDayCellAttr.DrawBottomLine = True
OffDayCellAttr.DrawBottomLine = False
StartOfWeek = dowMonday
FirstDayOfMonthFormat = 'mmm d'
DayFormat = 'd'
@ -714,6 +725,7 @@ object MainForm: TMainForm
BorderSpacing.Left = 24
DropDownCount = 12
ItemHeight = 15
ItemIndex = 1
Items.Strings = (
'60 mins'
'30 mins'
@ -733,6 +745,7 @@ object MainForm: TMainForm
ShowHint = True
Style = csDropDownList
TabOrder = 8
Text = '30 mins'
end
object GotoDatePicker: TDateTimePicker
AnchorSideLeft.Control = PrevDateButton
@ -779,6 +792,7 @@ object MainForm: TMainForm
Width = 163
BorderSpacing.Top = 8
ItemHeight = 15
ItemIndex = 0
Items.Strings = (
'Single'
'Group'
@ -788,6 +802,7 @@ object MainForm: TMainForm
ShowHint = True
Style = csDropDownList
TabOrder = 9
Text = 'Single'
end
object DaysCombo: TComboBox
AnchorSideLeft.Control = TimeIncCombo

View File

@ -887,9 +887,16 @@ end;
function TJvTFGVTextControl.ScrollUpBtnRect(aCellRect: TRect): TRect;
var
BtnLeft: Integer;
// h: Integer;
begin
if TopLine > 0 then
begin
(*
h := RectHeight(Viewer.GlanceControl.TitleRect);
BtnLeft := aCellRect.Right - 10 - FScrollUpBtnBMP.Width;
Result := Rect(BtnLeft, aCellRect.Top - h, aCellRect.Right, aCellRect.Top);
*)
Result := Rect(0, 0, FScrollUpBtnBMP.Width, FScrollUpBtnBMP.Height);
BtnLeft := aCellRect.Right - 10 - RectWidth(Result);
OffsetRect(Result, BtnLeft, aCellRect.Top);