cocoa: fixing compiler warnings

git-svn-id: trunk@58732 -
This commit is contained in:
dmitry 2018-08-16 23:58:49 +00:00
parent f2649a561f
commit 16334b0b94
6 changed files with 17 additions and 11 deletions

View File

@ -705,7 +705,10 @@ begin
ADesc.BluePrec := Prec;
// gray or mono
if ADesc.Format = ricfGray then Exit;
if ADesc.Format = ricfGray then begin
Result := true;
Exit;
end;
// alpha
if ABitmap.BitmapType in [cbtARGB, cbtRGBA] then

View File

@ -384,6 +384,7 @@ begin
end;
ticks[count]:=atick;
inc(count);
Result := true;
end;
{ TCocoaGroupBox }

View File

@ -393,6 +393,8 @@ begin
TREIS_DISABLED: lColor := ColorToNSColor(ColorToRGB(clWindow));
TREIS_SELECTEDNOTFOCUS: lColor := ColorToNSColor(ColorToRGB(clBtnFace));
TREIS_HOTSELECTED: lColor := ColorToNSColor(ColorToRGB(clHighlight));
else
lColor := NSColor.blackColor;
end;
lBrush := TCocoaBrush.Create(lColor, False);
DC.Rectangle(R.Left, R.Top, R.Right, R.Bottom, True, lBrush);

View File

@ -1261,7 +1261,8 @@ begin
end
else
Result := nil;
end;
end else
Result := nil;
end;
function TCocoaWidgetSet.IsWindow(handle: HWND): boolean;
@ -1919,6 +1920,7 @@ begin
Result := 0;
else
DebugLn('TCocoaWidgetSet.GetDeviceCaps TODO Index: ' + DbgS(Index));
Result := 0;
end;
end;
@ -2077,7 +2079,8 @@ begin
NSApp.sendEvent(Event);
Result := NSNumber(Info.objectForKey(NSMessageResult)).integerValue;
Info.Release;
end;
end else
Result := 0;
end;
function TCocoaWidgetSet.SetActiveWindow(Handle: HWND): HWND;

View File

@ -150,8 +150,8 @@ var
lFormat: TCocoaClipboardData;
begin
lFormat := GetClipboardDataForFormat(FormatID);
if lFormat = nil then Exit;
Result := lFormat.MimeType;
if lFormat = nil then Result := ''
else Result := lFormat.MimeType;
end;
function TCocoaWSClipboard.GetClipboardDataForFormat(AFormat: TClipboardFormat

View File

@ -1457,11 +1457,7 @@ begin
lSlider.intval := ATrackBar.Position;
// Ticks
if ATrackBar.TickStyle = tsNone then
begin
lTickCount := 0;
end
else if ATrackBar.TickStyle = tsAuto then
if ATrackBar.TickStyle = tsAuto then
begin
// this should only apply to Auto
// and for Manual it should drawn manually
@ -1487,7 +1483,8 @@ begin
end else if ATrackBar.TickStyle = tsManual then
begin
lTickCount := 2;
end;
end else
lTickCount := 0;
lSlider.lclSetManTickDraw(ATrackBar.TickStyle = tsManual);