IDE Carbon: improve selecting TPageControl tabs in design time a bit

git-svn-id: trunk@20902 -
This commit is contained in:
tombo 2009-07-19 14:43:13 +00:00
parent 598acbc578
commit ec65f67050
2 changed files with 8 additions and 4 deletions

View File

@ -314,12 +314,15 @@ begin
end;
// interactive design
if (Widget is TCarbonDesignWindow) and (GetCarbonMouseButton(AEvent) = 1) and
(EventKind = kEventMouseDown) then
if (EventKind = kEventMouseDown)
and ((csDesigning in Widget.LCLObject.ComponentState) or (Widget is TCarbonDesignWindow))
and (GetCarbonMouseButton(AEvent) = 1) then
begin
P := GetMousePoint;
DesignControl := Widget.LCLObject.ControlAtPos(P,
[capfAllowDisabled, capfAllowWinControls, capfRecursive]);
if DesignControl = nil then
DesignControl := Widget.LCLObject;
if DesignControl is TWinControl then
begin
@ -1680,7 +1683,8 @@ procedure TCarbonWindow.CloseModal;
begin
if not Assigned(fWindowRef) then Exit; // not possible to show modal if not Window mode
CarbonWidgetSet.SetMainMenuEnabled(True);
if CarbonWidgetSet.MainMenu <> (LCLObject as TCustomForm).Menu then
CarbonWidgetSet.SetMainMenuEnabled(True);
OSError(
SetWindowModality(fWindowRef, kWindowModalityNone, nil),

View File

@ -378,7 +378,7 @@ begin
OSError(
CreateDisclosureTriangleControl(GetTopParentWindow,
GetCarbonRect(GetPrevArrowBounds(R)),
kControlDisclosureTrianglePointLeft, nil, 0, False, False, FPrevArrow),
kControlDisclosureTrianglePointRight, nil, 0, False, False, FPrevArrow),
Self, SCreateWidget, 'CreatePopupArrowControl');
OSError(HIViewSetVisible(FPrevArrow, False), Self, SCreateWidget, SViewVisible);
OSError(HIViewAddSubview(Widget, FPrevArrow), Self, SCreateWidget,