layout fixes

This commit is contained in:
Marco Martin 2014-05-09 13:12:30 +02:00
parent 79bf8bf138
commit 39047a0ab8
2 changed files with 10 additions and 5 deletions

View File

@ -25,6 +25,11 @@ Item {
property real borderOpacity: 1.0 property real borderOpacity: 1.0
property int leftMargin: frameTop.x
property int topMargin: rameTop.y
property int rightMargin: width - frameTop.width
property int bottomMargin: height - frameLeft.height
Rectangle { Rectangle {
id: frameTop id: frameTop
height: borderWidth height: borderWidth

View File

@ -122,18 +122,18 @@ Item {
PlasmaComponents.Label { PlasmaComponents.Label {
text: "◀" text: "◀"
//x: spacing / 2 //x: units.largeSpacing / 2
opacity: leftmouse.containsMouse ? 1 : 0.4 opacity: leftmouse.containsMouse ? 1 : 0.4
Behavior on opacity { NumberAnimation {} } Behavior on opacity { NumberAnimation {} }
anchors { anchors {
top: parent.top top: parent.top
left: parent.left left: parent.left
leftMargin: spacing / 2 leftMargin: units.largeSpacing / 2
} }
MouseArea { MouseArea {
id: leftmouse id: leftmouse
anchors.fill: parent anchors.fill: parent
anchors.margins: -spacing / 3 anchors.margins: -units.largeSpacing / 3
hoverEnabled: true hoverEnabled: true
onClicked: { onClicked: {
monthCalendar.previousMonth() monthCalendar.previousMonth()
@ -147,12 +147,12 @@ Item {
anchors { anchors {
top: parent.top top: parent.top
right: parent.right right: parent.right
rightMargin: spacing / 2 rightMargin: units.largeSpacing / 2 + calendarGrid.rightMargin
} }
MouseArea { MouseArea {
id: rightmouse id: rightmouse
anchors.fill: parent anchors.fill: parent
anchors.margins: -spacing / 3 anchors.margins: -units.largeSpacing / 3
hoverEnabled: true hoverEnabled: true
onClicked: { onClicked: {
monthCalendar.nextMonth() monthCalendar.nextMonth()