Browse Source

Bug fix: Keyboard cues were shown in toolbar buttons drop down menus even when the menu was dropped down with mouse

(it still has glitches, nor example, when dropping down the main menu with keyboard, subsequent button drop down with mouse still shows the cues)

(cherry picked from commit 618c06c3dd18bde7c3f91cbcb2424add61d5989f)

Source commit: 9617f6e3006dd603d9324c438a036285e86fe7aa
Martin Prikryl 4 years ago
parent
commit
eeee4976ae
1 changed files with 4 additions and 2 deletions
  1. 4 2
      source/packages/tb2k/TB2Toolbar.pas

+ 4 - 2
source/packages/tb2k/TB2Toolbar.pas

@@ -551,6 +551,8 @@ begin
   FChevronMoveItems := True;
   FView := GetViewClass.CreateView(Self, nil, FItem, Self, True, False,
     not(csDesigning in ComponentState));
+  // This might as well go to TTBToolbarView.Create
+  FView.Style := FView.Style + [vsUseHiddenAccels];
   FView.BackgroundColor := clBtnFace;
   FUpdateActions := True;
   FShrinkMode := tbsmChevron;
@@ -1062,11 +1064,11 @@ begin
     FMenuBar := Value;
     if Value then begin
       ControlStyle := ControlStyle + [csMenuEvents];
-      FView.Style := FView.Style + [vsMenuBar, vsUseHiddenAccels];
+      FView.Style := FView.Style + [vsMenuBar];
     end
     else begin
       ControlStyle := ControlStyle - [csMenuEvents];
-      FView.Style := FView.Style - [vsMenuBar, vsUseHiddenAccels];
+      FView.Style := FView.Style - [vsMenuBar];
     end;
     if not(csLoading in ComponentState) then begin
       FullSize := Value;