Commit ebe544f3 authored by Paweł Wegner's avatar Paweł Wegner

cloudbrowser: elide long names.

parent 2b6d2570
......@@ -333,11 +333,11 @@ Kirigami.ScrollablePage {
anchors.left: parent.left
anchors.right: icon.left
height: parent.height
clip: true
Templates.Label {
anchors.fill: parent
anchors.margins: 10
text: modelData.filename
elide: Text.ElideRight
}
}
Kirigami.Icon {
......@@ -423,9 +423,11 @@ Kirigami.ScrollablePage {
}
Templates.Label {
anchors.verticalCenter: parent.verticalCenter
width: parent.width - image.width
text: modelData.filename
color: Kirigami.Theme.textColor
visible: list_view.currentEdit !== index
elide: Text.ElideRight
}
RowLayout {
visible: list_view.currentEdit === index
......
......@@ -97,6 +97,13 @@ Kirigami.ApplicationWindow {
}
}
function elided(str, length) {
if (str.length <= length)
return str;
else
return str.substr(0, length) + "...";
}
function actions() {
var ret = [settings.createObject(root.globalDrawer)], i;
if (cloud.isFree) {
......@@ -168,7 +175,7 @@ Kirigami.ApplicationWindow {
Kirigami.Action {
property variant provider
text: "<b>" + cloud.pretty(provider.type) + "</b>" + "<br/><div>" +
provider.label + "</div>"
elided(provider.label, 30) + "</div>"
onTriggered: {
pageStack.clear();
cloud.currently_moved = null;
......@@ -190,7 +197,7 @@ Kirigami.ApplicationWindow {
height: parent.height - footer_height
handle.anchors.bottomMargin: footer_height
title: selected_item ?
selected_item.filename :
elided(selected_item.filename, 20) :
"Actions"
}
pageStack.initialPage: mainPageComponent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment