Skip to content

Commit 75676b9

Browse files
committed
fix: fix example display issues
Fixed multiple display issues in QML examples: 1. Removed backgroundVisible property from ItemDelegate in exhibition example as it's no longer needed 2. Changed Rectangle components to Item components in qml-inspect examples to avoid unnecessary visual elements 3. Removed border.color property from settings dialog example to clean up the appearance These changes improve the visual consistency and correctness of the example displays by using more appropriate QML components and removing deprecated or unnecessary properties. Log: Fixed visual display issues in QML examples Influence: 1. Verify that the exhibition example navigation items display correctly without backgrounds 2. Check that all qml-inspect examples render properly as Item components 3. Confirm that the settings dialog example appears without blue borders 4. Test navigation functionality in exhibition example remains working 5. Validate that all examples maintain their intended functionality after component changes fix: 修复示例显示问题 修复了 QML 示例中的多个显示问题: 1. 从展览示例的 ItemDelegate 中移除 backgroundVisible 属性,该属性不再 需要 2. 将 qml-inspect 示例中的 Rectangle 组件改为 Item 组件,避免不必要的视 觉元素 3. 移除设置对话框示例中的 border.color 属性以清理外观 这些更改通过使用更合适的 QML 组件和移除已弃用或不必要的属性,提高了示例 显示的视觉一致性和正确性。 Log: 修复 QML 示例中的视觉显示问题 Influence: 1. 验证展览示例中的导航项在没有背景的情况下正确显示 2. 检查所有 qml-inspect 示例作为 Item 组件是否正确渲染 3. 确认设置对话框示例显示时没有蓝色边框 4. 测试展览示例中的导航功能仍然正常工作 5. 验证所有示例在组件更改后保持其预期功能
1 parent 7881c6c commit 75676b9

5 files changed

Lines changed: 4 additions & 6 deletions

File tree

examples/exhibition/main.qml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ ApplicationWindow {
9898
model: examplesFiles
9999
delegate: ItemDelegate {
100100
text: modelData.substring(0, modelData.indexOf(".qml"))
101-
backgroundVisible: false
102101
onClicked: navigation.currentIndex = index
103102
checked: navigation.currentIndex === index
104103
}

examples/qml-inspect/Example_1.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import QtQuick 2.11
66
import org.deepin.dtk 1.0
77

8-
Rectangle {
8+
Item {
99
MouseArea {
1010
anchors.fill: parent
1111
acceptedButtons: Qt.LeftButton | Qt.RightButton

examples/qml-inspect/Example_2.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import QtQuick.Window 2.11
77
import QtQuick.Layouts 1.11
88
import org.deepin.dtk 1.0
99

10-
Rectangle {
10+
Item {
1111
property string iconStr: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAABFCAYAAAAGscunAAAAAXNSR0IArs4c6QAAATNJREFUeF7t3DEOgkAYBeG3J2NvxnIy2JNhKEwUDYyWMJZmLPh8tH+Jn1OBcloYRCQwApH+Rlozgt9eMymZ9g/2uaQ145Ch1dRrIhw81ZIlPX1KSXvNviKNGVt7724BNmVKSxPp6N8WCbwLIokEBEDikkQCAiBxSSIBAZC4JJGAAEhckkhAACQuSSQgABKXJBIQAIlLEgkIgMQliQQEQOKSRAICIHFJIgEBkLgkkYAASFySSEAAJC5JJCAAEpckEhAAiUsSCQiAxCWJBARA4pJEAgIgcUkiAQGQuCSRgABIXJJIQAAkLkkkIAASlyQSEACJSxIJCIDEJYkEBEDikkQCAiBxSSIBAZD8tKSaessLEz09c2ZwPGETX294XuK5tN0Jju1rr96A11AkkYAASFwSQHoAZNuhVXVGph0AAAAASUVORK5CYII="
1212

1313
RowLayout {

examples/qml-inspect/Example_colorselector.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import QtQuick 2.11
66
import org.deepin.dtk 1.0
77

8-
Rectangle {
8+
Item {
99
Label {
1010
id: changePaletteLabel
1111
anchors.left: parent.left

examples/qml-inspect/Example_settingsdialog.qml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import QtQuick 2.0
66
import org.deepin.dtk 1.0
77
import org.deepin.dtk.settings 1.0 as Settings
88

9-
Rectangle {
10-
border.color: "blue"
9+
Item {
1110

1211
property list<Settings.SettingsGroup> __groups: [
1312
Settings.SettingsGroup {

0 commit comments

Comments
 (0)