فهرست منبع

add comment for topMargin

Signed-off-by: alperozturk <alper_ozturk@proton.me>
alperozturk 7 ماه پیش
والد
کامیت
c8510275bb
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      app/src/main/java/com/owncloud/android/utils/DrawableUtil.kt

+ 3 - 0
app/src/main/java/com/owncloud/android/utils/DrawableUtil.kt

@@ -34,6 +34,9 @@ object DrawableUtil {
 
         val left = (backgroundWidth - scaledOverlayWidth) / 2
         val top = (backgroundHeight - scaledOverlayHeight) / 2
+
+        // Icons are centered on the folder icon. However, some icons take up more vertical space,
+        // so adding a top margin to all icons helps center the overlay icon better.
         val topMargin = 2
 
         containerDrawable.setLayerInset(1, left, top + topMargin, left, top)