summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2014-03-29 16:04:03 +0000
committerGraeme Geldenhuys <graemeg@gmail.com>2014-03-29 16:04:03 +0000
commit2e26a7101afdb9bce8a29a83c2c6d8cf15b7f4ec (patch)
treefc3ebd727c12a21e07883f7a1576af4c45c28b41
parent177302bd3a4c83e01452883694aa52fa4cea94f3 (diff)
downloadfpGUI-2e26a7101afdb9bce8a29a83c2c6d8cf15b7f4ec.tar.xz
style: new button state btfEnabled
-rw-r--r--src/corelib/fpg_main.pas2
-rw-r--r--src/gui/fpg_button.pas3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas
index 5b22f666..0fada05a 100644
--- a/src/corelib/fpg_main.pas
+++ b/src/corelib/fpg_main.pas
@@ -47,7 +47,7 @@ type
TAnchors = set of TAnchor;
TfpgButtonFlags = set of (btfIsEmbedded, btfIsDefault, btfIsPressed,
- btfIsSelected, btfHasFocus, btfHasParentColor, btfFlat, btfHover);
+ btfIsSelected, btfHasFocus, btfHasParentColor, btfFlat, btfHover, btfDisabled);
TfpgMenuItemFlags = set of (mifSelected, mifHasFocus, mifSeparator,
mifEnabled, mifChecked, mifSubMenu);
diff --git a/src/gui/fpg_button.pas b/src/gui/fpg_button.pas
index b3bb60c6..0cbb1397 100644
--- a/src/gui/fpg_button.pas
+++ b/src/gui/fpg_button.pas
@@ -546,6 +546,9 @@ begin
if FEmbedded then
Include(lBtnFlags, btfIsEmbedded);
+ if not Enabled then
+ Include(lBtnFlags, btfDisabled);
+
// In the UI Designer we want the button more visible
if not (csDesigning in ComponentState) then
begin