summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-02-01 13:45:39 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-02-01 13:45:39 +0000
commitdc4c89ecd2e6c733b73f3d185d9ab421663e2bb0 (patch)
tree5d5c55b3f71075245d6ca11e77523ec0d94d715c /src/gui
parent9df85af6e12f28ca97df403f981728cf60fc3249 (diff)
downloadfpGUI-dc4c89ecd2e6c733b73f3d185d9ab421663e2bb0.tar.xz
* Menu items that are disabled now appear as selected when the mouse moves over them, but they are still not clickable. This is normal GUI behaviour in other toolkits as well.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui_menu.pas10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/gui_menu.pas b/src/gui/gui_menu.pas
index 3284bcef..adc642c7 100644
--- a/src/gui/gui_menu.pas
+++ b/src/gui/gui_menu.pas
@@ -82,8 +82,6 @@ type
// Actual Menu Items are stored in TComponent's Components property
// Visible only items are stored in FItems just before a paint
- { TfpgPopupMenu }
-
TfpgPopupMenu = class(TfpgPopupWindow)
private
FBackgroundColor: TfpgColor;
@@ -755,9 +753,6 @@ begin
newf := CalcMouseRow(y);
if newf < 1 then
- Exit;
-
- if not VisibleItem(newf).Selectable then
Exit; //==>
if newf = FFocusItem then
@@ -1011,7 +1006,10 @@ begin
if MenuFocused then
begin
Canvas.SetColor(clSelection);
- Canvas.SetTextColor(clSelectionText);
+ if mi.Selectable then
+ Canvas.SetTextColor(clSelectionText)
+ else
+ Canvas.SetTextColor(clMenuDisabled);
end
else
begin