makeing ImageEditor layout make more sense

This commit is contained in:
Chris Cochrun 2022-10-14 07:17:12 -05:00
parent b621bb0e10
commit 175182a32b

View file

@ -25,24 +25,23 @@ Item {
RowLayout { RowLayout {
anchors.fill: parent anchors.fill: parent
Controls.ComboBox { Controls.TextField {
model: Qt.fontFamilies() id: imageTitleField
implicitWidth: 300
editable: true Layout.preferredWidth: 300
hoverEnabled: true
/* onCurrentTextChanged: showPassiveNotification(currentText) */ placeholderText: "Image Title..."
} text: image.title
Controls.SpinBox { padding: 10
editable: true onEditingFinished: updateTitle(text);
from: 5
to: 72
hoverEnabled: true
} }
Controls.ComboBox { Controls.ComboBox {
model: ["IMAGES", "Center", "Right", "Justify"] model: ["Fill", "Crop", "Height", "Width"]
implicitWidth: 100 implicitWidth: 100
hoverEnabled: true hoverEnabled: true
} }
Controls.ToolSeparator {} Controls.ToolSeparator {}
Item { Layout.fillWidth: true } Item { Layout.fillWidth: true }
Controls.ToolSeparator {} Controls.ToolSeparator {}
@ -96,69 +95,32 @@ Item {
} }
} }
Controls.SplitView { ColumnLayout {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
/* Layout.minimumWidth: 300 */
Layout.alignment: Qt.AlignCenter
Layout.columnSpan: 2 Layout.columnSpan: 2
handle: Item{ spacing: 5
implicitWidth: 6
Rectangle { Item {
height: parent.height id: topEmpty
anchors.horizontalCenter: parent.horizontalCenter Layout.preferredHeight: 30
width: 1
color: Controls.SplitHandle.hovered ? Kirigami.Theme.hoverColor : Kirigami.Theme.backgroundColor
}
} }
ColumnLayout {
Controls.SplitView.fillHeight: true
Controls.SplitView.preferredWidth: 300
Controls.SplitView.minimumWidth: 100
Controls.TextField { Image {
id: imageTitleField id: imagePreview
Layout.preferredWidth: 1000
Layout.preferredWidth: 300 Layout.preferredHeight: Layout.preferredWidth / 16 * 9
Layout.fillWidth: true Layout.alignment: Qt.AlignCenter
Layout.leftMargin: 20 fillMode: Image.PreserveAspectFit
Layout.rightMargin: 20 source: image.filePath
placeholderText: "Image Title..."
text: image.title
padding: 10
onEditingFinished: updateTitle(text);
}
Item {
id: empty
Layout.fillHeight: true
}
} }
ColumnLayout { Item {
Controls.SplitView.fillHeight: true id: botEmpty
Controls.SplitView.preferredWidth: 700 Layout.fillHeight: true
Controls.SplitView.minimumWidth: 300
spacing: 5
Item {
id: topEmpty
Layout.fillHeight: true
}
Image {
id: imagePreview
Layout.preferredWidth: 600
Layout.preferredHeight: Layout.preferredWidth / 16 * 9
Layout.alignment: Qt.AlignCenter
fillMode: Image.PreserveAspectFit
source: image.filePath
}
Item {
id: botEmpty
Layout.fillHeight: true
}
} }
} }
} }