feat: sidebar margins ignore border
This commit is contained in:
parent
07348758f1
commit
e29be58790
3 changed files with 7 additions and 3 deletions
|
|
@ -4,6 +4,7 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import Caelestia
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
import qs.components.filedialog
|
||||
|
|
@ -57,7 +58,7 @@ Item {
|
|||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: Math.min(anchors.margins, Math.max(0, anchors.margins - Config.border.thickness))
|
||||
anchors.topMargin: CUtils.clamp(anchors.margins - Config.border.thickness, 0, anchors.margins)
|
||||
anchors.margins: Tokens.padding.large
|
||||
|
||||
nonAnimWidth: root.nonAnimWidth - anchors.margins * 2
|
||||
|
|
|
|||
|
|
@ -149,5 +149,6 @@ Item {
|
|||
anchors.top: notifications.bottom
|
||||
anchors.bottom: utilities.top
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: -notifications.anchors.topMargin
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Caelestia
|
||||
import Caelestia.Config
|
||||
import qs.components
|
||||
|
||||
|
|
@ -28,13 +29,14 @@ Item {
|
|||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Tokens.padding.large
|
||||
anchors.leftMargin: Tokens.padding.large
|
||||
anchors.margins: CUtils.clamp(anchors.leftMargin - Config.border.thickness, 0, anchors.leftMargin)
|
||||
anchors.bottomMargin: 0
|
||||
|
||||
active: root.shouldBeActive || root.visible
|
||||
|
||||
sourceComponent: Content {
|
||||
implicitWidth: Tokens.sizes.sidebar.width - Tokens.padding.extraLargeIncreased
|
||||
implicitWidth: Tokens.sizes.sidebar.width - content.anchors.leftMargin - content.anchors.margins
|
||||
props: root.props
|
||||
visibilities: root.visibilities
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue