Qt: Better fix for invisible scrollbar under MacOsX.

git-svn-id: trunk@15033 -
This commit is contained in:
zeljko 2008-05-03 09:23:14 +00:00
parent 749bbc330b
commit c6d254fe3e

View File

@ -1779,7 +1779,6 @@ begin
WriteLn('sending char ', UTF8Char); WriteLn('sending char ', UTF8Char);
{$endif} {$endif}
if LCLObject.IntfUTF8KeyPress(UTF8Char, 1, IsSysKey) then if LCLObject.IntfUTF8KeyPress(UTF8Char, 1, IsSysKey) then
// if LCLObject.IntfUTF8KeyPress(TUTF8Char(UTF8Encode(Text)), 1, IsSysKey) then
begin begin
// the LCL has handled the key // the LCL has handled the key
{$ifdef VerboseQt} {$ifdef VerboseQt}
@ -4363,6 +4362,15 @@ function TQtScrollBar.EventFilter(Sender: QObjectH; Event: QEventH): Boolean;
begin begin
beginEventProcessing; beginEventProcessing;
case QEvent_type(Event) of case QEvent_type(Event) of
{$IFDEF DARWIN}
{if any of those events returs TRUE our scrollbar becomes invisible.}
QEventMouseButtonPress,
QEventMouseButtonRelease,
QEventMouseButtonDblClick,
QEventMouseMove,
QEventWheel,
QEventPaint,
{$ENDIF}
QEventKeyPress, QEventKeyPress,
QEventKeyRelease: Result := False; QEventKeyRelease: Result := False;
else else
@ -4370,9 +4378,6 @@ begin
Result := inherited EventFilter(Sender, Event); Result := inherited EventFilter(Sender, Event);
end; end;
endEventProcessing; endEventProcessing;
{$IFDEF DARWIN}
Result := False;
{$ENDIF}
end; end;
procedure TQtScrollBar.AttachEvents; procedure TQtScrollBar.AttachEvents;