Qt-Scaling: first cleanup pass

This commit is contained in:
ItsLemmy
2025-10-12 08:23:24 -04:00
parent d5d654e010
commit f4b27380c3
135 changed files with 1562 additions and 1811 deletions
+22 -22
View File
@@ -273,7 +273,7 @@ NPanel {
// Main layout container that fills the panel
ColumnLayout {
anchors.fill: parent
anchors.margins: Style.marginL * scaling
anchors.margins: Style.marginL
spacing: 0
// Keyboard shortcuts container
@@ -336,18 +336,18 @@ NPanel {
RowLayout {
Layout.fillWidth: true
Layout.fillHeight: true
spacing: Style.marginM * scaling
spacing: Style.marginM
// Sidebar
Rectangle {
id: sidebar
Layout.preferredWidth: 220 * scaling
Layout.preferredWidth: 220
Layout.fillHeight: true
Layout.alignment: Qt.AlignTop
color: Color.mSurfaceVariant
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS * scaling)
radius: Style.radiusM * scaling
border.width: Math.max(1, Style.borderS)
radius: Style.radiusM
MouseArea {
anchors.fill: parent
@@ -368,8 +368,8 @@ NPanel {
ColumnLayout {
anchors.fill: parent
anchors.margins: Style.marginS * scaling
spacing: Style.marginXS * scaling
anchors.margins: Style.marginS
spacing: Style.marginXS
Repeater {
id: sections
@@ -377,8 +377,8 @@ NPanel {
delegate: Rectangle {
id: tabItem
Layout.fillWidth: true
Layout.preferredHeight: tabEntryRow.implicitHeight + Style.marginS * scaling * 2
radius: Style.radiusS * scaling
Layout.preferredHeight: tabEntryRow.implicitHeight + Style.marginS * 2
radius: Style.radiusS
color: selected ? Color.mPrimary : (tabItem.hovering ? Color.mTertiary : Color.transparent)
readonly property bool selected: index === currentTabIndex
property bool hovering: false
@@ -399,22 +399,22 @@ NPanel {
RowLayout {
id: tabEntryRow
anchors.fill: parent
anchors.leftMargin: Style.marginS * scaling
anchors.rightMargin: Style.marginS * scaling
spacing: Style.marginM * scaling
anchors.leftMargin: Style.marginS
anchors.rightMargin: Style.marginS
spacing: Style.marginM
// Tab icon
NIcon {
icon: modelData.icon
color: tabTextColor
pointSize: Style.fontSizeXL * scaling
pointSize: Style.fontSizeXL
}
// Tab label
NText {
text: I18n.tr(modelData.label)
color: tabTextColor
pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM
font.weight: Style.fontWeightBold
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
@@ -445,34 +445,34 @@ NPanel {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.alignment: Qt.AlignTop
radius: Style.radiusM * scaling
radius: Style.radiusM
color: Color.mSurfaceVariant
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS * scaling)
border.width: Math.max(1, Style.borderS)
ColumnLayout {
id: contentLayout
anchors.fill: parent
anchors.margins: Style.marginL * scaling
spacing: Style.marginS * scaling
anchors.margins: Style.marginL
spacing: Style.marginS
// Header row
RowLayout {
id: headerRow
Layout.fillWidth: true
spacing: Style.marginS * scaling
spacing: Style.marginS
// Main icon
NIcon {
icon: root.tabsModel[currentTabIndex]?.icon
color: Color.mPrimary
pointSize: Style.fontSizeXXL * scaling
pointSize: Style.fontSizeXXL
}
// Main title
NText {
text: I18n.tr(root.tabsModel[currentTabIndex]?.label) || ""
pointSize: Style.fontSizeXL * scaling
pointSize: Style.fontSizeXL
font.weight: Style.fontWeightBold
color: Color.mPrimary
Layout.fillWidth: true
@@ -527,7 +527,7 @@ NPanel {
anchors.fill: parent
horizontalPolicy: ScrollBar.AlwaysOff
verticalPolicy: ScrollBar.AsNeeded
padding: Style.marginL * scaling
padding: Style.marginL
Component.onCompleted: {
root.activeScrollView = scrollView
}