فهرست منبع

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)

Source commit: 729585af7358b5a4defc9ba298ab859863ad3a38
Martin Prikryl 4 سال پیش
والد
کامیت
618c06c3dd
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      source/packages/tb2k/TB2Toolbar.pas

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

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