Skip to content

Commit

Permalink
fix: adjust openimagewidget and dialog layout
Browse files Browse the repository at this point in the history
adjust openimagewidget and dialog layout.

Log: fix some ui issue.
  • Loading branch information
rb-union committed Jul 23, 2024
1 parent 53a2dac commit af5143d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/qml/InformationDialog/PropertyActionItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Control {
}
property int corners: RoundRectangle.NoneCorner
property string description
property int descriptionWidth: control.width - leftPadding - rightPadding - 10
property int descriptionWidth: control.width - leftPadding - rightPadding - 20
property string iconName
property Palette infoTextColor: Palette {
normal: Qt.rgba(0, 0, 0, 1)
Expand Down
41 changes: 20 additions & 21 deletions src/qml/OpenImageWidget.qml
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023 - 2024 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
import org.deepin.dtk 1.0

Control {
id: control

anchors.fill: parent

DciIcon {
id: openWidgetImage

ColumnLayout {
anchors.centerIn: parent
name: "import_photo"
sourceSize.height: 128
sourceSize.width: 128
theme: DTK.themeType
}
spacing: 10

RecommandButton {
id: openFileBtn
DciIcon {
id: openWidgetImage

Layout.alignment: Qt.AlignCenter
name: "import_photo"
sourceSize.height: 128
sourceSize.width: 128
theme: DTK.themeType
}

font.capitalization: Font.MixedCase
height: 35
text: qsTr("Open Image")
width: 300
RecommandButton {
id: openFileBtn

onClicked: stackView.openImageDialog()
Layout.preferredHeight: 35
Layout.preferredWidth: 300
font.capitalization: Font.MixedCase
text: qsTr("Open Image")

anchors {
left: openWidgetImage.left
leftMargin: -86
top: openWidgetImage.bottom
topMargin: 10
onClicked: stackView.openImageDialog()
}
}
}

0 comments on commit af5143d

Please sign in to comment.