mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix(widgets): add Layout.margins to bordered widgets to prevent border clipping
This commit is contained in:
@@ -36,6 +36,7 @@ RowLayout {
|
||||
Rectangle {
|
||||
id: box
|
||||
|
||||
Layout.margins: Style.borderS
|
||||
implicitWidth: Math.round(root.baseSize)
|
||||
implicitHeight: Math.round(root.baseSize)
|
||||
radius: Style.iRadiusXS
|
||||
|
||||
@@ -12,6 +12,7 @@ Rectangle {
|
||||
|
||||
signal colorSelected(color color)
|
||||
|
||||
Layout.margins: Style.borderS
|
||||
implicitWidth: 150
|
||||
implicitHeight: Math.round(Style.baseWidgetSize * 1.1)
|
||||
|
||||
|
||||
@@ -136,6 +136,7 @@ RowLayout {
|
||||
ComboBox {
|
||||
id: combo
|
||||
|
||||
Layout.margins: Style.borderS
|
||||
Layout.minimumWidth: Math.round(root.minimumWidth * Style.uiScaleRatio)
|
||||
Layout.preferredHeight: Math.round(root.preferredHeight * Style.uiScaleRatio)
|
||||
implicitWidth: Layout.minimumWidth
|
||||
|
||||
@@ -10,6 +10,7 @@ Rectangle {
|
||||
|
||||
signal tokenClicked(string token)
|
||||
|
||||
Layout.margins: Style.borderS
|
||||
color: Color.mSurface
|
||||
border.color: Color.mOutline
|
||||
border.width: Style.borderS
|
||||
|
||||
@@ -168,6 +168,7 @@ RowLayout {
|
||||
ComboBox {
|
||||
id: combo
|
||||
|
||||
Layout.margins: Style.borderS
|
||||
Layout.minimumWidth: Math.round(root.minimumWidth * Style.uiScaleRatio)
|
||||
Layout.preferredHeight: Math.round(root.preferredHeight * Style.uiScaleRatio)
|
||||
implicitWidth: Layout.minimumWidth
|
||||
|
||||
@@ -91,6 +91,7 @@ RowLayout {
|
||||
// Main spinbox container
|
||||
Rectangle {
|
||||
id: spinBoxContainer
|
||||
Layout.margins: Style.borderS
|
||||
implicitWidth: 120
|
||||
implicitHeight: Math.round((root.baseSize - 4) / 2) * 2
|
||||
radius: Style.iRadiusS
|
||||
|
||||
@@ -66,6 +66,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
// Styling
|
||||
Layout.margins: Style.borderS
|
||||
implicitWidth: tabRow.implicitWidth + (margins * 2)
|
||||
implicitHeight: tabHeight + (margins * 2)
|
||||
color: Color.mSurfaceVariant
|
||||
|
||||
@@ -56,7 +56,7 @@ ColumnLayout {
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: root.minimumInputWidth
|
||||
Layout.margins: Math.ceil(Style.borderS)
|
||||
Layout.margins: Style.borderS
|
||||
implicitHeight: Style.baseWidgetSize * 1.1 * Style.uiScaleRatio
|
||||
|
||||
// This is important - makes the control accept focus
|
||||
|
||||
@@ -45,6 +45,7 @@ RowLayout {
|
||||
id: switcher
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.margins: Style.borderS
|
||||
|
||||
implicitWidth: Math.round(root.baseSize * .85) * 2
|
||||
implicitHeight: Math.round(root.baseSize * .5) * 2
|
||||
|
||||
Reference in New Issue
Block a user