Compare commits

..

2 commits

Author SHA1 Message Date
Benjamin Palko
ac24279799 basic menu styling 2025-08-31 18:49:03 -04:00
Benjamin Palko
d3d6fe7d57 add to storybook 2025-08-31 16:03:16 -04:00
3 changed files with 59 additions and 0 deletions

12
components/StyledMenu.qml Normal file
View file

@ -0,0 +1,12 @@
import qs.config
import QtQuick
import QtQuick.Controls
Menu {
id: root
palette.window: Theme.palette.base100
palette.base: Theme.palette.base100
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
}

View file

@ -0,0 +1,9 @@
import qs.config
import QtQuick
import QtQuick.Controls
MenuItem {
palette.text: Theme.palette.basecontent
palette.highlight: Theme.palette.primary
palette.highlightedText: Theme.palette.primarycontent
}

View file

@ -96,6 +96,14 @@ StyledWindow {
} }
} }
ColumnLayout {
StyledText {
text: "Mpris Player Selector"
font.pixelSize: 18
}
MprisPlayerSelector {}
}
ColumnLayout { ColumnLayout {
StyledText { StyledText {
text: "Mpris Controller" text: "Mpris Controller"
@ -106,6 +114,36 @@ StyledWindow {
} }
} }
ColumnLayout {
StyledText {
text: "Menu"
font.pixelSize: 18
}
Button {
id: fileButton
text: "File"
onPressed: menu.visible ? menu.close() : menu.open()
StyledMenu {
id: menu
y: fileButton.height
StyledMenuItem {
text: "New..."
}
StyledMenuItem {
text: "Open..."
}
StyledMenuItem {
text: "Save"
}
StyledMenuItem {
text: "Close"
}
}
}
}
ColumnLayout { ColumnLayout {
StyledText { StyledText {
text: "Drawer" text: "Drawer"