Skip to content

Commit

Permalink
update DatePicker
Browse files Browse the repository at this point in the history
  • Loading branch information
amoh-godwin committed Apr 14, 2023
1 parent a4fc7f2 commit 1b0e094
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion PyQt5/Qt5/qml/soloman/Controls/SDatePicker.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ Rectangle {
text: control.selectedDate
color: "transparent"

onClicked: popup.open()
onClicked: {
popup.x = this.x + popup.width > width ? width - popup.width : this.x
popup.open()
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion PyQt6/Qt6/qml/soloman/Controls/SDatePicker.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ Rectangle {
text: control.selectedDate
color: "transparent"

onClicked: popup.open()
onClicked: {
popup.x = this.x + popup.width > width ? width - popup.width : this.x
popup.open()
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion PySide2/qml/soloman/Controls/SDatePicker.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ Rectangle {
text: control.selectedDate
color: "transparent"

onClicked: popup.open()
onClicked: {
popup.x = this.x + popup.width > width ? width - popup.width : this.x
popup.open()
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion PySide6/qml/soloman/Controls/SDatePicker.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ Rectangle {
text: control.selectedDate
color: "transparent"

onClicked: popup.open()
onClicked: {
popup.x = this.x + popup.width > width ? width - popup.width : this.x
popup.open()
}
}
}

Expand Down

0 comments on commit 1b0e094

Please sign in to comment.