소스 검색

Hide cursor when entering GraphView and TabRowView

TabRowView is a private sub view of `TabView`: the actual tabs themselves.
tznind 2 년 전
부모
커밋
5594aff326
2개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      Terminal.Gui/Views/GraphView.cs
  2. 6 0
      Terminal.Gui/Views/TabView.cs

+ 7 - 1
Terminal.Gui/Views/GraphView.cs

@@ -240,7 +240,13 @@ namespace Terminal.Gui {
 				);
 		}
 
-
+		/// <inheritdoc/>
+		/// <remarks>Also ensures that cursor is invisible after entering the <see cref="GraphView"/>.</remarks>
+		public override bool OnEnter (View view)
+		{
+			Driver.SetCursorVisibility (CursorVisibility.Invisible);
+			return base.OnEnter (view);
+		}
 
 		/// <inheritdoc/>
 		public override bool ProcessKey (KeyEvent keyEvent)

+ 6 - 0
Terminal.Gui/Views/TabView.cs

@@ -493,6 +493,12 @@ namespace Terminal.Gui {
 
 			}
 
+			public override bool OnEnter (View view)
+			{
+				Driver.SetCursorVisibility (CursorVisibility.Invisible);
+				return base.OnEnter (view);
+			}
+
 			public override void Redraw (Rect bounds)
 			{
 				base.Redraw (bounds);