Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
tweak min/max heights
Browse files Browse the repository at this point in the history
  • Loading branch information
sk22 committed Jun 13, 2023
1 parent e3199c0 commit 08dc122
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@

import androidx.annotation.NonNull;

import me.grishka.appkit.utils.V;

public class PhotoLayoutHelper{
public static final int MAX_WIDTH=1000;
public static final int MAX_HEIGHT=1400;
public static final int MIN_HEIGHT=250;
public static final int MAX_HEIGHT=1700;
public static final float GAP=1.5f;

// 2 * margin + close button height - gap. i don't know if the gap subtraction is correct
public static final int MIN_HEIGHT = Math.round(V.dp(2 * 12) + V.dp(40) - GAP);

@NonNull
public static TiledLayoutResult processThumbs(List<Attachment> thumbs){
float maxRatio=MAX_WIDTH/(float)MAX_HEIGHT;
Expand Down
3 changes: 2 additions & 1 deletion mastodon/src/main/res/layout/overlay_image_alt_text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="40dp">
android:layout_marginEnd="40dp"
android:minWidth="40dp">

<LinearLayout
android:layout_width="wrap_content"
Expand Down

0 comments on commit 08dc122

Please sign in to comment.