Compare commits

..

2 commits

Author SHA1 Message Date
Benjamin Palko
d9bb01c6e8 reduce default padding 2025-09-11 17:08:21 -04:00
Benjamin Palko
8104e3c099 wrap all items in pane 2025-09-11 17:05:14 -04:00
3 changed files with 75 additions and 61 deletions

View file

@ -5,7 +5,7 @@ import QtQuick.Controls
Pane {
id: pane
padding: 24
padding: 8
background: Rectangle {
color: "transparent"
border.width: Styling.theme.border

View file

@ -1,5 +1,6 @@
import qs.components
import qs.config
import qs.services
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
@ -14,12 +15,14 @@ GridLayout {
text: "ToolTip"
font.pixelSize: 18
}
Button {
id: toolTipButton
text: "Hello world!"
StyledToolTip {
visible: toolTipButton.hovered
text: qsTr("Save the active project")
StyledPane {
Button {
id: toolTipButton
text: "Hello world!"
StyledToolTip {
visible: toolTipButton.hovered
text: qsTr("Save the active project")
}
}
}
}
@ -29,13 +32,15 @@ GridLayout {
text: "ProgressBar"
font.pixelSize: 18
}
StyledProgressBar {
id: progressBar
indeterminate: true
implicitHeight: 10
from: 0
to: 100
value: 50
StyledPane {
StyledProgressBar {
id: progressBar
indeterminate: true
implicitHeight: 10
from: 0
to: 100
value: 50
}
}
}
@ -44,15 +49,17 @@ GridLayout {
text: "ListView"
font.pixelSize: 18
}
StyledWrapperRectangle {
border.color: Styling.theme.base100
border.width: 2
StyledListView {
implicitWidth: 200
implicitHeight: 100
model: 10
delegate: StyledText {
text: "Hello world!"
StyledPane {
StyledWrapperRectangle {
border.color: Styling.theme.base100
border.width: 2
StyledListView {
implicitWidth: 200
implicitHeight: 100
model: 10
delegate: StyledText {
text: "Hello world!"
}
}
}
}
@ -63,7 +70,9 @@ GridLayout {
text: "Mpris Player Selector"
font.pixelSize: 18
}
MprisPlayerSelector {}
StyledPane {
MprisPlayerSelector {}
}
}
ColumnLayout {
@ -71,8 +80,10 @@ GridLayout {
text: "Mpris Controller"
font.pixelSize: 18
}
MprisController {
player: Mpris.active ?? null
StyledPane {
MprisController {
player: Mpris.active ?? null
}
}
}
@ -81,41 +92,43 @@ GridLayout {
text: "Drawer"
font.pixelSize: 18
}
RowLayout {
Button {
text: "Top"
onClicked: {
drawer.x = root.width / 2 - drawer.width / 2;
drawer.y = 0;
drawer.edge = Qt.TopEdge;
drawer.open();
StyledPane {
RowLayout {
Button {
text: "Top"
onClicked: {
drawer.x = root.width / 2 - drawer.width / 2;
drawer.y = 0;
drawer.edge = Qt.TopEdge;
drawer.open();
}
}
}
Button {
text: "Left"
onClicked: {
drawer.y = root.height / 2 - drawer.height / 2;
drawer.x = 0;
drawer.edge = Qt.LeftEdge;
drawer.open();
Button {
text: "Left"
onClicked: {
drawer.y = root.height / 2 - drawer.height / 2;
drawer.x = 0;
drawer.edge = Qt.LeftEdge;
drawer.open();
}
}
}
Button {
text: "Right"
onClicked: {
drawer.y = root.height / 2 - drawer.height / 2;
drawer.x = 0;
drawer.edge = Qt.RightEdge;
drawer.open();
Button {
text: "Right"
onClicked: {
drawer.y = root.height / 2 - drawer.height / 2;
drawer.x = 0;
drawer.edge = Qt.RightEdge;
drawer.open();
}
}
}
Button {
text: "Bottom"
onClicked: {
drawer.x = root.width / 2 - drawer.width / 2;
drawer.y = 0;
drawer.edge = Qt.BottomEdge;
drawer.open();
Button {
text: "Bottom"
onClicked: {
drawer.x = root.width / 2 - drawer.width / 2;
drawer.y = 0;
drawer.edge = Qt.BottomEdge;
drawer.open();
}
}
}
}

View file

@ -1,5 +1,4 @@
import qs.components
import qs.config
import QtQuick
import QtQuick.Layouts
@ -14,8 +13,10 @@ GridLayout {
font.pixelSize: 18
}
StyledSwitch {
text: "Enable"
StyledPane {
StyledSwitch {
text: "Enable"
}
}
}
}