diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-07-25 12:15:10 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-07-25 12:15:10 +0100 |
commit | 34b3f0108f8aa053c1d011f8cbd56d19c86ea70d (patch) | |
tree | c7a1eecd5d78bdac8a86a5e117ef81996c52c485 /src/gui | |
parent | da2e177dc983e9c5c35ea940eda0bc68507bd2e5 (diff) | |
download | fpGUI-34b3f0108f8aa053c1d011f8cbd56d19c86ea70d.tar.xz |
tabs: Tab height is now correctly drawn - no hard-coded 21px height any more
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fpg_tab.pas | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/fpg_tab.pas b/src/gui/fpg_tab.pas index 6db30580..3cd5d6bf 100644 --- a/src/gui/fpg_tab.pas +++ b/src/gui/fpg_tab.pas @@ -930,15 +930,15 @@ begin begin toffset := 4; h.Visible := True; - h.SetPosition(FMargin+2, FMargin+2 , Width - (FMargin*2) - 4, Height - r2.Height - (FMargin+2)*2); + h.SetPosition(FMargin+2, FMargin+2 , Width - (FMargin*2) - 4, Height - TabH - (FMargin+2)*2); end; // paint tab button r2.Width := ButtonWidth(h.Text); r3 := DrawTab(r2, h = ActivePage); // paint text on non-active tabs if h <> ActivePage then - Canvas.DrawText(lp + (ButtonWidth(h.Text) div 2) - FFont.TextWidth(GetTabText(h.Text)) div 2, - Height-r2.Height-toffset, GetTabText(h.Text), lTxtFlags); + Canvas.DrawText(lp + (ButtonWidth(h.Text) div 2) - FFont.TextWidth(GetTabText(h.Text)) div 2, + Height-TabH+toffset, GetTabText(h.Text), lTxtFlags); r2.Left := r2.Left + r2.Width; lp := lp + ButtonWidth(h.Text); @@ -951,7 +951,7 @@ begin r2.Left := 0; r2.Top := 0; r2.Width := Width; - r2.Height := Height - r2.Height; + r2.Height := Height - TabH; Canvas.DrawButtonFace(r2, []); // Draw text of ActivePage, because we didn't before. DrawTab(r3, false, 2); |