More fixes

This commit is contained in:
Ly-sec 2025-09-13 17:34:13 +02:00
parent 004836fc8f
commit 8c815146e6
6 changed files with 53 additions and 48 deletions

View file

@ -52,7 +52,7 @@ Item {
readonly property real minWidth: Math.max(1, screen.width * 0.06)
readonly property real maxWidth: minWidth * 2
implicitHeight: (barPosition === "left" || barPosition === "right") ? calculatedVerticalHeight() : Math.round(Style.barHeight * scaling)
implicitHeight: Math.round(Style.capsuleHeight * scaling)
implicitWidth: (barPosition === "left" || barPosition === "right") ? Math.round(Style.baseWidgetSize * 0.8 * scaling) : (horizontalLayout.implicitWidth + Style.marginM * 2 * scaling)
function getTitle() {
@ -66,21 +66,6 @@ Item {
visible: getTitle() !== ""
function calculatedVerticalHeight() {
// Base height for the background rectangle
let total = Math.round(Style.capsuleHeight * scaling)
// Add padding for the container margins
total += Style.marginM * scaling * 2 // Top and bottom margins
// Add space for icon if shown
if (showIcon) {
total += Style.fontSizeL * scaling * 1.2 + Style.marginS * scaling
}
return total
}
function calculatedHorizontalWidth() {
let total = Style.marginM * 2 * scaling // internal padding