Merged revision(s) 52148-52151 #d937152b73-#d937152b73, 52155 #441c5e04fb from trunk:

Qt: fixed geometry resize of mdiarea handle widget. issue #29978
........
Qt: small optimisation when calculating mdiform area geometry.
........
Qt: unify TScrollBar Max value and position with winapi. issue #20127
........
Qt: do not pass maximum value by triggering scrollbar actions. issue #20127
........
Qt: unify scrollbar behaviour with win32.Let position pass max - lcl will decide about new pos. issue #20127
........

git-svn-id: branches/fixes_1_6@52173 -
This commit is contained in:
maxim 2016-04-11 22:20:52 +00:00
parent 99eddfea46
commit 23e373991d
2 changed files with 13 additions and 8 deletions

View File

@ -7403,13 +7403,13 @@ begin
{first must get contents rect - all except main menu}
QWidget_contentsRect(FCentralWidget, @R);
{TODO: find better way to find out which controls are top,left,right & bottom aligned ...}
for i := 0 to LCLObject.ComponentCount - 1 do
for i := 0 to LCLObject.ControlCount - 1 do
begin
if (LCLObject.Components[i] is TWinControl) and
(TWinControl(LCLObject.Components[i]).Align in [alTop, alLeft, alRight, alBottom]) then
if (LCLObject.Controls[i] is TWinControl) and
(TWinControl(LCLObject.Controls[i]).Align in [alTop, alLeft, alRight, alBottom]) then
begin
R2 := TWinControl(LCLObject.Components[i]).BoundsRect;
case TWinControl(LCLObject.Components[i]).Align of
R2 := TWinControl(LCLObject.Controls[i]).BoundsRect;
case TWinControl(LCLObject.Controls[i]).Align of
alLeft: R.Left := R.Left + (R2.Right - R2.Left);
alTop: R.Top := R.Top + (R2.Bottom - R2.Top);
alRight: R.Right := R.Right - (R2.Right - R2.Left);

View File

@ -366,15 +366,20 @@ begin
QtScrollBar.BeginUpdate;
try
if (QtScrollBar.getMin <> AScrollBar.Min) or
(QtScrollBar.getMax <> AScrollbar.Max) then
QtScrollBar.setRange(AScrollBar.Min, AScrollBar.Max);
(QtScrollBar.getMax <> (AScrollbar.Max - AScrollBar.PageSize)) then
QtScrollBar.setRange(AScrollBar.Min, AScrollBar.Max - AScrollBar.PageSize);
if QtScrollBar.getPageStep <> AScrollBar.PageSize then
begin
QtScrollBar.setPageStep(AScrollBar.PageSize);
QtScrollBar.setSingleStep((AScrollBar.PageSize div 6) + 1);
end;
if QtScrollbar.getValue <> AScrollBar.Position then
QtScrollBar.setValue(AScrollBar.Position);
begin
if AScrollBar.Position > QtScrollBar.getMax then
QtScrollBar.setValue(QtScrollBar.getMax)
else
QtScrollBar.setValue(AScrollBar.Position);
end;
case AScrollBar.Kind of
sbHorizontal: