diff options
author | Jean-Marc Levecque <jean-marc.levecque@jmlesite.fr> | 2010-08-30 15:34:35 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-08-30 15:34:35 +0200 |
commit | d887cd05952afc036e8f783d89cf43abd9b41a8e (patch) | |
tree | eaebeed16c771e53ec7e6a845dd10278d7ec0178 /src/gui | |
parent | 2ffdd747a6f01ba994e8484523695bf7346bca63 (diff) | |
download | fpGUI-d887cd05952afc036e8f783d89cf43abd9b41a8e.tar.xz |
disable scrollbar buttons when parent is disabled too
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fpg_scrollbar.pas | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/fpg_scrollbar.pas b/src/gui/fpg_scrollbar.pas index ed12d0d2..5f2ffd6c 100644 --- a/src/gui/fpg_scrollbar.pas +++ b/src/gui/fpg_scrollbar.pas @@ -138,13 +138,13 @@ begin Canvas.BeginDraw; // Do not remove - Scrollbars do painting outside HandlePaint as well! if Orientation = orVertical then begin - DrawButton(0, 0, Width, Width, 'sys.sb.up', (FScrollbarDownPart = sbpUpBack) and (FPosition <> FMin), FPosition <> FMin); - DrawButton(0, Height-Width, Width, Width, 'sys.sb.down', (FScrollbarDownPart = sbpDownForward) and (FPosition <> FMax), FPosition <> FMax); + DrawButton(0, 0, Width, Width, 'sys.sb.up', (FScrollbarDownPart = sbpUpBack) and (FPosition <> FMin), (FPosition <> FMin) and (Parent.Enabled)); + DrawButton(0, Height-Width, Width, Width, 'sys.sb.down', (FScrollbarDownPart = sbpDownForward) and (FPosition <> FMax), (FPosition <> FMax) and (Parent.Enabled)); end else begin - DrawButton(0, 0, Height, Height, 'sys.sb.left', (FScrollbarDownPart = sbpUpBack) and (FPosition <> FMin), FPosition <> FMin); - DrawButton(Width-Height, 0, Height, Height, 'sys.sb.right', (FScrollbarDownPart = sbpDownForward) and (FPosition <> FMax), FPosition <> FMax); + DrawButton(0, 0, Height, Height, 'sys.sb.left', (FScrollbarDownPart = sbpUpBack) and (FPosition <> FMin), (FPosition <> FMin) and (Parent.Enabled)); + DrawButton(Width-Height, 0, Height, Height, 'sys.sb.right', (FScrollbarDownPart = sbpDownForward) and (FPosition <> FMax), (FPosition <> FMax) and (Parent.Enabled)); end; DrawSlider(FRecalc); |