refactor flexible grids into Box

This commit is contained in:
end-4
2026-03-09 11:03:56 +01:00
parent a81f52fcd7
commit 84d7928518
7 changed files with 37 additions and 16 deletions
@@ -0,0 +1,11 @@
pragma ComponentBehavior: Bound
import QtQuick
// A type that's both capable of being rows and columns
// Qt Row is just a locked down Grid smh
// Calling it a Box because that's how row-or-column widget is called in Gtk
Grid {
property bool vertical: false
columns: vertical ? 1 : -1
rows: vertical ? -1 : 1
}
@@ -0,0 +1,13 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
// Box, Layout version
// A type that's both capable of being rows and columns
// Qt Row is just a locked down Grid smh
// Calling it a Box because that's how row-or-column widget is called in Gtk
GridLayout {
property bool vertical: false
columns: vertical ? 1 : -1
rows: vertical ? -1 : 1
}
@@ -2,11 +2,10 @@ pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
GridLayout {
BoxLayout {
id: root
property bool vertical: true
columns: vertical ? 1 : -1
vertical: true
property real totalDuration: 250
property real interval: totalDuration / count