Skip to content

Commit

Permalink
Merge pull request #10 from ganyuanzhen/main
Browse files Browse the repository at this point in the history
修复屏幕旋转&修复qrc
  • Loading branch information
lingmo-dream authored Mar 3, 2024
2 parents c98f8cb + b37c96d commit ad60ea8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/qml/Display/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ ItemPage {
id: rotationLayout
anchors.fill: parent
spacing: 0
property int current_rot: element.rotation

RotationButton {
value: 0
Expand Down Expand Up @@ -262,7 +263,7 @@ ItemPage {
CheckBox {
id: enabledBox
checked: element.enabled
// visible: _screenView.count > 1
visible: _screenView.count > 1
onClicked: {
element.enabled = checked
screen.save()
Expand Down
8 changes: 5 additions & 3 deletions src/qml/Display/RotationButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ IconCheckBox {
property int value
property var rot

checked: element.rotation === rot
checked: rotationLayout.current_rot === rot

onClicked: {
if (element.rotation === rot) {
return;
}

element.rotation = rot
element.rotation = rot;
rotationLayout.current_rot = rot;
// 下面不需要了
// screen.resetTotalSize()
screen.save()
// screen.save()
}

Component.onCompleted: {
Expand Down
1 change: 1 addition & 0 deletions src/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,6 @@
<file>qml/Update/UpdateItemsView.qml</file>
<file>qml/Update/UpdateItem.qml</file>
<file>qml/Update/UpdateTitleBar.qml</file>
<file>qml/Update/Version.js</file>
</qresource>
</RCC>

0 comments on commit ad60ea8

Please sign in to comment.