Merge pull request #6348 from InfeCtlll3/agent/scroll-long-tray-menus
Make long tray menus scrollable
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import Quickshell
|
import Quickshell
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
import Quickshell.Services.SystemTray
|
import Quickshell.Services.SystemTray
|
||||||
import qs.Commons
|
import qs.Commons
|
||||||
@@ -446,9 +447,21 @@ BarWidget {
|
|||||||
contentWidth: trayMenuPopup.fittedContentWidth(Style.space(232))
|
contentWidth: trayMenuPopup.fittedContentWidth(Style.space(232))
|
||||||
contentHeight: trayMenuPopup.fittedContentHeight(trayMenuColumn.implicitHeight, Style.space(420))
|
contentHeight: trayMenuPopup.fittedContentHeight(trayMenuColumn.implicitHeight, Style.space(420))
|
||||||
|
|
||||||
|
Flickable {
|
||||||
|
id: trayMenuFlick
|
||||||
|
anchors.fill: parent
|
||||||
|
contentWidth: width
|
||||||
|
contentHeight: trayMenuColumn.implicitHeight
|
||||||
|
clip: true
|
||||||
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
flickableDirection: Flickable.VerticalFlick
|
||||||
|
interactive: contentHeight > height
|
||||||
|
|
||||||
|
ScrollBar.vertical: ScrollBar { policy: ScrollBar.AsNeeded }
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: trayMenuColumn
|
id: trayMenuColumn
|
||||||
anchors.fill: parent
|
width: trayMenuFlick.width
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
@@ -563,6 +576,7 @@ BarWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Renders a tray icon, recoloring symbolic icons to the bar foreground so
|
// Renders a tray icon, recoloring symbolic icons to the bar foreground so
|
||||||
// they stay visible on any theme (a raw symbolic icon keeps its baked-in
|
// they stay visible on any theme (a raw symbolic icon keeps its baked-in
|
||||||
|
|||||||
Reference in New Issue
Block a user