diff --git a/lcl/include/screen.inc b/lcl/include/screen.inc index b6bbd0302a..5e50a78d9d 100644 --- a/lcl/include/screen.inc +++ b/lcl/include/screen.inc @@ -320,10 +320,8 @@ begin if AIndex < crLow then Exit; // not yet loaded - if AIndex = crNone then - Result := Result; Result := WidgetSet.CreateStandardCursor(AIndex); - if Result = 0 then + if (Result = 0) and (AIndex <> crDefault) then Result := LoadCursorFromLazarusResource('cur_' + IntToStr(-AIndex)); if Result = 0 then Exit; diff --git a/lcl/interfaces/qt/qtlclintf.inc b/lcl/interfaces/qt/qtlclintf.inc index 99c50beb21..3f573f7ab7 100644 --- a/lcl/interfaces/qt/qtlclintf.inc +++ b/lcl/interfaces/qt/qtlclintf.inc @@ -45,7 +45,6 @@ begin // TODO: map is better case TCursor(ACursor) of - crDefault : CursorShape := QtArrowCursor; crNone : CursorShape := QtBlankCursor; crArrow : CursorShape := QtArrowCursor; crCross : CursorShape := QtCrossCursor; diff --git a/lcl/interfaces/qt/qtwidgets.pas b/lcl/interfaces/qt/qtwidgets.pas index 1f2d3423ab..b8cf52e988 100644 --- a/lcl/interfaces/qt/qtwidgets.pas +++ b/lcl/interfaces/qt/qtwidgets.pas @@ -1812,7 +1812,9 @@ end; procedure TQtWidget.SetCursor(const ACursor: QCursorH); begin if ACursor <> nil then - QWidget_setCursor(Widget, ACursor); + QWidget_setCursor(Widget, ACursor) + else + QWidget_unsetCursor(Widget); end; {------------------------------------------------------------------------------ diff --git a/lcl/interfaces/qt/qtwinapi.inc b/lcl/interfaces/qt/qtwinapi.inc index 234ab11c0e..190af18812 100644 --- a/lcl/interfaces/qt/qtwinapi.inc +++ b/lcl/interfaces/qt/qtwinapi.inc @@ -3031,29 +3031,7 @@ begin // Here we should convert top level lcl window coordinaties to qt coord // Due to borders and etc -{ Style := Windows.GetWindowLong(Handle, GWL_STYLE); - ExStyle := Windows.GetWindowLong(Handle, GWL_EXSTYLE); - if (Style and WS_THICKFRAME) <> 0 then - begin - // thick, sizing border - // add twice, top+bottom border - Dec(Width, 2*Windows.GetSystemMetrics(SM_CXSIZEFRAME)); - Dec(Height, 2*Windows.GetSystemMetrics(SM_CYSIZEFRAME)); - end else - if (Style and WS_BORDER) <> 0 then - begin - // thin, non-sizing border - Dec(Width, 2*Windows.GetSystemMetrics(SM_CXFIXEDFRAME)); - Dec(Height, 2*Windows.GetSystemMetrics(SM_CYFIXEDFRAME)); - end; - if (Style and WS_CAPTION) <> 0 then - if (ExStyle and WS_EX_TOOLWINDOW) <> 0 then - Dec(Height, Windows.GetSystemMetrics(SM_CYSMCAPTION)) - else - Dec(Height, Windows.GetSystemMetrics(SM_CYCAPTION)); - - if (WindowInfo^.WinControl is TCustomFloatSpinEdit) then - AdjustForBuddySize;} + // ? end; function TQtWidgetSet.HideCaret(hWnd: HWND): Boolean; @@ -3211,9 +3189,6 @@ begin TitleStr := UTF8Decode(lpCaption); OkStr := UTF8Decode('Ok'); Result := QMessageBox_information(TQtWidget(hWnd).Widget, @Str, @TitleStr, @OkStr); -// {$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION} -// WriteLn('***** [WinAPI TQtWidgetSet.MessageBox] missing implementation '); -// {$endif} end; {------------------------------------------------------------------------------ diff --git a/lcl/interfaces/qt/qtwscontrols.pp b/lcl/interfaces/qt/qtwscontrols.pp index c905f90083..4e175bdb55 100644 --- a/lcl/interfaces/qt/qtwscontrols.pp +++ b/lcl/interfaces/qt/qtwscontrols.pp @@ -88,8 +88,6 @@ type // class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override; // class procedure SetText(const AWinControl: TWinControl; const AText: string); override; - - class procedure SetChildZPosition(const AWinControl, AChild: TWinControl; const AOldPos, ANewPos: Integer; const AChildren: TFPList); override;