-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: [UI] Adjusting the display effect of year and year views
1.Preview image stretched proportionally 2.And preview Image Border 3.Optimization of monthly view segmentation line display effect Log: [UI] Adjusting the display effect of year and year views Bug: https://pms.uniontech.com/bug-view-168163.html
- Loading branch information
Showing
10 changed files
with
318 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
import QtQuick 2.11 | ||
import QtQuick.Controls 2.4 | ||
import QtQuick.Layouts 1.11 | ||
|
||
Image { | ||
smooth: true | ||
antialiasing: true | ||
fillMode: Image.PreserveAspectCrop | ||
|
||
//border and shadow | ||
Rectangle { | ||
id: borderRect | ||
anchors.fill: parent | ||
color: "transparent" | ||
border.color: Qt.rgba(0, 0, 0, 0.2) | ||
border.width: 1 | ||
visible: true | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
import QtQuick 2.11 | ||
import QtQuick.Controls 2.4 | ||
import QtQuick.Layouts 1.11 | ||
|
||
Rectangle { | ||
id: monthImage | ||
property var paths | ||
property double displayFlushHelper | ||
property Item content: null | ||
|
||
color: "white" | ||
function createImage() { | ||
if (paths.length === 1) | ||
content = monthComponent_1pic.createObject(monthImage) | ||
else if (paths.length === 2) | ||
content = monthComponent_2pic.createObject(monthImage) | ||
else if (paths.length === 3) | ||
content = monthComponent_3pic.createObject(monthImage) | ||
else if (paths.length === 4) | ||
content = monthComponent_4pic.createObject(monthImage) | ||
else if (paths.length === 5) | ||
content = monthComponent_5pic.createObject(monthImage) | ||
else if (paths.length === 6) | ||
content = monthComponent_6pic.createObject(monthImage) | ||
} | ||
|
||
Component { | ||
id: monthComponent_1pic | ||
|
||
BorderImageEx { | ||
width: monthImage.width | ||
height: monthImage.height | ||
source: "image://collectionPublisher/" + monthImage.displayFlushHelper.toString() + "_M_1_" + paths[0] | ||
} | ||
} | ||
|
||
Component { | ||
id: monthComponent_2pic | ||
|
||
Row { | ||
spacing: 2 | ||
Repeater { | ||
model: paths | ||
BorderImageEx { | ||
width: monthImage.width / 2 | ||
height: monthImage.height | ||
source: "image://collectionPublisher/" + monthImage.displayFlushHelper.toString() + "_M_1_" + modelData | ||
} | ||
} | ||
} | ||
} | ||
|
||
Component { | ||
id: monthComponent_3pic | ||
|
||
Row { | ||
spacing: 2 | ||
BorderImageEx { | ||
width: monthImage.width / 2 | ||
height: monthImage.height | ||
source: "image://collectionPublisher/" + monthImage.displayFlushHelper.toString() + "_M_1_" + paths[0] | ||
} | ||
|
||
Column { | ||
spacing: 2 | ||
Repeater { | ||
model: [paths[1], paths[2]] | ||
BorderImageEx { | ||
width: monthImage.width / 2 | ||
height: monthImage.height / 2 | ||
source: "image://collectionPublisher/" + monthImage.displayFlushHelper.toString() + "_M_2_" + modelData | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
Component { | ||
id: monthComponent_4pic | ||
|
||
Grid { | ||
columns: 2 | ||
rows: 2 | ||
spacing: 2 | ||
Repeater { | ||
model: paths | ||
BorderImageEx { | ||
width: monthImage.width / 2 | ||
height: monthImage.height / 2 | ||
source: "image://collectionPublisher/" + monthImage.displayFlushHelper.toString() + "_M_2_" + modelData | ||
} | ||
} | ||
} | ||
} | ||
|
||
Component { | ||
id: monthComponent_5pic | ||
|
||
Column { | ||
spacing: 2 | ||
BorderImageEx { | ||
width: monthImage.width | ||
height: monthImage.height * 0.618 | ||
source: "image://collectionPublisher/" + monthImage.displayFlushHelper.toString() + "_M_3_" + paths[0] | ||
} | ||
|
||
Row { | ||
spacing: 2 | ||
Repeater { | ||
model: [paths[1], paths[2], paths[3], paths[4]] | ||
BorderImageEx { | ||
width: monthImage.width / 4 | ||
height: monthImage.height * (1 - 0.618) | ||
source: "image://collectionPublisher/" + monthImage.displayFlushHelper.toString() + "_M_4_" + modelData | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
Component { | ||
id: monthComponent_6pic | ||
|
||
Column { | ||
spacing: 2 | ||
BorderImageEx { | ||
width: monthImage.width | ||
height: monthImage.height * 0.618 | ||
source: "image://collectionPublisher/" + monthImage.displayFlushHelper.toString() + "_M_3_" + paths[0] | ||
} | ||
|
||
Row { | ||
spacing: 2 | ||
Repeater { | ||
model: [paths[1], paths[2], paths[3], paths[4], paths[5]] | ||
BorderImageEx { | ||
width: monthImage.width / 5 | ||
height: monthImage.height * (1 - 0.618) | ||
source: "image://collectionPublisher/" + monthImage.displayFlushHelper.toString() + "_M_5_" + modelData | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.