dashboard: show on hover (for touch devices)
This commit is contained in:
parent
6880272c5b
commit
790e1a30cc
2 changed files with 10 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ JsonObject {
|
||||||
property bool enabled: true
|
property bool enabled: true
|
||||||
property int mediaUpdateInterval: 500
|
property int mediaUpdateInterval: 500
|
||||||
property int visualiserBars: 45
|
property int visualiserBars: 45
|
||||||
|
property int dragThreshold: 50
|
||||||
property Sizes sizes: Sizes {}
|
property Sizes sizes: Sizes {}
|
||||||
|
|
||||||
component Sizes: JsonObject {
|
component Sizes: JsonObject {
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,15 @@ MouseArea {
|
||||||
dashboardShortcutActive = false;
|
dashboardShortcutActive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show/hide dashboard on drag (for touchscreen devices)
|
||||||
|
if (pressed && inTopPanel(panels.dashboard, dragStart.x, dragStart.y) && withinPanelWidth(panels.dashboard, x, y)) {
|
||||||
|
const dragY = y - dragStart.y;
|
||||||
|
if (dragY > Config.dashboard.dragThreshold)
|
||||||
|
visibilities.dashboard = true;
|
||||||
|
else if (dragY < -Config.dashboard.dragThreshold)
|
||||||
|
visibilities.dashboard = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Show utilities on hover
|
// Show utilities on hover
|
||||||
const showUtilities = inBottomPanel(panels.utilities, x, y);
|
const showUtilities = inBottomPanel(panels.utilities, x, y);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue