@@ -25,13 +25,10 @@ class OCFileListGridController {
25
25
private const val TAG = " OCFileListGridController"
26
26
27
27
// Reserved space for file extension text in DP
28
- private const val EXTENSION_RESERVED_DP : Int = 36
28
+ private const val EXTENSION_RESERVED_DP : Int = 32
29
29
30
30
// Padding between text and more icon in DP
31
- private const val SAFETY_MARGIN_DP : Int = 8
32
-
33
- // extra spacing between text and more button
34
- private const val MORE_BUTTON_MARGIN_DP : Int = 8
31
+ private const val SAFETY_MARGIN_DP : Int = 16
35
32
}
36
33
37
34
private var lastScreenWidth = - 1
@@ -62,18 +59,15 @@ class OCFileListGridController {
62
59
63
60
val moreButtonPx = context.resources.getDimensionPixelSize(R .dimen.iconized_single_line_item_icon_size)
64
61
65
- // 3-4 chars width
66
-
67
62
val density = context.resources.displayMetrics.density
68
63
val extensionMinPx = (density * EXTENSION_RESERVED_DP ).toInt()
69
64
val paddingPx = (density * SAFETY_MARGIN_DP ).toInt()
70
- val moreButtonMarginPx = (density * MORE_BUTTON_MARGIN_DP ).toInt()
71
65
72
66
// name + more button
73
- cachedFolderMaxWidth = cellWidth - moreButtonPx - paddingPx - moreButtonMarginPx
67
+ cachedFolderMaxWidth = cellWidth - moreButtonPx - paddingPx
74
68
75
69
// name + extension + more button
76
- cachedFileMaxWidth = cellWidth - moreButtonPx - extensionMinPx - paddingPx - moreButtonMarginPx
70
+ cachedFileMaxWidth = cellWidth - moreButtonPx - extensionMinPx - paddingPx
77
71
78
72
// fallback
79
73
if (cachedFolderMaxWidth < 0 ) {
@@ -128,10 +122,6 @@ class OCFileListGridController {
128
122
ConstraintSet .END
129
123
)
130
124
131
- val marginEnd =
132
- constraintLayout.context.resources.getDimensionPixelSize(R .dimen.standard_quarter_margin)
133
- setMargin(R .id.more, ConstraintSet .END , marginEnd)
134
-
135
125
applyTo(constraintLayout)
136
126
}
137
127
} else {
0 commit comments