Make tab keybinds work on room pane views
This commit is contained in:
		| @@ -3,6 +3,7 @@ import QtQuick.Controls 2.12 | |||||||
|  |  | ||||||
| SwipeView { | SwipeView { | ||||||
|     Component.onCompleted: if (! changed) { |     Component.onCompleted: if (! changed) { | ||||||
|  |         if (becomeKeyboardTabsTarget) shortcuts.tabsTarget = this | ||||||
|         setCurrentIndex(window.getState(this, "currentIndex", defaultIndex)) |         setCurrentIndex(window.getState(this, "currentIndex", defaultIndex)) | ||||||
|         saveEnabled = true |         saveEnabled = true | ||||||
|     } |     } | ||||||
| @@ -17,6 +18,7 @@ SwipeView { | |||||||
|     // Prevent onCurrentIndexChanged from running before Component.onCompleted |     // Prevent onCurrentIndexChanged from running before Component.onCompleted | ||||||
|     property bool saveEnabled: false |     property bool saveEnabled: false | ||||||
|  |  | ||||||
|  |     property bool becomeKeyboardTabsTarget: true | ||||||
|     property int defaultIndex: 0 |     property int defaultIndex: 0 | ||||||
|     property bool changed: currentIndex !== defaultIndex |     property bool changed: currentIndex !== defaultIndex | ||||||
|  |  | ||||||
|   | |||||||
| @@ -9,8 +9,8 @@ Item { | |||||||
|     // Flickable or ListView that should be affected by scroll shortcuts |     // Flickable or ListView that should be affected by scroll shortcuts | ||||||
|     property Item flickTarget |     property Item flickTarget | ||||||
|  |  | ||||||
|     // TabBar that should be affected by tab navigation shortcuts |     // A QQC Container that should be affected by tab navigation shortcuts | ||||||
|     property TabBar tabsTarget |     property Container tabsTarget | ||||||
|  |  | ||||||
|     // DebugConsole that should be affected by console shortcuts |     // DebugConsole that should be affected by console shortcuts | ||||||
|     property DebugConsole debugConsole |     property DebugConsole debugConsole | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	