layout: more double margins implementations

This commit is contained in:
Lemmy
2026-02-20 21:11:06 -05:00
parent b36bef4cc0
commit db56321f54
50 changed files with 95 additions and 95 deletions
+2 -2
View File
@@ -46,7 +46,7 @@ PopupWindow {
implicitWidth: menuWidth
// Use the content height of the Flickable for implicit height
implicitHeight: Math.min(screen?.height * 0.9, flickable.contentHeight + (Style.marginS * 2))
implicitHeight: Math.min(screen?.height * 0.9, flickable.contentHeight + Style.margin2S)
// When implicitHeight changes (menu content loads), force anchor recalculation
onImplicitHeightChanged: {
@@ -267,7 +267,7 @@ PopupWindow {
} else {
// Calculate based on text content
const textHeight = text.contentHeight || (Style.fontSizeS * 1.2);
return Math.max(28, textHeight + (Style.marginS * 2));
return Math.max(28, textHeight + Style.margin2S);
}
}
+1 -1
View File
@@ -93,7 +93,7 @@ Item {
function calculateContentWidth() {
// Calculate the actual content width based on visible elements
var contentWidth = 0;
var margins = Style.marginS * 2; // Left and right margins
var margins = Style.margin2S; // Left and right margins
// Icon width (if visible)
if (showIcon) {
+2 -2
View File
@@ -153,8 +153,8 @@ Item {
id: capsule
visible: root.useGraphicMode
anchors.centerIn: nBattery
width: root.isBarVertical ? root.capsuleHeight : nBattery.width + Style.marginS * 2
height: root.isBarVertical ? nBattery.height + Style.marginS * 2 : root.capsuleHeight
width: root.isBarVertical ? root.capsuleHeight : nBattery.width + Style.margin2S
height: root.isBarVertical ? nBattery.height + Style.margin2S : root.capsuleHeight
radius: Math.min(Style.radiusL, width / 2)
color: graphicMouseArea.containsMouse ? Color.mHover : Style.capsuleColor
border.color: Style.capsuleBorderColor
+1 -1
View File
@@ -49,7 +49,7 @@ Item {
// Content dimensions for implicit sizing
readonly property real contentWidth: isBarVertical ? capsuleHeight : Math.round((isBarVertical ? verticalLoader.implicitWidth : horizontalLoader.implicitWidth) + Style.margin2M)
readonly property real contentHeight: isBarVertical ? Math.round(verticalLoader.implicitHeight + Style.marginS * 2) : capsuleHeight
readonly property real contentHeight: isBarVertical ? Math.round(verticalLoader.implicitHeight + Style.margin2S) : capsuleHeight
// Size: use implicit width/height
// BarWidgetLoader sets explicit width/height to extend click area
+1 -1
View File
@@ -127,7 +127,7 @@ Item {
iconWidth = artSize;
}
var margins = isVertical ? 0 : (Style.marginS * 2);
var margins = isVertical ? 0 : Style.margin2S;
// Add spacing and text width
var textWidth = 0;
+1 -1
View File
@@ -607,7 +607,7 @@ Item {
return Math.round(calculatedWidth);
}
readonly property real contentHeight: visible ? (isVerticalBar ? Math.round(taskbarLayout.implicitHeight + Style.marginS * 2) : capsuleHeight) : 0
readonly property real contentHeight: visible ? (isVerticalBar ? Math.round(taskbarLayout.implicitHeight + Style.margin2S) : capsuleHeight) : 0
implicitWidth: contentWidth
implicitHeight: contentHeight
+1 -1
View File
@@ -793,7 +793,7 @@ Item {
topMargin: -Style.fontSizeXS * 0.25
}
width: Math.max(groupedWorkspaceNumber.implicitWidth + (Style.marginXS * 2), Style.fontSizeXXS * 2)
width: Math.max(groupedWorkspaceNumber.implicitWidth + Style.margin2XS, Style.fontSizeXXS * 2)
height: Math.max(groupedWorkspaceNumber.implicitHeight + Style.marginXS, Style.fontSizeXXS * 2)
Rectangle {
+1 -1
View File
@@ -31,7 +31,7 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.topMargin: Style.marginM
anchors.bottomMargin: Style.marginM
anchors.rightMargin: clockLoader.width + (Style.marginXL * 2)
anchors.rightMargin: clockLoader.width + Style.margin2XL
anchors.leftMargin: Style.marginXL
spacing: 0
+1 -1
View File
@@ -29,7 +29,7 @@ NBox {
readonly property bool isClearNight: testEffects === "clear_night" || (testEffects === "" && (currentWeatherCode === 0 && !isDayTime))
visible: Settings.data.location.weatherEnabled
implicitHeight: Math.max(100 * Style.uiScaleRatio, content.implicitHeight + (Style.marginXL * 2))
implicitHeight: Math.max(100 * Style.uiScaleRatio, content.implicitHeight + Style.margin2XL)
// Weather effect layer (rain/snow)
Loader {
+2 -2
View File
@@ -345,8 +345,8 @@ Variants {
x: panelInternal.isDragging ? panelInternal.dragOffsetX : panelInternal.baseX
y: panelInternal.isDragging ? panelInternal.dragOffsetY : panelInternal.baseY
width: controlsLayout.implicitWidth + (Style.marginXL * 2)
height: controlsLayout.implicitHeight + (Style.marginXL * 2)
width: controlsLayout.implicitWidth + Style.margin2XL
height: controlsLayout.implicitHeight + Style.margin2XL
color: Qt.rgba(Color.mSurface.r, Color.mSurface.g, Color.mSurface.b, 0.85)
radius: Style.radiusL
+1 -1
View File
@@ -84,7 +84,7 @@ PopupWindow {
const item = root.items[i];
if (item && item.text) {
// Calculate width: margins + icon (if present) + spacing + text width
let itemWidth = Style.marginS * 2; // left and right margins
let itemWidth = Style.margin2S; // left and right margins
if (item.icon && item.icon !== "") {
itemWidth += Style.fontSizeL + Style.marginS; // icon + spacing
+1 -1
View File
@@ -44,7 +44,7 @@ Rectangle {
id: contentRow
anchors.fill: parent
anchors.margins: Style.marginL
spacing: Style.marginXL * 2
spacing: Style.margin2XL
// Left side: Avatar
Rectangle {
+6 -6
View File
@@ -407,15 +407,15 @@ Variants {
const fontSize = Style.fontSizeS * Settings.data.ui.fontFixedScale * Style.uiScaleRatio;
const estimatedWidth = text.length * fontSize * 0.6;
const iconWidth = Style.fontSizeXL * Style.uiScaleRatio;
const margins = Style.marginL * 2;
const margins = Style.margin2L;
const spacing = Style.marginM;
const bgMargins = Style.marginM * 1.5 * 2;
const bgMargins = Style.margin2M * 1.5;
return Math.max(shortHWidth, Math.round((estimatedWidth + iconWidth + margins + spacing + bgMargins) * 1.1));
}
const iconWidth = Style.fontSizeXL * Style.uiScaleRatio;
const margins = Style.marginL * 2; // Left and right content margins
const margins = Style.margin2L; // Left and right content margins
const spacing = Style.marginM; // Spacing between icon and text
const bgMargins = Style.marginM * 1.5 * 2; // Background margins
const bgMargins = Style.margin2M * 1.5; // Background margins
const totalWidth = textWidth + iconWidth + margins + spacing + bgMargins;
// Ensure minimum width and add some buffer
return Math.max(shortHWidth, Math.round(totalWidth * 1.1));
@@ -438,8 +438,8 @@ Variants {
const textHeight = charCount * charHeight;
// Background margins (Style.marginM * 1.5 * 2 for top and bottom)
const bgMargins = Style.marginM * 1.5 * 2;
// Content margins (Style.marginL * 2 for top and bottom)
const contentMargins = Style.marginL * 2;
// Content margins (Style.margin2L for top and bottom)
const contentMargins = Style.margin2L;
// Icon size: fontSizeXL scaled, with extra space for icon rendering and padding
const iconSize = Style.fontSizeXL * Style.uiScaleRatio * 1.8; // Add 80% for icon rendering and padding
// Spacing between text and icon (Style.marginM for lock keys)
+3 -3
View File
@@ -20,7 +20,7 @@ SmartPanel {
panelContent: Item {
id: panelContent
property real contentPreferredHeight: mainLayout.implicitHeight + Style.marginL * 2
property real contentPreferredHeight: mainLayout.implicitHeight + Style.margin2L
property var batteryWidgetInstance: BarService.lookupWidget("Battery", screen ? screen.name : null)
readonly property var batteryWidgetSettings: batteryWidgetInstance ? batteryWidgetInstance.widgetSettings : null
@@ -120,7 +120,7 @@ SmartPanel {
// Charge level + health/time
NBox {
Layout.fillWidth: true
implicitHeight: chargeLayout.implicitHeight + Style.marginL * 2
implicitHeight: chargeLayout.implicitHeight + Style.margin2L
visible: BatteryService.laptopBatteries.length > 0 || BatteryService.bluetoothBatteries.length > 0
ColumnLayout {
@@ -292,7 +292,7 @@ SmartPanel {
NBox {
Layout.fillWidth: true
height: controlsLayout.implicitHeight + Style.marginL * 2
height: controlsLayout.implicitHeight + Style.margin2L
visible: showPowerProfiles || showNoctaliaPerformance
ColumnLayout {
+1 -1
View File
@@ -22,7 +22,7 @@ SmartPanel {
id: panelContent
color: "transparent"
property real contentPreferredHeight: Math.min(root.preferredHeight, mainColumn.implicitHeight + Style.marginL * 2)
property real contentPreferredHeight: Math.min(root.preferredHeight, mainColumn.implicitHeight + Style.margin2L)
ColumnLayout {
id: mainColumn
@@ -18,7 +18,7 @@ SmartPanel {
panelContent: Item {
id: panelContent
property real contentPreferredHeight: mainColumn.implicitHeight + Style.marginL * 2
property real contentPreferredHeight: mainColumn.implicitHeight + Style.margin2L
property var brightnessWidgetInstance: BarService.lookupWidget("Brightness", screen ? screen.name : null)
readonly property var brightnessWidgetSettings: brightnessWidgetInstance ? brightnessWidgetInstance.widgetSettings : null
+2 -2
View File
@@ -18,13 +18,13 @@ SmartPanel {
anchors.fill: parent
readonly property real contentPreferredWidth: Math.round((Settings.data.location.showWeekNumberInCalendar ? 440 : 420) * Style.uiScaleRatio)
readonly property real contentPreferredHeight: content.implicitHeight + (Style.marginL * 2)
readonly property real contentPreferredHeight: content.implicitHeight + Style.margin2L
ColumnLayout {
id: content
x: Style.marginL
y: Style.marginL
width: parent.width - (Style.marginL * 2)
width: parent.width - Style.margin2L
spacing: Style.marginL
// All clock panel cards
@@ -93,7 +93,7 @@ SmartPanel {
id: layout
x: Style.marginL
y: Style.marginL
width: parent.width - (Style.marginL * 2)
width: parent.width - Style.margin2L
spacing: Style.marginL
Repeater {
+1 -1
View File
@@ -14,7 +14,7 @@ Item {
property bool loadingFullContent: false
property bool isImageContent: false
implicitHeight: contentArea.implicitHeight + Style.marginL * 2
implicitHeight: contentArea.implicitHeight + Style.margin2L
function loadContent() {
if (!currentItem || !currentItem.clipboardId)
+1 -1
View File
@@ -46,7 +46,7 @@ SmartPanel {
// Panel sizing
readonly property int listPanelWidth: Math.round(500 * Style.uiScaleRatio)
readonly property int totalBaseWidth: listPanelWidth + (Style.marginL * 2)
readonly property int totalBaseWidth: listPanelWidth + Style.margin2L
preferredWidth: totalBaseWidth
preferredHeight: Math.round(600 * Style.uiScaleRatio)
@@ -92,7 +92,7 @@ Variants {
// Launcher panel with position-based anchoring
Item {
id: launcherPanel
width: Math.round(Math.max(parent.width * 0.25, launcherWindow.listPanelWidth + (Style.marginL * 2)))
width: Math.round(Math.max(parent.width * 0.25, launcherWindow.listPanelWidth + Style.margin2L * 2))
height: Math.round(Math.max(parent.height * 0.5, 600 * Style.uiScaleRatio))
clip: false
+3 -3
View File
@@ -103,7 +103,7 @@ SmartPanel {
panelContent: Rectangle {
color: "transparent"
property real contentPreferredHeight: Math.min(root.preferredHeight, mainColumn.implicitHeight + Style.marginL * 2)
property real contentPreferredHeight: Math.min(root.preferredHeight, mainColumn.implicitHeight + Style.margin2L)
ColumnLayout {
id: mainColumn
@@ -570,7 +570,7 @@ SmartPanel {
visible: modelData.connected
color: Color.mPrimary
radius: height * 0.5
width: ethConnectedText.implicitWidth + (Style.marginS * 2)
width: ethConnectedText.implicitWidth + Style.margin2S
height: ethConnectedText.implicitHeight + (Style.margin2XXS)
NText {
@@ -631,7 +631,7 @@ SmartPanel {
radius: Style.radiusS
border.width: Style.borderS
border.color: Color.mOutline
implicitHeight: ethInfoGrid.implicitHeight + Style.marginS * 2
implicitHeight: ethInfoGrid.implicitHeight + Style.margin2S
clip: true
Layout.topMargin: Style.marginXS
+7 -7
View File
@@ -154,7 +154,7 @@ NBox {
visible: modelData.connected && NetworkService.disconnectingFrom !== modelData.ssid
color: NetworkService.internetConnectivity ? Color.mPrimary : Color.mError
radius: height * 0.5
width: Math.round(connectedText.implicitWidth + Style.marginS * 2)
width: Math.round(connectedText.implicitWidth + Style.margin2S)
height: Math.round(connectedText.implicitHeight + Style.margin2XXS)
NText {
@@ -184,7 +184,7 @@ NBox {
visible: NetworkService.disconnectingFrom === modelData.ssid
color: Color.mError
radius: height * 0.5
width: Math.round(disconnectingText.implicitWidth + Style.marginS * 2)
width: Math.round(disconnectingText.implicitWidth + Style.margin2S)
height: Math.round(disconnectingText.implicitHeight + Style.margin2XXS)
NText {
@@ -200,7 +200,7 @@ NBox {
visible: NetworkService.forgettingNetwork === modelData.ssid
color: Color.mError
radius: height * 0.5
width: Math.round(forgettingText.implicitWidth + Style.marginS * 2)
width: Math.round(forgettingText.implicitWidth + Style.margin2S)
height: math.round(forgettingText.implicitHeight + Style.margin2XXS)
NText {
@@ -218,7 +218,7 @@ NBox {
border.color: Color.mOutline
border.width: Style.borderS
radius: height * 0.5
width: savedText.implicitWidth + (Style.marginS * 2)
width: savedText.implicitWidth + Style.margin2S
height: savedText.implicitHeight + (Style.margin2XXS)
NText {
@@ -307,7 +307,7 @@ NBox {
radius: Style.radiusS
border.width: Style.borderS
border.color: Color.mOutline
implicitHeight: infoGrid.implicitHeight + Style.marginS * 2
implicitHeight: infoGrid.implicitHeight + Style.margin2S
clip: true
onVisibleChanged: {
if (visible && infoGrid && infoGrid.forceLayout) {
@@ -587,7 +587,7 @@ NBox {
Rectangle {
visible: root.passwordSsid === modelData.ssid && NetworkService.disconnectingFrom !== modelData.ssid && NetworkService.forgettingNetwork !== modelData.ssid
Layout.fillWidth: true
height: passwordRow.implicitHeight + Style.marginS * 2
height: passwordRow.implicitHeight + Style.margin2S
color: Color.mSurfaceVariant
border.color: Color.mOutline
border.width: Style.borderS
@@ -660,7 +660,7 @@ NBox {
Rectangle {
visible: root.expandedSsid === modelData.ssid && NetworkService.disconnectingFrom !== modelData.ssid && NetworkService.forgettingNetwork !== modelData.ssid
Layout.fillWidth: true
height: forgetRow.implicitHeight + Style.marginS * 2
height: forgetRow.implicitHeight + Style.margin2S
color: Color.mSurfaceVariant
radius: Style.radiusS
border.width: Style.borderS
@@ -236,13 +236,13 @@ SmartPanel {
// Calculate content height based on header + tabs (if visible) + content
property real calculatedHeight: {
if (NotificationService.historyList.count === 0) {
return headerBox.implicitHeight + scrollView.implicitHeight + (Style.marginL * 2) + Style.marginM;
return headerBox.implicitHeight + scrollView.implicitHeight + Style.margin2L + Style.marginM;
}
return headerBox.implicitHeight + scrollView.implicitHeight + (Style.marginL * 2) + Style.marginM;
return headerBox.implicitHeight + scrollView.implicitHeight + Style.margin2L + Style.marginM;
}
property real contentPreferredHeight: Math.min(root.preferredHeight, Math.ceil(calculatedHeight))
property real layoutWidth: Math.max(1, root.preferredWidth - (Style.marginL * 2))
property real layoutWidth: Math.max(1, root.preferredWidth - Style.margin2L)
// State (lazy-loaded with panelContent)
property var rangeCounts: [0, 0, 0, 0]
@@ -833,7 +833,7 @@ SmartPanel {
// Content
Column {
width: parent.width - notificationDelegate.iconSize - notificationDelegate.buttonClusterWidth - (Style.marginM * 2)
width: parent.width - notificationDelegate.iconSize - notificationDelegate.buttonClusterWidth - Style.margin2M
spacing: Style.marginXS
// Header row with app name and timestamp
+3 -3
View File
@@ -34,7 +34,7 @@ SmartPanel {
var buttonSpacing = Style.marginS;
var enabledCount = powerOptions.length;
var headerSpacing = Settings.data.sessionMenu.showHeader ? (Style.marginL * 2) : 0;
var headerSpacing = Settings.data.sessionMenu.showHeader ? Style.margin2L : 0;
var baseHeight = (Style.marginL * 4) + headerHeight + dividerHeight + headerSpacing;
var buttonsHeight = enabledCount > 0 ? (buttonHeight * enabledCount) + (buttonSpacing * (enabledCount - 1)) : 0;
@@ -567,8 +567,8 @@ SmartPanel {
anchors.bottom: largeButtonsContainer.top
anchors.horizontalCenter: largeButtonsContainer.horizontalCenter
anchors.bottomMargin: Style.marginM
width: timerText.width + Style.marginXL * 2
height: timerText.height + Style.marginL * 2
width: timerText.width + Style.margin2XL
height: timerText.height + Style.margin2L
radius: Style.radiusM
color: Qt.alpha(Color.mSurface, Settings.data.ui.panelBackgroundOpacity)
border.color: Color.mOutline
@@ -20,7 +20,7 @@ NBox {
color: Color.mSurfaceVariant
Layout.fillWidth: true
implicitHeight: content.implicitHeight + Style.marginL * 2
implicitHeight: content.implicitHeight + Style.margin2L
// Helper to get widgets for this screen (ensures override exists)
function _getWidgetsContainer() {
+9 -9
View File
@@ -371,8 +371,8 @@ Item {
const overlayPos = widget.mapToItem(tabContentArea, 0, 0);
highlightOverlay.x = overlayPos.x - Style.marginM;
highlightOverlay.y = overlayPos.y - Style.marginM;
highlightOverlay.width = widget.width + Style.marginM * 2;
highlightOverlay.height = widget.height + Style.marginM * 2;
highlightOverlay.width = widget.width + Style.margin2M;
highlightOverlay.height = widget.height + Style.margin2M;
highlightAnimation.restart();
});
}
@@ -762,11 +762,11 @@ Item {
Item {
id: toggleContainer
Layout.fillWidth: true
Layout.preferredHeight: Math.round(toggleRow.implicitHeight + Style.marginS * 2)
Layout.preferredHeight: Math.round(toggleRow.implicitHeight + Style.margin2S)
Rectangle {
id: sidebarToggle
width: Math.round(toggleRow.implicitWidth + Style.marginS * 2)
width: Math.round(toggleRow.implicitWidth + Style.margin2S)
height: parent.height
anchors.left: parent.left
radius: Style.radiusS
@@ -817,7 +817,7 @@ Item {
Item {
id: searchContainerWrapper
Layout.fillWidth: true
Layout.preferredHeight: searchInput.implicitHeight > 0 ? searchInput.implicitHeight : (Style.fontSizeXL + Style.marginM * 2)
Layout.preferredHeight: searchInput.implicitHeight > 0 ? searchInput.implicitHeight : (Style.fontSizeXL + Style.margin2M)
// Search input
NTextInput {
@@ -850,7 +850,7 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
height: Math.round(searchCollapsedRow.implicitHeight + Style.marginS * 2)
height: Math.round(searchCollapsedRow.implicitHeight + Style.margin2S)
visible: opacity > 0
opacity: !root.sidebarExpanded ? 1.0 : 0.0
@@ -863,7 +863,7 @@ Item {
Rectangle {
id: searchCollapsedButton
width: Math.round(searchCollapsedRow.implicitWidth + Style.marginS * 2)
width: Math.round(searchCollapsedRow.implicitWidth + Style.margin2S)
height: parent.height
anchors.left: parent.left
radius: Style.radiusS
@@ -950,7 +950,7 @@ Item {
delegate: Rectangle {
id: resultItem
width: searchResultsList.width - (searchResultsList.verticalScrollBarActive ? Style.marginM : 0)
height: resultColumn.implicitHeight + Style.marginM * 2
height: resultColumn.implicitHeight + Style.margin2M
radius: Style.iRadiusS
readonly property bool selected: index === root.searchSelectedIndex
readonly property bool effectiveHover: !root.ignoreMouseHover && resultMouseArea.containsMouse
@@ -1032,7 +1032,7 @@ Item {
delegate: Rectangle {
id: tabItem
width: sidebarList.width
height: tabEntryRow.implicitHeight + Style.marginS * 2
height: tabEntryRow.implicitHeight + Style.margin2S
radius: Style.iRadiusS
color: selected ? Color.mPrimary : (tabItem.hovering ? Color.mHover : "transparent")
readonly property bool selected: index === root.currentTabIndex
@@ -28,7 +28,7 @@ ColumnLayout {
delegate: NBox {
id: monitorCard
Layout.fillWidth: true
implicitHeight: cardContent.implicitHeight + Style.marginL * 2
implicitHeight: cardContent.implicitHeight + Style.margin2L
color: Color.mSurface
required property var modelData
@@ -257,7 +257,7 @@ ColumnLayout {
NBox {
visible: Settings.data.colorSchemes.useWallpaperColors
Layout.fillWidth: true
implicitHeight: descriptionColumn.implicitHeight + Style.marginL * 2
implicitHeight: descriptionColumn.implicitHeight + Style.margin2L
color: Color.mSurface
Column {
@@ -33,8 +33,8 @@ Popup {
property string cachedBranch: "main"
property string cachedBranchSha: ""
width: Math.max(500, contentColumn.implicitWidth + (Style.marginXL * 2))
height: Math.min(800, contentColumn.implicitHeight + (Style.marginXL * 2))
width: Math.max(500, contentColumn.implicitWidth + Style.margin2XL)
height: Math.min(800, contentColumn.implicitHeight + Style.margin2XL)
padding: Style.marginXL
modal: true
dim: false
@@ -245,7 +245,7 @@ ColumnLayout {
NText {
id: chipText
anchors.centerIn: parent
width: parent.width - Style.marginL * 2
width: parent.width - Style.margin2L
text: chip.modelData.name
pointSize: Style.fontSizeS
color: chipMouse.containsMouse ? Color.mOnHover : (isActive ? Color.mOnPrimary : Color.mOnSurface)
@@ -144,7 +144,7 @@ Item {
NBox {
visible: !root.showOnlyLists
Layout.fillWidth: true
Layout.preferredHeight: masterControlCol.implicitHeight + (Style.marginL * 2)
Layout.preferredHeight: masterControlCol.implicitHeight + Style.margin2L
color: Color.mSurface
ColumnLayout {
@@ -304,7 +304,7 @@ Item {
id: miscSettingsBox
visible: !root.showOnlyLists && BluetoothService.enabled
Layout.fillWidth: true
Layout.preferredHeight: miscSettingsCol.implicitHeight + (Style.marginXL * 2)
Layout.preferredHeight: miscSettingsCol.implicitHeight + Style.margin2XL
color: Color.mSurface
ColumnLayout {
@@ -517,7 +517,7 @@ Item {
Rectangle {
visible: device.isExpanded
Layout.fillWidth: true
implicitHeight: infoColumn.implicitHeight + Style.marginS * 2
implicitHeight: infoColumn.implicitHeight + Style.margin2S
radius: Style.radiusS
color: Color.mSurfaceVariant
border.width: Style.borderS
@@ -644,7 +644,7 @@ Item {
visible: !root.showOnlyLists && BluetoothService.pinRequired
anchors.centerIn: parent
width: Math.min(parent.width * 0.9, 400)
height: pinCol.implicitHeight + Style.marginL * 2
height: pinCol.implicitHeight + Style.margin2L
color: Color.mSurface
radius: Style.radiusM
border.color: Style.boxBorderColor
@@ -21,7 +21,7 @@ ColumnLayout {
NBox {
Layout.fillWidth: true
Layout.preferredHeight: masterControlCol.implicitHeight + (Style.marginL * 2)
Layout.preferredHeight: masterControlCol.implicitHeight + Style.margin2L
color: Color.mSurface
ColumnLayout {
@@ -19,7 +19,7 @@ ColumnLayout {
model: Quickshell.screens || []
delegate: NBox {
Layout.fillWidth: true
implicitHeight: Math.round(contentCol.implicitHeight + Style.marginL * 2)
implicitHeight: Math.round(contentCol.implicitHeight + Style.margin2L)
color: Color.mSurface
property var brightnessMonitor: BrightnessService.getMonitorForScreen(modelData)
@@ -20,7 +20,7 @@ ColumnLayout {
NBox {
Layout.fillWidth: true
visible: !SoundService.multimediaAvailable
implicitHeight: unavailableContent.implicitHeight + Style.marginL * 2
implicitHeight: unavailableContent.implicitHeight + Style.margin2L
RowLayout {
id: unavailableContent
@@ -175,7 +175,7 @@ ColumnLayout {
Layout.fillWidth: true
Layout.leftMargin: Style.borderS
Layout.rightMargin: Style.borderS
implicitHeight: Math.round(contentColumn.implicitHeight + Style.marginL * 2)
implicitHeight: Math.round(contentColumn.implicitHeight + Style.margin2L)
color: Color.mSurface
ColumnLayout {
@@ -205,8 +205,8 @@ ColumnLayout {
visible: modelData.official === true
color: Color.mSecondary
radius: Style.radiusXS
implicitWidth: officialBadgeRow.implicitWidth + Style.marginS * 2
implicitHeight: officialBadgeRow.implicitHeight + Style.marginXS * 2
implicitWidth: officialBadgeRow.implicitWidth + Style.margin2S
implicitHeight: officialBadgeRow.implicitHeight + Style.margin2XS
RowLayout {
id: officialBadgeRow
@@ -147,7 +147,7 @@ ColumnLayout {
Layout.fillWidth: true
Layout.leftMargin: Style.borderS
Layout.rightMargin: Style.borderS
implicitHeight: Math.round(contentColumn.implicitHeight + Style.marginL * 2)
implicitHeight: Math.round(contentColumn.implicitHeight + Style.margin2L)
color: Color.mSurface
ColumnLayout {
@@ -178,8 +178,8 @@ ColumnLayout {
visible: modelData.official === true
color: Color.mSecondary
radius: Style.radiusXS
implicitWidth: officialBadgeRow.implicitWidth + Style.marginS * 2
implicitHeight: officialBadgeRow.implicitHeight + Style.marginXS * 2
implicitWidth: officialBadgeRow.implicitWidth + Style.margin2S
implicitHeight: officialBadgeRow.implicitHeight + Style.margin2XS
RowLayout {
id: officialBadgeRow
@@ -22,7 +22,7 @@ ColumnLayout {
delegate: NBox {
Layout.fillWidth: true
implicitHeight: sourceRow.implicitHeight + Style.marginL * 2
implicitHeight: sourceRow.implicitHeight + Style.margin2L
color: Color.mSurface
RowLayout {
@@ -138,7 +138,7 @@ ColumnLayout {
color: Color.mSurface
border.color: Color.mOutline
border.width: Style.borderS
implicitHeight: contentCol.implicitHeight + Style.marginL * 2
implicitHeight: contentCol.implicitHeight + Style.margin2L
clip: true
ColumnLayout {
@@ -263,7 +263,7 @@ ColumnLayout {
radius: Style.radiusM
border.width: Style.borderS
Layout.preferredHeight: 32
Layout.preferredWidth: Math.max(90, densityText.implicitWidth + Style.marginXL * 2)
Layout.preferredWidth: Math.max(90, densityText.implicitWidth + Style.margin2XL)
property bool isActive: Settings.data.bar.density === modelData.key
+1 -1
View File
@@ -260,7 +260,7 @@ SmartPanel {
NText {
anchors.centerIn: parent
width: parent.width - Style.marginL * 2
width: parent.width - Style.margin2L
text: root.telemetryOnlyMode ? I18n.tr("setup.telemetry-wizard-note") : I18n.tr("setup.welcome-note")
pointSize: Style.fontSizeM
color: Color.mOnSurfaceVariant
@@ -18,7 +18,7 @@ SmartPanel {
panelContent: Item {
id: panelContent
property real contentPreferredHeight: mainColumn.implicitHeight + Style.marginL * 2
property real contentPreferredHeight: mainColumn.implicitHeight + Style.margin2L
readonly property real cardHeight: 90 * Style.uiScaleRatio
// Get diskPath from bar's SystemMonitor widget if available, otherwise use "/"
@@ -19,8 +19,8 @@ Popup {
}
// Dynamic width: use measured ENV placeholder width + input padding, or fallback to 440
width: Math.max(440, Math.round(envPlaceholderMetrics.width + (Style.marginL * 4)), Math.round(contentColumn.implicitWidth + (Style.marginL * 2)))
height: Math.round(contentColumn.implicitHeight + (Style.marginL * 2))
width: Math.max(440, Math.round(envPlaceholderMetrics.width + (Style.marginL * 4)), Math.round(contentColumn.implicitWidth + Style.margin2L))
height: Math.round(contentColumn.implicitHeight + Style.margin2L)
padding: Style.marginL
modal: true
dim: false
+1 -1
View File
@@ -264,7 +264,7 @@ SmartPanel {
// Header
NBox {
Layout.fillWidth: true
Layout.preferredHeight: headerColumn.implicitHeight + Style.marginL * 2
Layout.preferredHeight: headerColumn.implicitHeight + Style.margin2L
color: Color.mSurfaceVariant
ColumnLayout {
+1 -1
View File
@@ -159,7 +159,7 @@ ColumnLayout {
border.width: Style.borderS
// Dynamic height based on content
Layout.preferredHeight: expanded ? contentLayout.implicitHeight + (Style.marginL * 2) : 0
Layout.preferredHeight: expanded ? contentLayout.implicitHeight + Style.margin2L : 0
// Smooth height animation
Behavior on Layout.preferredHeight {
+1 -1
View File
@@ -134,7 +134,7 @@ Popup {
// Main Box
NBox {
Layout.fillWidth: true
Layout.preferredHeight: controlsOutterColumn.implicitHeight + Style.marginL * 2
Layout.preferredHeight: controlsOutterColumn.implicitHeight + Style.margin2L
ButtonGroup {
id: colorValues
+1 -1
View File
@@ -268,7 +268,7 @@ RowLayout {
property bool isHighlighted: listView.currentIndex === index
width: listView.availableWidth
height: delegateText.implicitHeight + Style.marginS * 2
height: delegateText.implicitHeight + Style.margin2S
radius: Style.iRadiusS
color: isHighlighted ? Color.mHover : "transparent"
+2 -2
View File
@@ -33,7 +33,7 @@ PopupWindow {
signal triggered(string action, var item)
implicitWidth: calculatedWidth
implicitHeight: Math.min(600, flickable.contentHeight + (Style.marginS * 2))
implicitHeight: Math.min(600, flickable.contentHeight + Style.margin2S)
visible: false
color: "transparent"
@@ -82,7 +82,7 @@ PopupWindow {
}
}
}
calculatedWidth = Math.max(maxWidth + (Style.marginS * 2), minWidth);
calculatedWidth = Math.max(maxWidth + Style.margin2S, minWidth);
}
anchor.item: anchorItem
+4 -4
View File
@@ -160,7 +160,7 @@ NBox {
Layout.minimumHeight: {
// header + minimal content area
var absoluteMin = (Style.marginL * 2) + (Style.fontSizeL * 2) + Style.marginM + (65 * Style.uiScaleRatio);
var absoluteMin = Style.margin2L + (Style.fontSizeL * 2) + Style.marginM + (65 * Style.uiScaleRatio);
var widgetCount = widgetModel.length;
if (widgetCount === 0) {
@@ -169,7 +169,7 @@ NBox {
// Calculate rows based on grid layout
// Use actual parent width if available, otherwise estimate
var availableWidth = (parent && parent.width > 0) ? (parent.width - (Style.marginL * 2)) : 400;
var availableWidth = (parent && parent.width > 0) ? (parent.width - Style.margin2L) : 400;
var rows = Math.ceil(widgetCount / root.gridColumns);
// Calculate widget width for height calculation
@@ -183,7 +183,7 @@ NBox {
var gridBottomMargin = Style.marginL;
var widgetAreaHeight = gridTopMargin + (rows * widgetItemHeight) + ((rows - 1) * Style.marginL) + gridBottomMargin;
return Math.max(absoluteMin, (Style.marginL * 2) + headerHeight + Style.marginM + widgetAreaHeight);
return Math.max(absoluteMin, Style.margin2L + headerHeight + Style.marginM + widgetAreaHeight);
}
// Generate widget color from name checksum
@@ -404,7 +404,7 @@ NBox {
var calculatedHeight = gridTopMargin + (rows * root.widgetItemHeight) + ((rows - 1) * Style.marginS) + gridBottomMargin;
return calculatedHeight;
}
Layout.minimumHeight: widgetModel.length === 0 ? (65 * Style.uiScaleRatio) : ((Style.marginS * 2) + root.widgetItemHeight)
Layout.minimumHeight: widgetModel.length === 0 ? (65 * Style.uiScaleRatio) : (Style.margin2S + root.widgetItemHeight)
clip: !flowDragArea.dragStarted
Rectangle {
+1 -1
View File
@@ -49,7 +49,7 @@ Rectangle {
RowLayout {
id: contentLayout
anchors.centerIn: parent
width: Math.min(implicitWidth, parent.width - (Style.marginS * 2))
width: Math.min(implicitWidth, parent.width - Style.margin2S)
spacing: (root.icon !== "" && root.text !== "") ? Style.marginXS : 0
NIcon {