makeing ImageEditor layout make more sense
This commit is contained in:
parent
b621bb0e10
commit
175182a32b
1 changed files with 31 additions and 69 deletions
|
@ -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 {
|
Image {
|
||||||
Controls.SplitView.fillHeight: true
|
id: imagePreview
|
||||||
Controls.SplitView.preferredWidth: 300
|
Layout.preferredWidth: 1000
|
||||||
Controls.SplitView.minimumWidth: 100
|
Layout.preferredHeight: Layout.preferredWidth / 16 * 9
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
Controls.TextField {
|
fillMode: Image.PreserveAspectFit
|
||||||
id: imageTitleField
|
source: image.filePath
|
||||||
|
|
||||||
Layout.preferredWidth: 300
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.leftMargin: 20
|
|
||||||
Layout.rightMargin: 20
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue