From: Andreas H. <ah...@us...> - 2005-05-21 23:20:45
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16048/run Modified Files: JvListComb.pas JvPanel.pas Log Message: Fixed Mantis #2981: JvPanel not changing main color when mouse is hoovering over it. Index: JvListComb.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvListComb.pas,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** JvListComb.pas 5 May 2005 20:11:30 -0000 1.46 --- JvListComb.pas 21 May 2005 23:20:36 -0000 1.47 *************** *** 148,156 **** {$IFDEF VCL} ! TJvImageComboBox = class(TJvCustomComboBox, IUnknown, IJvResetItemHeight) {$ENDIF VCL} {$IFDEF VisualCLX} ! TJvImageComboBox = class(TCustomComboBox, IUnknown, IJvResetItemHeight) {$ENDIF VisualCLX} private FItems: TJvImageItems; --- 148,157 ---- {$IFDEF VCL} ! TJvImageComboBoxBase = TJvCustomComboBox; {$ENDIF VCL} {$IFDEF VisualCLX} ! TJvImageComboBoxBase = TCustomComboBox; {$ENDIF VisualCLX} + TJvImageComboBox = class(TJvImageComboBoxBase, IUnknown, IJvResetItemHeight) private FItems: TJvImageItems; Index: JvPanel.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvPanel.pas,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** JvPanel.pas 9 Mar 2005 14:57:28 -0000 1.60 --- JvPanel.pas 21 May 2005 23:20:36 -0000 1.61 *************** *** 141,144 **** --- 141,145 ---- procedure MouseEnter(Control: TControl); override; procedure MouseLeave(Control: TControl); override; + procedure ColorChanged; override; procedure ParentColorChanged; override; procedure TextChanged; override; *************** *** 420,423 **** --- 421,425 ---- FFlatBorderColor := clBtnShadow; FHotColor := clBtnFace; + FOldColor := clNone; FArrangeSettings := TJvArrangeSettings.Create(Self); *************** *** 470,474 **** end; - procedure TJvPanel.WMExitSizeMove(var Msg: TMessage); begin --- 472,475 ---- *************** *** 494,498 **** end; - {$IFDEF VisualCLX} --- 495,498 ---- *************** *** 721,724 **** --- 721,731 ---- end; + procedure TJvPanel.ColorChanged; + begin + if FOldColor <> clNone then + FOldColor := Color; + inherited ColorChanged; + end; + procedure TJvPanel.ParentColorChanged; begin *************** *** 728,731 **** --- 735,740 ---- procedure TJvPanel.MouseEnter(Control: TControl); + var + Col: TColor; begin if csDesigning in ComponentState then *************** *** 733,740 **** if not MouseOver and (Control = nil) then begin ! FOldColor := Color; if not Transparent or IsThemed then begin Color := HotColor; MouseTimer.Attach(Self); end; --- 742,751 ---- if not MouseOver and (Control = nil) then begin ! FOldColor := clNone; ! Col := Color; if not Transparent or IsThemed then begin Color := HotColor; + FOldColor := Col; MouseTimer.Attach(Self); end; *************** *** 744,747 **** --- 755,760 ---- procedure TJvPanel.MouseLeave(Control: TControl); + var + Col: TColor; begin if csDesigning in ComponentState then *************** *** 751,755 **** if not Transparent or IsThemed then begin ! Color := FOldColor; MouseTimer.Detach(Self); end; --- 764,770 ---- if not Transparent or IsThemed then begin ! Col := FOldColor; ! FOldColor := clNone; // Color:= invoked ColorChanged ! Color := Col; MouseTimer.Detach(Self); end; |