mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
fix wonky keyboard behavior on launchers
This commit is contained in:
@@ -223,7 +223,6 @@ DankModal {
|
|||||||
|
|
||||||
signal keyboardNavigationReset()
|
signal keyboardNavigationReset()
|
||||||
signal itemClicked(int index, var modelData)
|
signal itemClicked(int index, var modelData)
|
||||||
signal itemHovered(int index)
|
|
||||||
signal itemRightClicked(int index, var modelData, real mouseX, real mouseY)
|
signal itemRightClicked(int index, var modelData, real mouseX, real mouseY)
|
||||||
|
|
||||||
function ensureVisible(index) {
|
function ensureVisible(index) {
|
||||||
@@ -257,9 +256,6 @@ DankModal {
|
|||||||
onItemClicked: function(index, modelData) {
|
onItemClicked: function(index, modelData) {
|
||||||
appLauncher.launchApp(modelData);
|
appLauncher.launchApp(modelData);
|
||||||
}
|
}
|
||||||
onItemHovered: function(index) {
|
|
||||||
appLauncher.selectedIndex = index;
|
|
||||||
}
|
|
||||||
onItemRightClicked: function(index, modelData, mouseX, mouseY) {
|
onItemRightClicked: function(index, modelData, mouseX, mouseY) {
|
||||||
contextMenu.show(mouseX, mouseY, modelData);
|
contextMenu.show(mouseX, mouseY, modelData);
|
||||||
}
|
}
|
||||||
@@ -361,8 +357,6 @@ DankModal {
|
|||||||
onEntered: {
|
onEntered: {
|
||||||
if (resultsList.hoverUpdatesSelection && !resultsList.keyboardNavigationActive)
|
if (resultsList.hoverUpdatesSelection && !resultsList.keyboardNavigationActive)
|
||||||
resultsList.currentIndex = index;
|
resultsList.currentIndex = index;
|
||||||
|
|
||||||
resultsList.itemHovered(index);
|
|
||||||
}
|
}
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
resultsList.keyboardNavigationReset();
|
resultsList.keyboardNavigationReset();
|
||||||
@@ -402,7 +396,6 @@ DankModal {
|
|||||||
|
|
||||||
signal keyboardNavigationReset()
|
signal keyboardNavigationReset()
|
||||||
signal itemClicked(int index, var modelData)
|
signal itemClicked(int index, var modelData)
|
||||||
signal itemHovered(int index)
|
|
||||||
signal itemRightClicked(int index, var modelData, real mouseX, real mouseY)
|
signal itemRightClicked(int index, var modelData, real mouseX, real mouseY)
|
||||||
|
|
||||||
function ensureVisible(index) {
|
function ensureVisible(index) {
|
||||||
@@ -438,9 +431,6 @@ DankModal {
|
|||||||
onItemClicked: function(index, modelData) {
|
onItemClicked: function(index, modelData) {
|
||||||
appLauncher.launchApp(modelData);
|
appLauncher.launchApp(modelData);
|
||||||
}
|
}
|
||||||
onItemHovered: function(index) {
|
|
||||||
appLauncher.selectedIndex = index;
|
|
||||||
}
|
|
||||||
onItemRightClicked: function(index, modelData, mouseX, mouseY) {
|
onItemRightClicked: function(index, modelData, mouseX, mouseY) {
|
||||||
contextMenu.show(mouseX, mouseY, modelData);
|
contextMenu.show(mouseX, mouseY, modelData);
|
||||||
}
|
}
|
||||||
@@ -531,8 +521,6 @@ DankModal {
|
|||||||
onEntered: {
|
onEntered: {
|
||||||
if (resultsGrid.hoverUpdatesSelection && !resultsGrid.keyboardNavigationActive)
|
if (resultsGrid.hoverUpdatesSelection && !resultsGrid.keyboardNavigationActive)
|
||||||
resultsGrid.currentIndex = index;
|
resultsGrid.currentIndex = index;
|
||||||
|
|
||||||
resultsGrid.itemHovered(index);
|
|
||||||
}
|
}
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
resultsGrid.keyboardNavigationReset();
|
resultsGrid.keyboardNavigationReset();
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ PanelWindow {
|
|||||||
function show() {
|
function show() {
|
||||||
appDrawerPopout.isVisible = true
|
appDrawerPopout.isVisible = true
|
||||||
appLauncher.searchQuery = ""
|
appLauncher.searchQuery = ""
|
||||||
|
appLauncher.selectedIndex = 0
|
||||||
|
appLauncher.setCategory("All")
|
||||||
|
appLauncher.keyboardNavigationActive = false
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
@@ -411,7 +414,6 @@ PanelWindow {
|
|||||||
|
|
||||||
signal keyboardNavigationReset
|
signal keyboardNavigationReset
|
||||||
signal itemClicked(int index, var modelData)
|
signal itemClicked(int index, var modelData)
|
||||||
signal itemHovered(int index)
|
|
||||||
signal itemRightClicked(int index, var modelData, real mouseX, real mouseY)
|
signal itemRightClicked(int index, var modelData, real mouseX, real mouseY)
|
||||||
|
|
||||||
function ensureVisible(index) {
|
function ensureVisible(index) {
|
||||||
@@ -446,9 +448,6 @@ PanelWindow {
|
|||||||
onItemClicked: function (index, modelData) {
|
onItemClicked: function (index, modelData) {
|
||||||
appLauncher.launchApp(modelData)
|
appLauncher.launchApp(modelData)
|
||||||
}
|
}
|
||||||
onItemHovered: function (index) {
|
|
||||||
appLauncher.selectedIndex = index
|
|
||||||
}
|
|
||||||
onItemRightClicked: function (index, modelData, mouseX, mouseY) {
|
onItemRightClicked: function (index, modelData, mouseX, mouseY) {
|
||||||
contextMenu.show(mouseX, mouseY, modelData)
|
contextMenu.show(mouseX, mouseY, modelData)
|
||||||
}
|
}
|
||||||
@@ -553,8 +552,6 @@ PanelWindow {
|
|||||||
if (appList.hoverUpdatesSelection
|
if (appList.hoverUpdatesSelection
|
||||||
&& !appList.keyboardNavigationActive)
|
&& !appList.keyboardNavigationActive)
|
||||||
appList.currentIndex = index
|
appList.currentIndex = index
|
||||||
|
|
||||||
appList.itemHovered(index)
|
|
||||||
}
|
}
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
appList.keyboardNavigationReset()
|
appList.keyboardNavigationReset()
|
||||||
@@ -599,7 +596,6 @@ PanelWindow {
|
|||||||
|
|
||||||
signal keyboardNavigationReset
|
signal keyboardNavigationReset
|
||||||
signal itemClicked(int index, var modelData)
|
signal itemClicked(int index, var modelData)
|
||||||
signal itemHovered(int index)
|
|
||||||
signal itemRightClicked(int index, var modelData, real mouseX, real mouseY)
|
signal itemRightClicked(int index, var modelData, real mouseX, real mouseY)
|
||||||
|
|
||||||
function ensureVisible(index) {
|
function ensureVisible(index) {
|
||||||
@@ -636,9 +632,6 @@ PanelWindow {
|
|||||||
onItemClicked: function (index, modelData) {
|
onItemClicked: function (index, modelData) {
|
||||||
appLauncher.launchApp(modelData)
|
appLauncher.launchApp(modelData)
|
||||||
}
|
}
|
||||||
onItemHovered: function (index) {
|
|
||||||
appLauncher.selectedIndex = index
|
|
||||||
}
|
|
||||||
onItemRightClicked: function (index, modelData, mouseX, mouseY) {
|
onItemRightClicked: function (index, modelData, mouseX, mouseY) {
|
||||||
contextMenu.show(mouseX, mouseY, modelData)
|
contextMenu.show(mouseX, mouseY, modelData)
|
||||||
}
|
}
|
||||||
@@ -736,8 +729,6 @@ PanelWindow {
|
|||||||
if (appGrid.hoverUpdatesSelection
|
if (appGrid.hoverUpdatesSelection
|
||||||
&& !appGrid.keyboardNavigationActive)
|
&& !appGrid.keyboardNavigationActive)
|
||||||
appGrid.currentIndex = index
|
appGrid.currentIndex = index
|
||||||
|
|
||||||
appGrid.itemHovered(index)
|
|
||||||
}
|
}
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
appGrid.keyboardNavigationReset()
|
appGrid.keyboardNavigationReset()
|
||||||
|
|||||||
Reference in New Issue
Block a user