Replace tons of hardcoded stuff
This commit is contained in:
parent
2a5a3a1b78
commit
c673b897cb
27 changed files with 155 additions and 161 deletions
|
|
@ -107,11 +107,11 @@ ColumnLayout {
|
|||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.topMargin: Style.marginSmall * scaling
|
||||
Layout.preferredWidth: updateText.implicitWidth + 46 * scaling
|
||||
Layout.preferredHeight: 32 * scaling
|
||||
Layout.preferredHeight: Style.barHeight * scaling
|
||||
radius: Style.radiusLarge * scaling
|
||||
color: updateArea.containsMouse ? Colors.mPrimary : "transparent"
|
||||
border.color: Colors.mPrimary
|
||||
border.width: 1
|
||||
border.width: Math.max(1, Style.borderThin * scaling)
|
||||
visible: {
|
||||
if (root.currentVersion === "Unknown" || root.latestVersion === "Unknown")
|
||||
return false
|
||||
|
|
@ -132,19 +132,19 @@ ColumnLayout {
|
|||
|
||||
RowLayout {
|
||||
anchors.centerIn: parent
|
||||
spacing: 8
|
||||
spacing: Style.marginSmall * scaling
|
||||
|
||||
NText {
|
||||
text: "system_update"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pointSize: 18 * scaling
|
||||
font.pointSize: Style.fontSizeXL * scaling
|
||||
color: updateArea.containsMouse ? Colors.mSurface : Colors.mPrimary
|
||||
}
|
||||
|
||||
NText {
|
||||
id: updateText
|
||||
text: "Download latest release"
|
||||
font.pointSize: 14 * scaling
|
||||
font.pointSize: Style.fontSizeLarge * scaling
|
||||
color: updateArea.containsMouse ? Colors.mSurface : Colors.mPrimary
|
||||
}
|
||||
}
|
||||
|
|
@ -191,8 +191,8 @@ ColumnLayout {
|
|||
anchors.fill: parent
|
||||
width: 200 * 4 * scaling
|
||||
height: Math.ceil(root.contributors.length / 4) * 100
|
||||
cellWidth: 200 * scaling
|
||||
cellHeight: 100 * scaling
|
||||
cellWidth: Style.baseWidgetSize * 6.25 * scaling
|
||||
cellHeight: Style.baseWidgetSize * 3.125 * scaling
|
||||
model: root.contributors
|
||||
|
||||
delegate: Rectangle {
|
||||
|
|
@ -208,8 +208,8 @@ ColumnLayout {
|
|||
|
||||
Item {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.preferredWidth: 64 * scaling
|
||||
Layout.preferredHeight: 64 * scaling
|
||||
Layout.preferredWidth: Style.baseWidgetSize * 2 * scaling
|
||||
Layout.preferredHeight: Style.baseWidgetSize * 2 * scaling
|
||||
|
||||
NImageRounded {
|
||||
imagePath: modelData.avatar_url || ""
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ ColumnLayout {
|
|||
// Probably because they have some quick fades in and out to avoid clipping
|
||||
// We use a timer to space out the updates, to avoid lock up
|
||||
Timer {
|
||||
interval: 100
|
||||
interval: Style.animationFast
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ ColumnLayout {
|
|||
// Array to hold FileView objects
|
||||
property var fileViews: []
|
||||
|
||||
// Scale properties for card animations
|
||||
property real cardScaleLow: 0.95
|
||||
property real cardScaleHigh: 1.0
|
||||
|
||||
// Load color scheme data when schemes are available
|
||||
Connections {
|
||||
target: ColorSchemes
|
||||
|
|
@ -100,8 +104,6 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
function schemeLoaded(schemeName, jsonData) {
|
||||
console.log("Loading scheme colors for:", schemeName)
|
||||
|
||||
var colors = {}
|
||||
|
||||
// Extract colors from JSON data
|
||||
|
|
@ -130,8 +132,6 @@ ColumnLayout {
|
|||
var newCache = schemeColorsCache
|
||||
newCache[schemeName] = colors
|
||||
schemeColorsCache = newCache
|
||||
|
||||
console.log("Cached colors for", schemeName, ":", JSON.stringify(colors))
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
|
|
@ -212,9 +212,6 @@ ColumnLayout {
|
|||
Repeater {
|
||||
model: ColorSchemes.schemes
|
||||
|
||||
property real cardScaleLow: 0.95
|
||||
property real cardScaleHigh: 1.00
|
||||
|
||||
Rectangle {
|
||||
id: schemeCard
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -223,7 +220,7 @@ ColumnLayout {
|
|||
color: getSchemeColor(modelData, "mSurface")
|
||||
border.width: Math.max(1, Style.borderThick * scaling)
|
||||
border.color: Settings.data.colorSchemes.predefinedScheme === modelData ? Colors.mPrimary : Colors.mOutline
|
||||
scale: cardScaleLow
|
||||
scale: root.cardScaleLow
|
||||
|
||||
property string schemePath: modelData
|
||||
|
||||
|
|
@ -240,11 +237,11 @@ ColumnLayout {
|
|||
cursorShape: Qt.PointingHandCursor
|
||||
|
||||
onEntered: {
|
||||
schemeCard.scale = cardScaleHight
|
||||
schemeCard.scale = root.cardScaleHigh
|
||||
}
|
||||
|
||||
onExited: {
|
||||
schemeCard.scale = cardScaleLow
|
||||
schemeCard.scale = root.cardScaleLow
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -287,7 +284,7 @@ ColumnLayout {
|
|||
Rectangle {
|
||||
width: 28 * scaling
|
||||
height: 28 * scaling
|
||||
radius: 14 * scaling
|
||||
radius: Style.radiusSmall * scaling
|
||||
color: getSchemeColor(modelData, "mSecondary")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ ColumnLayout {
|
|||
font.pointSize: Style.fontSizeXL * scaling
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Colors.mOnSurface
|
||||
Layout.bottomMargin: 8
|
||||
Layout.bottomMargin: Style.marginSmall * scaling
|
||||
}
|
||||
|
||||
NToggle {
|
||||
|
|
|
|||
|
|
@ -149,8 +149,7 @@ Item {
|
|||
anchors.margins: Style.marginTiny * scaling
|
||||
imagePath: wallpaperPath
|
||||
fallbackIcon: "image"
|
||||
borderColor: "transparent"
|
||||
borderWidth: 0
|
||||
|
||||
imageRadius: Style.radiusMedium * scaling
|
||||
}
|
||||
|
||||
|
|
@ -185,7 +184,7 @@ Item {
|
|||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 150
|
||||
duration: Style.animationFast
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -235,7 +234,7 @@ Item {
|
|||
color: Colors.mOnSurface
|
||||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.preferredWidth: 300 * scaling
|
||||
Layout.preferredWidth: Style.sliderWidth * 1.5 * scaling
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ ColumnLayout {
|
|||
font.pointSize: Style.fontSizeXL * scaling
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Colors.mOnSurface
|
||||
Layout.bottomMargin: 8
|
||||
Layout.bottomMargin: Style.marginSmall * scaling
|
||||
}
|
||||
|
||||
// Use SWWW
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue