mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 00:19:32 +02:00
cocoa: fixing compiler warnings
git-svn-id: trunk@58732 -
This commit is contained in:
parent
f2649a561f
commit
16334b0b94
@ -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
|
||||
|
@ -384,6 +384,7 @@ begin
|
||||
end;
|
||||
ticks[count]:=atick;
|
||||
inc(count);
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
{ TCocoaGroupBox }
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user