Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making icon thumbnails smaller. #353

Merged
merged 1 commit into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ fun LazyListScope.commentNodeItem(

val offset = calculateCommentOffset(node.depth, 4) // The ones with a border on
val offset2 = if (node.depth == 0) {
LARGE_PADDING
MEDIUM_PADDING
} else {
XXL_PADDING
}
Expand Down Expand Up @@ -211,7 +211,7 @@ fun LazyListScope.commentNodeItem(
Column(
modifier = Modifier.padding(
start = offset2,
end = LARGE_PADDING
end = MEDIUM_PADDING
)
) {
if (showPostAndCommunityContext) {
Expand Down Expand Up @@ -323,7 +323,7 @@ private fun ShowMoreChildrenNode(

val offset = calculateCommentOffset(newDepth, 4) // The ones with a border on
val offset2 = if (newDepth == 0) {
LARGE_PADDING
MEDIUM_PADDING
} else {
XXL_PADDING
}
Expand All @@ -343,7 +343,7 @@ private fun ShowMoreChildrenNode(
modifier = Modifier.border(start = border)
) {
Column(
modifier = Modifier.padding(start = offset2, end = LARGE_PADDING)
modifier = Modifier.padding(start = offset2, end = MEDIUM_PADDING)
) {
ShowMoreChildren(
commentView = commentView,
Expand Down
14 changes: 7 additions & 7 deletions app/src/main/java/com/jerboa/ui/components/post/PostListing.kt
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ fun PostTitleAndImageLink(
Column(
modifier = Modifier.padding(
vertical = MEDIUM_PADDING,
horizontal = LARGE_PADDING
horizontal = MEDIUM_PADDING
)

) {
Expand All @@ -320,7 +320,7 @@ fun PostTitleAndThumbnail(
account: Account?
) {
Column(
modifier = Modifier.padding(horizontal = LARGE_PADDING)
modifier = Modifier.padding(horizontal = MEDIUM_PADDING)
) {
Row(
horizontalArrangement = Arrangement.spacedBy(SMALL_PADDING)
Expand Down Expand Up @@ -382,7 +382,7 @@ fun PostBody(
colors = CARD_COLORS,
shape = MaterialTheme.shapes.medium,
modifier = Modifier
.padding(vertical = MEDIUM_PADDING, horizontal = LARGE_PADDING)
.padding(vertical = MEDIUM_PADDING, horizontal = MEDIUM_PADDING)
.fillMaxWidth(),
content = {
if (fullBody) {
Expand Down Expand Up @@ -873,7 +873,7 @@ fun PostListingList(
) {
Column(
modifier = Modifier.padding(
horizontal = LARGE_PADDING,
horizontal = MEDIUM_PADDING,
vertical = MEDIUM_PADDING
)
) {
Expand Down Expand Up @@ -1074,7 +1074,7 @@ fun PostListingCard(
onPersonClick = onPersonClick,
isModerator = isModerator,
showCommunityName = showCommunityName,
modifier = Modifier.padding(horizontal = LARGE_PADDING)
modifier = Modifier.padding(horizontal = MEDIUM_PADDING)
)

// Title + metadata
Expand Down Expand Up @@ -1102,7 +1102,7 @@ fun PostListingCard(
onBlockCreatorClick = onBlockCreatorClick,
showReply = showReply,
account = account,
modifier = Modifier.padding(horizontal = LARGE_PADDING)
modifier = Modifier.padding(horizontal = MEDIUM_PADDING)
)
}
}
Expand All @@ -1120,7 +1120,7 @@ fun MetadataCard(post: Post) {
OutlinedCard(
shape = MaterialTheme.shapes.medium,
modifier = Modifier
.padding(vertical = MEDIUM_PADDING, horizontal = LARGE_PADDING)
.padding(vertical = MEDIUM_PADDING, horizontal = MEDIUM_PADDING)
.fillMaxWidth(),
content = {
Column(
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/jerboa/ui/theme/Sizes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ val XL_PADDING = 16.dp
val XXL_PADDING = 20.dp
val XXXL_PADDING = 24.dp

val ICON_SIZE = 36.dp
val MEDIUM_ICON_SIZE = 64.dp
val ICON_SIZE = 20.dp
val MEDIUM_ICON_SIZE = 48.dp
val LARGER_ICON_SIZE = 80.dp
val DRAWER_BANNER_SIZE = 96.dp
val PROFILE_BANNER_SIZE = 128.dp
val LINK_ICON_SIZE = 36.dp
val POST_LINK_PIC_SIZE = 104.dp
val POST_LINK_PIC_SIZE = 70.dp

val DRAWER_ITEM_SPACING = 24.dp

Expand Down