Edit NButton alignment

This commit is contained in:
Ly-sec 2025-09-07 15:33:47 +02:00
parent c14eb95dba
commit 888ba108e0
4 changed files with 10 additions and 1 deletions

View file

@ -113,6 +113,7 @@ Popup {
NButton {
text: "Apply"
icon: "check"
onClicked: {
if (settingsLoader.item && settingsLoader.item.saveSettings) {
var newSettings = settingsLoader.item.saveSettings()

View file

@ -77,10 +77,12 @@ Rectangle {
RowLayout {
id: contentRow
anchors.centerIn: parent
spacing: Style.marginS * scaling
spacing: Style.marginXS * scaling
// Icon (optional)
NIcon {
Layout.alignment: Qt.AlignVCenter
layoutTopMargin: 1 * scaling
visible: root.icon !== ""
text: root.icon
font.pointSize: root.iconSize
@ -105,6 +107,7 @@ Rectangle {
// Text
NText {
Layout.alignment: Qt.AlignVCenter
visible: root.text !== ""
text: root.text
font.pointSize: root.fontSize

View file

@ -1,8 +1,11 @@
import QtQuick
import qs.Commons
import qs.Widgets
import QtQuick.Layouts
Text {
// Optional layout nudge for optical alignment when used inside Layouts
property real layoutTopMargin: 0
text: "question_mark"
font.family: "Material Symbols Rounded"
font.pointSize: Style.fontSizeL * scaling
@ -12,4 +15,5 @@ Text {
}
color: Color.mOnSurface
verticalAlignment: Text.AlignVCenter
Layout.topMargin: layoutTopMargin
}

View file

@ -13,4 +13,5 @@ Text {
font.kerning: true
color: Color.mOnSurface
renderType: Text.QtRendering
verticalAlignment: Text.AlignVCenter
}