From 7aec902b6287c4e506bf8cd8a8ff47a09132e840 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mihnea=20R=C4=83dulescu?= <>
Date: Thu, 18 Jul 2024 00:13:55 +0300
Subject: [PATCH] Improved control focus when switching tabs
---
Directory.Build.props | 2 +-
ImageFanReloaded/Controls/MainWindow.axaml.cs | 5 ++---
ImageFanReloaded/Settings/GlobalParameters.cs | 1 +
README.md | 1 +
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 660064b..ddca27f 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -5,7 +5,7 @@
disable
enable
Copyright © Mihnea Rădulescu 2017 - 2024
- 1.2024.07.17
+ 1.2024.07.18
$(AssemblyVersion)
embedded
diff --git a/ImageFanReloaded/Controls/MainWindow.axaml.cs b/ImageFanReloaded/Controls/MainWindow.axaml.cs
index dff01df..c630b22 100644
--- a/ImageFanReloaded/Controls/MainWindow.axaml.cs
+++ b/ImageFanReloaded/Controls/MainWindow.axaml.cs
@@ -126,8 +126,6 @@ private void AddContentTabItem()
var shouldAllowTabClose = ShouldAllowTabClose();
TabCountChanged?.Invoke(this, new TabCountChangedEventArgs(shouldAllowTabClose));
-
- SelectLastTabItem();
}
private void CloseContentTabItem()
@@ -164,7 +162,8 @@ private void CloseContentTabItem()
{
FontSize = _windowFontSize,
Header = contentTabItem.ContentTabItemHeader,
- Content = contentTabItem
+ Content = contentTabItem,
+ IsSelected = true
};
tabItem.KeyDown += (_, e) => e.Handled = true;
diff --git a/ImageFanReloaded/Settings/GlobalParameters.cs b/ImageFanReloaded/Settings/GlobalParameters.cs
index f480faa..c3c0ba6 100644
--- a/ImageFanReloaded/Settings/GlobalParameters.cs
+++ b/ImageFanReloaded/Settings/GlobalParameters.cs
@@ -75,6 +75,7 @@ public GlobalParameters(
• key Tab for cycling through controls in the active tab
• key R for toggling recursive folder access, and key combo Shift+R for toggling persistent recursive folder access
• keys Up, Down, Left and Right for back and forward navigation through the folders tree, thumbnails and opened images
+• keys PageUp and PageDown for scrolling through thumbnails
• key Enter for entering image view and zoomed image view modes
• key combos Ctrl+Up, Ctrl+Down, Ctrl+Left and Ctrl+Right for dragging zoomed images
• key I for toggling image info in image view and zoomed image view modes
diff --git a/README.md b/README.md
index fec4999..9777b45 100644
--- a/README.md
+++ b/README.md
@@ -22,6 +22,7 @@ User interface:
* key Tab for cycling through controls in the active tab
* key R for toggling recursive folder access, and key combo Shift+R for toggling persistent recursive folder access
* keys Up, Down, Left and Right for back and forward navigation through the folders tree, thumbnails and opened images
+* keys PageUp and PageDown for scrolling through thumbnails
* key Enter for entering image view and zoomed image view modes
* key combos Ctrl+Up, Ctrl+Down, Ctrl+Left and Ctrl+Right for dragging zoomed images
* key I for toggling image info in image view and zoomed image view modes