Edit NButton alignment
This commit is contained in:
parent
c14eb95dba
commit
888ba108e0
4 changed files with 10 additions and 1 deletions
|
|
@ -113,6 +113,7 @@ Popup {
|
||||||
|
|
||||||
NButton {
|
NButton {
|
||||||
text: "Apply"
|
text: "Apply"
|
||||||
|
icon: "check"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (settingsLoader.item && settingsLoader.item.saveSettings) {
|
if (settingsLoader.item && settingsLoader.item.saveSettings) {
|
||||||
var newSettings = settingsLoader.item.saveSettings()
|
var newSettings = settingsLoader.item.saveSettings()
|
||||||
|
|
|
||||||
|
|
@ -77,10 +77,12 @@ Rectangle {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: contentRow
|
id: contentRow
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Style.marginS * scaling
|
spacing: Style.marginXS * scaling
|
||||||
|
|
||||||
// Icon (optional)
|
// Icon (optional)
|
||||||
NIcon {
|
NIcon {
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
layoutTopMargin: 1 * scaling
|
||||||
visible: root.icon !== ""
|
visible: root.icon !== ""
|
||||||
text: root.icon
|
text: root.icon
|
||||||
font.pointSize: root.iconSize
|
font.pointSize: root.iconSize
|
||||||
|
|
@ -105,6 +107,7 @@ Rectangle {
|
||||||
|
|
||||||
// Text
|
// Text
|
||||||
NText {
|
NText {
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
visible: root.text !== ""
|
visible: root.text !== ""
|
||||||
text: root.text
|
text: root.text
|
||||||
font.pointSize: root.fontSize
|
font.pointSize: root.fontSize
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import qs.Commons
|
import qs.Commons
|
||||||
import qs.Widgets
|
import qs.Widgets
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
// Optional layout nudge for optical alignment when used inside Layouts
|
||||||
|
property real layoutTopMargin: 0
|
||||||
text: "question_mark"
|
text: "question_mark"
|
||||||
font.family: "Material Symbols Rounded"
|
font.family: "Material Symbols Rounded"
|
||||||
font.pointSize: Style.fontSizeL * scaling
|
font.pointSize: Style.fontSizeL * scaling
|
||||||
|
|
@ -12,4 +15,5 @@ Text {
|
||||||
}
|
}
|
||||||
color: Color.mOnSurface
|
color: Color.mOnSurface
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
Layout.topMargin: layoutTopMargin
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,5 @@ Text {
|
||||||
font.kerning: true
|
font.kerning: true
|
||||||
color: Color.mOnSurface
|
color: Color.mOnSurface
|
||||||
renderType: Text.QtRendering
|
renderType: Text.QtRendering
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue