mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 15:39:30 +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;
|
ADesc.BluePrec := Prec;
|
||||||
|
|
||||||
// gray or mono
|
// gray or mono
|
||||||
if ADesc.Format = ricfGray then Exit;
|
if ADesc.Format = ricfGray then begin
|
||||||
|
Result := true;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
// alpha
|
// alpha
|
||||||
if ABitmap.BitmapType in [cbtARGB, cbtRGBA] then
|
if ABitmap.BitmapType in [cbtARGB, cbtRGBA] then
|
||||||
|
@ -384,6 +384,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
ticks[count]:=atick;
|
ticks[count]:=atick;
|
||||||
inc(count);
|
inc(count);
|
||||||
|
Result := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCocoaGroupBox }
|
{ TCocoaGroupBox }
|
||||||
|
@ -393,6 +393,8 @@ begin
|
|||||||
TREIS_DISABLED: lColor := ColorToNSColor(ColorToRGB(clWindow));
|
TREIS_DISABLED: lColor := ColorToNSColor(ColorToRGB(clWindow));
|
||||||
TREIS_SELECTEDNOTFOCUS: lColor := ColorToNSColor(ColorToRGB(clBtnFace));
|
TREIS_SELECTEDNOTFOCUS: lColor := ColorToNSColor(ColorToRGB(clBtnFace));
|
||||||
TREIS_HOTSELECTED: lColor := ColorToNSColor(ColorToRGB(clHighlight));
|
TREIS_HOTSELECTED: lColor := ColorToNSColor(ColorToRGB(clHighlight));
|
||||||
|
else
|
||||||
|
lColor := NSColor.blackColor;
|
||||||
end;
|
end;
|
||||||
lBrush := TCocoaBrush.Create(lColor, False);
|
lBrush := TCocoaBrush.Create(lColor, False);
|
||||||
DC.Rectangle(R.Left, R.Top, R.Right, R.Bottom, True, lBrush);
|
DC.Rectangle(R.Left, R.Top, R.Right, R.Bottom, True, lBrush);
|
||||||
|
@ -1261,7 +1261,8 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
Result := nil;
|
Result := nil;
|
||||||
end;
|
end else
|
||||||
|
Result := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCocoaWidgetSet.IsWindow(handle: HWND): boolean;
|
function TCocoaWidgetSet.IsWindow(handle: HWND): boolean;
|
||||||
@ -1919,6 +1920,7 @@ begin
|
|||||||
Result := 0;
|
Result := 0;
|
||||||
else
|
else
|
||||||
DebugLn('TCocoaWidgetSet.GetDeviceCaps TODO Index: ' + DbgS(Index));
|
DebugLn('TCocoaWidgetSet.GetDeviceCaps TODO Index: ' + DbgS(Index));
|
||||||
|
Result := 0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2077,7 +2079,8 @@ begin
|
|||||||
NSApp.sendEvent(Event);
|
NSApp.sendEvent(Event);
|
||||||
Result := NSNumber(Info.objectForKey(NSMessageResult)).integerValue;
|
Result := NSNumber(Info.objectForKey(NSMessageResult)).integerValue;
|
||||||
Info.Release;
|
Info.Release;
|
||||||
end;
|
end else
|
||||||
|
Result := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCocoaWidgetSet.SetActiveWindow(Handle: HWND): HWND;
|
function TCocoaWidgetSet.SetActiveWindow(Handle: HWND): HWND;
|
||||||
|
@ -150,8 +150,8 @@ var
|
|||||||
lFormat: TCocoaClipboardData;
|
lFormat: TCocoaClipboardData;
|
||||||
begin
|
begin
|
||||||
lFormat := GetClipboardDataForFormat(FormatID);
|
lFormat := GetClipboardDataForFormat(FormatID);
|
||||||
if lFormat = nil then Exit;
|
if lFormat = nil then Result := ''
|
||||||
Result := lFormat.MimeType;
|
else Result := lFormat.MimeType;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCocoaWSClipboard.GetClipboardDataForFormat(AFormat: TClipboardFormat
|
function TCocoaWSClipboard.GetClipboardDataForFormat(AFormat: TClipboardFormat
|
||||||
|
@ -1457,11 +1457,7 @@ begin
|
|||||||
lSlider.intval := ATrackBar.Position;
|
lSlider.intval := ATrackBar.Position;
|
||||||
|
|
||||||
// Ticks
|
// Ticks
|
||||||
if ATrackBar.TickStyle = tsNone then
|
if ATrackBar.TickStyle = tsAuto then
|
||||||
begin
|
|
||||||
lTickCount := 0;
|
|
||||||
end
|
|
||||||
else if ATrackBar.TickStyle = tsAuto then
|
|
||||||
begin
|
begin
|
||||||
// this should only apply to Auto
|
// this should only apply to Auto
|
||||||
// and for Manual it should drawn manually
|
// and for Manual it should drawn manually
|
||||||
@ -1487,7 +1483,8 @@ begin
|
|||||||
end else if ATrackBar.TickStyle = tsManual then
|
end else if ATrackBar.TickStyle = tsManual then
|
||||||
begin
|
begin
|
||||||
lTickCount := 2;
|
lTickCount := 2;
|
||||||
end;
|
end else
|
||||||
|
lTickCount := 0;
|
||||||
|
|
||||||
lSlider.lclSetManTickDraw(ATrackBar.TickStyle = tsManual);
|
lSlider.lclSetManTickDraw(ATrackBar.TickStyle = tsManual);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user