Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Israel Garcia
libcloudstorage
Commits
ebe544f3
Commit
ebe544f3
authored
Feb 05, 2018
by
Paweł Wegner
Browse files
cloudbrowser: elide long names.
parent
2b6d2570
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/cloudbrowser/qml/ItemPage.qml
View file @
ebe544f3
...
...
@@ -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
...
...
bin/cloudbrowser/qml/main.qml
View file @
ebe544f3
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment