Skip to content

Commit

Permalink
fix: information dialog padding
Browse files Browse the repository at this point in the history
Adjust information dialog label padding;
Init PathView currentIndex when component completed.

Log: Fix information dialog padding.
Bug: https://pms.uniontech.com/bug-view-268607.html
  • Loading branch information
rb-union committed Aug 15, 2024
1 parent 95d2457 commit be5fcd3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/qml/ImageViewer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,12 @@ Item {
}
}

Component.onCompleted: {
// 首次进入(退出缩略图后创建)重置当前显示的索引
IV.GStatus.viewFlicking = true;
currentIndex = IV.GControl.viewModel.currentIndex;
IV.GStatus.viewFlicking = false;
}
onCurrentIndexChanged: {
var curIndex = view.currentIndex;
var previousIndex = IV.GControl.viewModel.currentIndex;
Expand Down
2 changes: 2 additions & 0 deletions src/qml/InformationDialog/PropertyActionItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ Control {

ElideLabel {
Layout.fillWidth: true
// 系数微调整以满足默认字号标签均显示的效果
Layout.minimumWidth: descriptionWidth + 5
color: control.ColorSelector.sectionTextColor
font: DTK.fontManager.t10
sourceText: control.title
Expand Down
5 changes: 3 additions & 2 deletions src/qml/InformationDialog/PropertyItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Control {
property int contrlIntimplicitHeight: 40
property int corners: RoundRectangle.NoneCorner
property string description
property int descriptionWidth: control.width - leftPadding - rightPadding
property int descriptionWidth: control.width - control.leftPadding - control.rightPadding
property string iconName
property Palette infoTextColor: Palette {
normal: Qt.rgba(0, 0, 0, 1)
Expand Down Expand Up @@ -60,11 +60,12 @@ Control {

ElideLabel {
Layout.fillWidth: true
// 系数微调整以满足默认字号标签均显示的效果
Layout.minimumWidth: descriptionWidth + 5
color: control.ColorSelector.sectionTextColor
font: DTK.fontManager.t10
sourceText: control.title
tipsColor: control.palette.toolTipText
width: descriptionWidth
}

RowLayout {
Expand Down

0 comments on commit be5fcd3

Please sign in to comment.