fix(qt): the mini footer squared the card's rounded corners
The owner photographed it against a white background: every mini surface rounded on top and SQUARE at the bottom, and the micro card — the smallest of them — square on all four. Their read was right: "los NPB son cuadrados y no tienen transparencia, así que aunque el fondo tenga esquinas redondeadas, el npb prevalece". The footer is an opaque Rectangle anchored to the card's bottom edge, and the card cannot round it: QML's clip is RECTANGULAR. theme/RoundedImage.qml records that as measured fact on this Qt build — "the child paints square over the rounded fill" — which is the same reason the artwork backdrop needed a mask two commits ago. So the footer rounds its own corners, with per-corner radii (Qt 6.7+; this tree builds against 6.11): the bottom two in every mode, and all four in micro, where the footer IS the whole card. That last case is exactly why the smallest surface was the one with no rounding at all. cc
This commit is contained in:
2 files changed
+25
No files matched your search
@@ -142,6 +142,30 @@ Rectangle {
|
||||
|
||||
color: QbzMini.backgroundBlur ? "#d906070a" : theme.surfaceCard // #06070ad9 in Slint; Qt is #AARRGGBB
|
||||
|
||||
/// The CARD's corner radius, handed down by MiniShell.
|
||||
///
|
||||
/// The footer must round its own corners, because the card CANNOT round
|
||||
/// them for it: `qml/theme/RoundedImage.qml:3-6` records as measured fact
|
||||
/// on this Qt build that a Rectangle with `radius` + `clip: true` does NOT
|
||||
/// clip its children to the curve — "the child paints square over the
|
||||
/// rounded fill". This footer is an opaque Rectangle anchored to the card's
|
||||
/// bottom edge, so without this it paints square corners straight over the
|
||||
/// card's rounded ones. That is exactly what the owner photographed against
|
||||
/// a white background on 2026-08-04: every surface rounded on top and
|
||||
/// SQUARE at the bottom, and the micro card — where the footer IS the whole
|
||||
/// card — square on all four.
|
||||
///
|
||||
/// Per-corner radii need Qt 6.7+; this tree builds against 6.11.
|
||||
property real cardRadius: 0
|
||||
|
||||
// In micro the footer is the entire card, so all four corners are its own.
|
||||
// In full and compact it owns the bottom two and the surface area above it
|
||||
// owns nothing (that Item is transparent and paints no corner).
|
||||
topLeftRadius: root.mode === 2 ? root.cardRadius : 0
|
||||
topRightRadius: root.mode === 2 ? root.cardRadius : 0
|
||||
bottomLeftRadius: root.cardRadius
|
||||
bottomRightRadius: root.cardRadius
|
||||
|
||||
// ======================================================================
|
||||
// FULL / COMPACT (:263-329)
|
||||
// ======================================================================
|
||||
|
||||
@@ -273,6 +273,7 @@ Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
height: root.footerHeight
|
||||
mode: root.footerMode
|
||||
cardRadius: root.radius
|
||||
hostWindow: root.hostWindow
|
||||
windowHovered: cardHover.hovered
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user