diff options
Diffstat (limited to 'src/gui/fpg_tab.pas')
-rw-r--r-- | src/gui/fpg_tab.pas | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/fpg_tab.pas b/src/gui/fpg_tab.pas index 29addb12..5ef516bb 100644 --- a/src/gui/fpg_tab.pas +++ b/src/gui/fpg_tab.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Toolkit - Copyright (C) 2006 - 2012 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -1291,10 +1291,7 @@ var begin Result := nil; h := TfpgTabSheet(FPages.First); - lp := FMargin; - if MaxButtonWidthSum > (Width-(FMargin*2)) then - h := FFirstTabButton; case TabPosition of tpTop: @@ -1324,6 +1321,8 @@ begin if TabPosition in [tpTop, tpBottom] then begin + if MaxButtonWidthSum > (Width-(FMargin*2)) then + h := FFirstTabButton; if (y > p1) and (y < p2) then begin while h <> nil do @@ -1346,11 +1345,13 @@ begin if TabPosition in [tpLeft, tpRight] then begin + bh := ButtonHeight; // initialize button height + if MaxButtonHeightSum > (Height-(FMargin*2)) then + h := FFirstTabButton; if (x > p1) and (x < p2) then begin while h <> nil do begin - bh := ButtonHeight; // initialize button height if (y > lp) and (y < lp + bh) then begin if h <> ActivePage then |