Fix rename editor location
This commit is contained in:
parent
30c43607b0
commit
a4993abcc1
6 changed files with 12 additions and 12 deletions
|
@ -83,7 +83,7 @@ PlacesModel::PlacesModel(QObject *parent)
|
||||||
m_items.append(item);
|
m_items.append(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
PlacesItem *trashItem = new PlacesItem(tr("Trash"), QUrl(QStringLiteral("trash:/")));
|
PlacesItem *trashItem = new PlacesItem(tr("Trash"), QUrl(QStringLiteral("trash:///")));
|
||||||
trashItem->setIconPath("user-trash.svg");
|
trashItem->setIconPath("user-trash.svg");
|
||||||
m_items.append(trashItem);
|
m_items.append(trashItem);
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ Window {
|
||||||
visible: true
|
visible: true
|
||||||
|
|
||||||
width: 400 + FishUI.Units.largeSpacing * 2
|
width: 400 + FishUI.Units.largeSpacing * 2
|
||||||
height: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 2
|
height: _mainLayout.implicitHeight + FishUI.Units.largeSpacing
|
||||||
|
|
||||||
minimumWidth: width
|
minimumWidth: width
|
||||||
minimumHeight: height
|
minimumHeight: height
|
||||||
|
@ -48,7 +48,8 @@ Window {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: FishUI.Units.largeSpacing
|
anchors.leftMargin: FishUI.Units.largeSpacing
|
||||||
anchors.rightMargin: FishUI.Units.largeSpacing
|
anchors.rightMargin: FishUI.Units.largeSpacing
|
||||||
spacing: 0
|
anchors.bottomMargin: FishUI.Units.largeSpacing
|
||||||
|
spacing: FishUI.Units.largeSpacing
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: _textField
|
id: _textField
|
||||||
|
|
|
@ -32,7 +32,7 @@ Window {
|
||||||
visible: true
|
visible: true
|
||||||
|
|
||||||
width: 300 + FishUI.Units.largeSpacing * 2
|
width: 300 + FishUI.Units.largeSpacing * 2
|
||||||
height: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 3
|
height: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 2
|
||||||
|
|
||||||
minimumWidth: width
|
minimumWidth: width
|
||||||
minimumHeight: height
|
minimumHeight: height
|
||||||
|
|
|
@ -147,7 +147,9 @@ GridView {
|
||||||
highlightMoveDuration: 0
|
highlightMoveDuration: 0
|
||||||
keyNavigationEnabled : true
|
keyNavigationEnabled : true
|
||||||
keyNavigationWraps : true
|
keyNavigationWraps : true
|
||||||
Keys.onPressed: {
|
Keys.onPressed: {
|
||||||
|
control.keyPress(event)
|
||||||
|
|
||||||
if (event.key === Qt.Key_Control) {
|
if (event.key === Qt.Key_Control) {
|
||||||
ctrlPressed = true
|
ctrlPressed = true
|
||||||
} else if (event.key === Qt.Key_Shift) {
|
} else if (event.key === Qt.Key_Shift) {
|
||||||
|
@ -160,8 +162,6 @@ GridView {
|
||||||
} else if (event.key === Qt.Key_Minus && event.modifiers & Qt.ControlModifier) {
|
} else if (event.key === Qt.Key_Minus && event.modifiers & Qt.ControlModifier) {
|
||||||
control.decreaseIconSize()
|
control.decreaseIconSize()
|
||||||
}
|
}
|
||||||
|
|
||||||
control.keyPress(event)
|
|
||||||
}
|
}
|
||||||
Keys.onReleased: {
|
Keys.onReleased: {
|
||||||
if (event.key === Qt.Key_Control) {
|
if (event.key === Qt.Key_Control) {
|
||||||
|
@ -625,7 +625,6 @@ GridView {
|
||||||
width = targetItem.width - FishUI.Units.smallSpacing
|
width = targetItem.width - FishUI.Units.smallSpacing
|
||||||
height = targetItem.labelArea.paintedHeight + FishUI.Units.largeSpacing * 2
|
height = targetItem.labelArea.paintedHeight + FishUI.Units.largeSpacing * 2
|
||||||
x = targetItem.x + Math.abs(Math.min(control.contentX, control.originX))
|
x = targetItem.x + Math.abs(Math.min(control.contentX, control.originX))
|
||||||
x = targetItem.x + (targetItem.width - _editor.width)
|
|
||||||
y = pos.y - FishUI.Units.largeSpacing
|
y = pos.y - FishUI.Units.largeSpacing
|
||||||
text = targetItem.labelArea.text
|
text = targetItem.labelArea.text
|
||||||
targetItem.labelArea.visible = false
|
targetItem.labelArea.visible = false
|
||||||
|
|
|
@ -96,6 +96,8 @@ ListView {
|
||||||
highlightMoveDuration: 0
|
highlightMoveDuration: 0
|
||||||
Keys.enabled: true
|
Keys.enabled: true
|
||||||
Keys.onPressed: {
|
Keys.onPressed: {
|
||||||
|
control.keyPress(event)
|
||||||
|
|
||||||
if (event.key === Qt.Key_Control) {
|
if (event.key === Qt.Key_Control) {
|
||||||
ctrlPressed = true
|
ctrlPressed = true
|
||||||
} else if (event.key === Qt.Key_Shift) {
|
} else if (event.key === Qt.Key_Shift) {
|
||||||
|
@ -104,8 +106,6 @@ ListView {
|
||||||
if (currentIndex != -1)
|
if (currentIndex != -1)
|
||||||
anchorIndex = currentIndex
|
anchorIndex = currentIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
control.keyPress(event)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onReleased: {
|
Keys.onReleased: {
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/Dialogs/CreateFolderDialog.qml" line="29"/>
|
<location filename="../qml/Dialogs/CreateFolderDialog.qml" line="29"/>
|
||||||
<source>New folder name</source>
|
<source>New folder name</source>
|
||||||
<translation>新文件夹名</translation>
|
<translation>新建文件夹名称</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/Dialogs/CreateFolderDialog.qml" line="57"/>
|
<location filename="../qml/Dialogs/CreateFolderDialog.qml" line="57"/>
|
||||||
<source>New folder</source>
|
<source>New folder</source>
|
||||||
<translation>新文件夹</translation>
|
<translation>新建文件夹</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/Dialogs/CreateFolderDialog.qml" line="72"/>
|
<location filename="../qml/Dialogs/CreateFolderDialog.qml" line="72"/>
|
||||||
|
|
Loading…
Reference in a new issue