From db56321f54605ce9c596511984f8845e7e274f66 Mon Sep 17 00:00:00 2001 From: Lemmy Date: Fri, 20 Feb 2026 21:11:06 -0500 Subject: [PATCH] layout: more double margins implementations --- Modules/Bar/Extras/TrayMenu.qml | 4 ++-- Modules/Bar/Widgets/ActiveWindow.qml | 2 +- Modules/Bar/Widgets/Battery.qml | 4 ++-- Modules/Bar/Widgets/Clock.qml | 2 +- Modules/Bar/Widgets/MediaMini.qml | 2 +- Modules/Bar/Widgets/Taskbar.qml | 2 +- Modules/Bar/Widgets/Workspace.qml | 2 +- Modules/Cards/CalendarHeaderCard.qml | 2 +- Modules/Cards/WeatherCard.qml | 2 +- Modules/DesktopWidgets/DesktopWidgets.qml | 4 ++-- Modules/Dock/DockMenu.qml | 2 +- Modules/LockScreen/LockScreenHeader.qml | 2 +- Modules/OSD/OSD.qml | 12 ++++++------ Modules/Panels/Battery/BatteryPanel.qml | 6 +++--- Modules/Panels/Bluetooth/BluetoothPanel.qml | 2 +- Modules/Panels/Brightness/BrightnessPanel.qml | 2 +- Modules/Panels/Clock/ClockPanel.qml | 4 ++-- .../ControlCenter/ControlCenterPanel.qml | 2 +- Modules/Panels/Launcher/ClipboardPreview.qml | 2 +- Modules/Panels/Launcher/Launcher.qml | 2 +- .../Panels/Launcher/LauncherOverlayWindow.qml | 2 +- Modules/Panels/Network/NetworkPanel.qml | 6 +++--- Modules/Panels/Network/WiFiNetworksList.qml | 14 +++++++------- .../NotificationHistoryPanel.qml | 8 ++++---- Modules/Panels/SessionMenu/SessionMenu.qml | 6 +++--- .../Settings/Bar/MonitorWidgetsConfig.qml | 2 +- Modules/Panels/Settings/SettingsContent.qml | 18 +++++++++--------- .../Settings/Tabs/Bar/MonitorsSubTab.qml | 2 +- .../Settings/Tabs/ColorScheme/ColorsSubTab.qml | 2 +- .../Tabs/ColorScheme/SchemeDownloader.qml | 4 ++-- .../Tabs/ColorScheme/TemplatesSubTab.qml | 2 +- .../Tabs/Connections/BluetoothSubTab.qml | 8 ++++---- .../Settings/Tabs/Connections/WifiSubTab.qml | 2 +- .../Settings/Tabs/Display/BrightnessSubTab.qml | 2 +- .../Tabs/Notifications/SoundSubTab.qml | 2 +- .../Settings/Tabs/Plugins/AvailableSubTab.qml | 6 +++--- .../Settings/Tabs/Plugins/InstalledSubTab.qml | 6 +++--- .../Settings/Tabs/Plugins/SourcesSubTab.qml | 2 +- .../Settings/Tabs/Wallpaper/GeneralSubTab.qml | 2 +- .../Panels/SetupWizard/SetupCustomizeStep.qml | 2 +- Modules/Panels/SetupWizard/SetupWizard.qml | 2 +- .../Panels/SystemStats/SystemStatsPanel.qml | 2 +- .../Wallpaper/WallhavenSettingsPopup.qml | 4 ++-- Modules/Panels/Wallpaper/WallpaperPanel.qml | 2 +- Widgets/NCollapsible.qml | 2 +- Widgets/NColorPickerDialog.qml | 2 +- Widgets/NComboBox.qml | 2 +- Widgets/NPopupContextMenu.qml | 4 ++-- Widgets/NSectionEditor.qml | 8 ++++---- Widgets/NTabButton.qml | 2 +- 50 files changed, 95 insertions(+), 95 deletions(-) diff --git a/Modules/Bar/Extras/TrayMenu.qml b/Modules/Bar/Extras/TrayMenu.qml index d1b133f93..ab11985a9 100644 --- a/Modules/Bar/Extras/TrayMenu.qml +++ b/Modules/Bar/Extras/TrayMenu.qml @@ -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); } } diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index 2775653c8..f31e82802 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -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) { diff --git a/Modules/Bar/Widgets/Battery.qml b/Modules/Bar/Widgets/Battery.qml index e485694d6..e9ee2537c 100644 --- a/Modules/Bar/Widgets/Battery.qml +++ b/Modules/Bar/Widgets/Battery.qml @@ -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 diff --git a/Modules/Bar/Widgets/Clock.qml b/Modules/Bar/Widgets/Clock.qml index fce20cf09..58040608c 100644 --- a/Modules/Bar/Widgets/Clock.qml +++ b/Modules/Bar/Widgets/Clock.qml @@ -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 diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index 427fa3b85..48fdf195f 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -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; diff --git a/Modules/Bar/Widgets/Taskbar.qml b/Modules/Bar/Widgets/Taskbar.qml index 211893dfd..afdd42bd5 100644 --- a/Modules/Bar/Widgets/Taskbar.qml +++ b/Modules/Bar/Widgets/Taskbar.qml @@ -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 diff --git a/Modules/Bar/Widgets/Workspace.qml b/Modules/Bar/Widgets/Workspace.qml index e31c7ae90..258cb06f2 100644 --- a/Modules/Bar/Widgets/Workspace.qml +++ b/Modules/Bar/Widgets/Workspace.qml @@ -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 { diff --git a/Modules/Cards/CalendarHeaderCard.qml b/Modules/Cards/CalendarHeaderCard.qml index 94146fc96..45a181bb8 100644 --- a/Modules/Cards/CalendarHeaderCard.qml +++ b/Modules/Cards/CalendarHeaderCard.qml @@ -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 diff --git a/Modules/Cards/WeatherCard.qml b/Modules/Cards/WeatherCard.qml index 4e42b89f1..cb0f02745 100644 --- a/Modules/Cards/WeatherCard.qml +++ b/Modules/Cards/WeatherCard.qml @@ -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 { diff --git a/Modules/DesktopWidgets/DesktopWidgets.qml b/Modules/DesktopWidgets/DesktopWidgets.qml index a2f78c73c..d40027f07 100644 --- a/Modules/DesktopWidgets/DesktopWidgets.qml +++ b/Modules/DesktopWidgets/DesktopWidgets.qml @@ -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 diff --git a/Modules/Dock/DockMenu.qml b/Modules/Dock/DockMenu.qml index 374092b70..86dd1d084 100644 --- a/Modules/Dock/DockMenu.qml +++ b/Modules/Dock/DockMenu.qml @@ -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 diff --git a/Modules/LockScreen/LockScreenHeader.qml b/Modules/LockScreen/LockScreenHeader.qml index 10616f585..b1b169aca 100644 --- a/Modules/LockScreen/LockScreenHeader.qml +++ b/Modules/LockScreen/LockScreenHeader.qml @@ -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 { diff --git a/Modules/OSD/OSD.qml b/Modules/OSD/OSD.qml index 6c57f42bd..e7c27b36e 100644 --- a/Modules/OSD/OSD.qml +++ b/Modules/OSD/OSD.qml @@ -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) diff --git a/Modules/Panels/Battery/BatteryPanel.qml b/Modules/Panels/Battery/BatteryPanel.qml index 328934bf9..5bb03a587 100644 --- a/Modules/Panels/Battery/BatteryPanel.qml +++ b/Modules/Panels/Battery/BatteryPanel.qml @@ -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 { diff --git a/Modules/Panels/Bluetooth/BluetoothPanel.qml b/Modules/Panels/Bluetooth/BluetoothPanel.qml index 6fd42d005..c416829e6 100644 --- a/Modules/Panels/Bluetooth/BluetoothPanel.qml +++ b/Modules/Panels/Bluetooth/BluetoothPanel.qml @@ -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 diff --git a/Modules/Panels/Brightness/BrightnessPanel.qml b/Modules/Panels/Brightness/BrightnessPanel.qml index 795362feb..f0fdd99d0 100644 --- a/Modules/Panels/Brightness/BrightnessPanel.qml +++ b/Modules/Panels/Brightness/BrightnessPanel.qml @@ -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 diff --git a/Modules/Panels/Clock/ClockPanel.qml b/Modules/Panels/Clock/ClockPanel.qml index 540f4ddba..5ab12dbb6 100644 --- a/Modules/Panels/Clock/ClockPanel.qml +++ b/Modules/Panels/Clock/ClockPanel.qml @@ -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 diff --git a/Modules/Panels/ControlCenter/ControlCenterPanel.qml b/Modules/Panels/ControlCenter/ControlCenterPanel.qml index b033d74b3..e652e6753 100644 --- a/Modules/Panels/ControlCenter/ControlCenterPanel.qml +++ b/Modules/Panels/ControlCenter/ControlCenterPanel.qml @@ -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 { diff --git a/Modules/Panels/Launcher/ClipboardPreview.qml b/Modules/Panels/Launcher/ClipboardPreview.qml index 04edb6a1b..9b7ebcbfa 100644 --- a/Modules/Panels/Launcher/ClipboardPreview.qml +++ b/Modules/Panels/Launcher/ClipboardPreview.qml @@ -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) diff --git a/Modules/Panels/Launcher/Launcher.qml b/Modules/Panels/Launcher/Launcher.qml index b15ec8f9d..b055fdf1b 100644 --- a/Modules/Panels/Launcher/Launcher.qml +++ b/Modules/Panels/Launcher/Launcher.qml @@ -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) diff --git a/Modules/Panels/Launcher/LauncherOverlayWindow.qml b/Modules/Panels/Launcher/LauncherOverlayWindow.qml index 6af32741c..7aa2bc005 100644 --- a/Modules/Panels/Launcher/LauncherOverlayWindow.qml +++ b/Modules/Panels/Launcher/LauncherOverlayWindow.qml @@ -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 diff --git a/Modules/Panels/Network/NetworkPanel.qml b/Modules/Panels/Network/NetworkPanel.qml index 110a3b418..4a8e4273b 100644 --- a/Modules/Panels/Network/NetworkPanel.qml +++ b/Modules/Panels/Network/NetworkPanel.qml @@ -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 diff --git a/Modules/Panels/Network/WiFiNetworksList.qml b/Modules/Panels/Network/WiFiNetworksList.qml index 8edc17055..c348bba42 100644 --- a/Modules/Panels/Network/WiFiNetworksList.qml +++ b/Modules/Panels/Network/WiFiNetworksList.qml @@ -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 diff --git a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml index 521e9e761..0f54bfc20 100644 --- a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml +++ b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml @@ -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 diff --git a/Modules/Panels/SessionMenu/SessionMenu.qml b/Modules/Panels/SessionMenu/SessionMenu.qml index 365d841a0..6bec07971 100644 --- a/Modules/Panels/SessionMenu/SessionMenu.qml +++ b/Modules/Panels/SessionMenu/SessionMenu.qml @@ -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 diff --git a/Modules/Panels/Settings/Bar/MonitorWidgetsConfig.qml b/Modules/Panels/Settings/Bar/MonitorWidgetsConfig.qml index 711b94abe..7cb47a8c4 100644 --- a/Modules/Panels/Settings/Bar/MonitorWidgetsConfig.qml +++ b/Modules/Panels/Settings/Bar/MonitorWidgetsConfig.qml @@ -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() { diff --git a/Modules/Panels/Settings/SettingsContent.qml b/Modules/Panels/Settings/SettingsContent.qml index 61a7fd3b6..c4ba6ddad 100644 --- a/Modules/Panels/Settings/SettingsContent.qml +++ b/Modules/Panels/Settings/SettingsContent.qml @@ -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 diff --git a/Modules/Panels/Settings/Tabs/Bar/MonitorsSubTab.qml b/Modules/Panels/Settings/Tabs/Bar/MonitorsSubTab.qml index ea664ecee..1ec6c73b6 100644 --- a/Modules/Panels/Settings/Tabs/Bar/MonitorsSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Bar/MonitorsSubTab.qml @@ -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 diff --git a/Modules/Panels/Settings/Tabs/ColorScheme/ColorsSubTab.qml b/Modules/Panels/Settings/Tabs/ColorScheme/ColorsSubTab.qml index 0f434060a..bce6e6af4 100644 --- a/Modules/Panels/Settings/Tabs/ColorScheme/ColorsSubTab.qml +++ b/Modules/Panels/Settings/Tabs/ColorScheme/ColorsSubTab.qml @@ -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 { diff --git a/Modules/Panels/Settings/Tabs/ColorScheme/SchemeDownloader.qml b/Modules/Panels/Settings/Tabs/ColorScheme/SchemeDownloader.qml index 6dccf5fbd..e9e59cf4c 100644 --- a/Modules/Panels/Settings/Tabs/ColorScheme/SchemeDownloader.qml +++ b/Modules/Panels/Settings/Tabs/ColorScheme/SchemeDownloader.qml @@ -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 diff --git a/Modules/Panels/Settings/Tabs/ColorScheme/TemplatesSubTab.qml b/Modules/Panels/Settings/Tabs/ColorScheme/TemplatesSubTab.qml index 432f9749e..ae81cffdd 100644 --- a/Modules/Panels/Settings/Tabs/ColorScheme/TemplatesSubTab.qml +++ b/Modules/Panels/Settings/Tabs/ColorScheme/TemplatesSubTab.qml @@ -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) diff --git a/Modules/Panels/Settings/Tabs/Connections/BluetoothSubTab.qml b/Modules/Panels/Settings/Tabs/Connections/BluetoothSubTab.qml index e16010a03..f74ae5b63 100644 --- a/Modules/Panels/Settings/Tabs/Connections/BluetoothSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Connections/BluetoothSubTab.qml @@ -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 diff --git a/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml b/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml index 98140834d..b9175d7ad 100644 --- a/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Connections/WifiSubTab.qml @@ -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 { diff --git a/Modules/Panels/Settings/Tabs/Display/BrightnessSubTab.qml b/Modules/Panels/Settings/Tabs/Display/BrightnessSubTab.qml index 37fcc350f..e74affea3 100644 --- a/Modules/Panels/Settings/Tabs/Display/BrightnessSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Display/BrightnessSubTab.qml @@ -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) diff --git a/Modules/Panels/Settings/Tabs/Notifications/SoundSubTab.qml b/Modules/Panels/Settings/Tabs/Notifications/SoundSubTab.qml index d6f76959e..3b6497b6e 100644 --- a/Modules/Panels/Settings/Tabs/Notifications/SoundSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Notifications/SoundSubTab.qml @@ -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 diff --git a/Modules/Panels/Settings/Tabs/Plugins/AvailableSubTab.qml b/Modules/Panels/Settings/Tabs/Plugins/AvailableSubTab.qml index 3c099101e..24d0ae3fb 100644 --- a/Modules/Panels/Settings/Tabs/Plugins/AvailableSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Plugins/AvailableSubTab.qml @@ -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 diff --git a/Modules/Panels/Settings/Tabs/Plugins/InstalledSubTab.qml b/Modules/Panels/Settings/Tabs/Plugins/InstalledSubTab.qml index 4c7d4b002..cb76a6479 100644 --- a/Modules/Panels/Settings/Tabs/Plugins/InstalledSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Plugins/InstalledSubTab.qml @@ -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 diff --git a/Modules/Panels/Settings/Tabs/Plugins/SourcesSubTab.qml b/Modules/Panels/Settings/Tabs/Plugins/SourcesSubTab.qml index 7948a276a..5adeba916 100644 --- a/Modules/Panels/Settings/Tabs/Plugins/SourcesSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Plugins/SourcesSubTab.qml @@ -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 { diff --git a/Modules/Panels/Settings/Tabs/Wallpaper/GeneralSubTab.qml b/Modules/Panels/Settings/Tabs/Wallpaper/GeneralSubTab.qml index dec27a3bf..e7a55d171 100644 --- a/Modules/Panels/Settings/Tabs/Wallpaper/GeneralSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Wallpaper/GeneralSubTab.qml @@ -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 { diff --git a/Modules/Panels/SetupWizard/SetupCustomizeStep.qml b/Modules/Panels/SetupWizard/SetupCustomizeStep.qml index 87e018d82..0666eb14f 100644 --- a/Modules/Panels/SetupWizard/SetupCustomizeStep.qml +++ b/Modules/Panels/SetupWizard/SetupCustomizeStep.qml @@ -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 diff --git a/Modules/Panels/SetupWizard/SetupWizard.qml b/Modules/Panels/SetupWizard/SetupWizard.qml index 9acb42c92..490e2a337 100644 --- a/Modules/Panels/SetupWizard/SetupWizard.qml +++ b/Modules/Panels/SetupWizard/SetupWizard.qml @@ -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 diff --git a/Modules/Panels/SystemStats/SystemStatsPanel.qml b/Modules/Panels/SystemStats/SystemStatsPanel.qml index ce1a91f4a..6461dee98 100644 --- a/Modules/Panels/SystemStats/SystemStatsPanel.qml +++ b/Modules/Panels/SystemStats/SystemStatsPanel.qml @@ -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 "/" diff --git a/Modules/Panels/Wallpaper/WallhavenSettingsPopup.qml b/Modules/Panels/Wallpaper/WallhavenSettingsPopup.qml index a0caffce6..f19858ad8 100644 --- a/Modules/Panels/Wallpaper/WallhavenSettingsPopup.qml +++ b/Modules/Panels/Wallpaper/WallhavenSettingsPopup.qml @@ -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 diff --git a/Modules/Panels/Wallpaper/WallpaperPanel.qml b/Modules/Panels/Wallpaper/WallpaperPanel.qml index 1ed33d65c..ff53731de 100644 --- a/Modules/Panels/Wallpaper/WallpaperPanel.qml +++ b/Modules/Panels/Wallpaper/WallpaperPanel.qml @@ -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 { diff --git a/Widgets/NCollapsible.qml b/Widgets/NCollapsible.qml index 37f8bf6a3..de5193387 100644 --- a/Widgets/NCollapsible.qml +++ b/Widgets/NCollapsible.qml @@ -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 { diff --git a/Widgets/NColorPickerDialog.qml b/Widgets/NColorPickerDialog.qml index 540895d67..315b0d55d 100644 --- a/Widgets/NColorPickerDialog.qml +++ b/Widgets/NColorPickerDialog.qml @@ -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 diff --git a/Widgets/NComboBox.qml b/Widgets/NComboBox.qml index 09a5b7649..a2a0fe5d6 100644 --- a/Widgets/NComboBox.qml +++ b/Widgets/NComboBox.qml @@ -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" diff --git a/Widgets/NPopupContextMenu.qml b/Widgets/NPopupContextMenu.qml index ff8621607..cb1cde810 100644 --- a/Widgets/NPopupContextMenu.qml +++ b/Widgets/NPopupContextMenu.qml @@ -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 diff --git a/Widgets/NSectionEditor.qml b/Widgets/NSectionEditor.qml index 68626d239..7268b3de4 100644 --- a/Widgets/NSectionEditor.qml +++ b/Widgets/NSectionEditor.qml @@ -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 { diff --git a/Widgets/NTabButton.qml b/Widgets/NTabButton.qml index 8a3e4a6ff..e0cf4a233 100644 --- a/Widgets/NTabButton.qml +++ b/Widgets/NTabButton.qml @@ -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 {