Qt: fixed issue when IDE designer with main menu clips component icons at bottom, also fixed triggering of mainmenu in design form. fixes #16674.

git-svn-id: trunk@27240 -
This commit is contained in:
zeljko 2010-08-31 14:38:20 +00:00
parent 81e179d32a
commit 1a2d37383b

View File

@ -12634,10 +12634,15 @@ begin
end;
procedure TQtDesignWidget.ResizeDesigner;
var
R: TRect;
begin
if FDesignControl = nil then
Exit;
with getClientBounds do
// FDesignControl must be same as form area,
// since we use QWidget, not QMainWindow in design time.
QWidget_contentsRect(Widget, @R);
with R do
begin
QWidget_move(FDesignControl, Left, Top);
QWidget_resize(FDesignControl, Right - Left, Bottom - Top);
@ -12709,12 +12714,13 @@ begin
end;
end else
begin
p := QMouseEvent_pos(QMouseEventH(Event))^;
p := QMouseEvent_globalPos(QMouseEventH(Event))^;
WidgetToNotify := QApplication_widgetAt(@p);
if (WidgetToNotify <> nil) then
begin
if TQtMainWindow(Self).MenuBar.Widget <> nil then
begin
p := QMouseEvent_Pos(QMouseEventH(Event))^;
QWidget_geometry(TQtMainWindow(Self).MenuBar.Widget, @R);
pt := Point(P.X, P.Y);
if LCLIntf.PtInRect(R, pt) then