Files
omarchycn/shell/plugins/bar/widgets/spacer.qml
T
David Heinemeier Hansson 16604c67b3 Lift setting / vertical / barSize onto BarWidget
Six widgets (clock, daytime, keyboardLayout, lockKeys, activeWindow,
media) shipped identical copies of `function setting(name, fallback)`.
Eight widgets reimplemented `readonly property bool vertical`, and
three reimplemented `readonly property int barSize`. Move all three
onto the BarWidget base so widgets read the same wiring everyone else
gets for free.

While in here, drop the dead `setting()` declaration on media.qml — it
was defined but never called.
2026-05-20 19:50:10 +02:00

14 lines
285 B
QML

import QtQuick
import qs.Ui
BarWidget {
id: root
moduleName: "spacer"
readonly property int span: settings && settings.size !== undefined ? Number(settings.size) : 12
implicitWidth: vertical ? barSize : span
implicitHeight: vertical ? span : barSize
visible: span > 0
}