Skip to content

Commit c13a04a

Browse files
committed
add a bit of spacing when resizing to smaller formats
1 parent 0764c92 commit c13a04a

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ the [Discord](https://discord.gg/XtAuqsJWby).
66

77
- Made installing from CurseForge when automatic downloading is not supported easier, this will now watch your download
88
directory to load the file once it has been downloaded!
9+
- Improved GUI scale handling, and added a setting to manually set the GUI scale Resourcify will use.
10+
- Added Spanish translations
11+
by [pilahito](https://github.com/pilahito) ([#87](https://github.com/DeDiamondPro/Resourcify/issues/87))
912
- Added Russian translations
1013
by [ReMatrixed](https://github.com/ReMatrixed) ([#76](https://github.com/DeDiamondPro/Resourcify/pull/76))
1114
- Fixed issues with not being able to close the update GUI

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mod_name = Resourcify
22
mod_id = resourcify
3-
mod_version = 1.7.1
3+
mod_version = 1.7.2
44

55
org.gradle.jvmargs=-Xmx4G
66
org.gradle.parallel=true

src/main/kotlin/dev/dediamondpro/resourcify/gui/PaginatedScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import kotlin.math.floor
2929

3030

3131
abstract class PaginatedScreen(private val adaptScale: Boolean = true, private val minimumWidth: Float = 500f) : WindowScreen(
32-
version = ElementaVersion.V5,
32+
version = ElementaVersion.V8,
3333
drawDefaultBackground = true
3434
) {
3535
private var defaultScale = -1

src/main/kotlin/dev/dediamondpro/resourcify/gui/browsepage/BrowseScreen.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import dev.dediamondpro.resourcify.Constants
2121
import dev.dediamondpro.resourcify.config.SettingsPage
2222
import dev.dediamondpro.resourcify.constraints.ChildLocationSizeConstraint
2323
import dev.dediamondpro.resourcify.constraints.MaxComponentConstraint
24-
import dev.dediamondpro.resourcify.constraints.WindowMinConstraint
2524
import dev.dediamondpro.resourcify.elements.DropDown
2625
import dev.dediamondpro.resourcify.elements.Icon
2726
import dev.dediamondpro.resourcify.elements.McImage
@@ -49,6 +48,7 @@ import net.minecraft.client.gui.screens.Screen
4948
import java.awt.Color
5049
import java.io.File
5150
import java.util.concurrent.CompletableFuture
51+
import kotlin.math.min
5252

5353
class BrowseScreen(
5454
val type: ProjectType,
@@ -64,7 +64,9 @@ class BrowseScreen(
6464
private val contentBox = UIContainer().constrain {
6565
x = CenterConstraint()
6666
y = 4.pixels()
67-
width = ChildBasedSizeConstraint(padding = 4f)
67+
width = MinConstraint(ChildBasedSizeConstraint(padding = 4f), basicWidthConstraint {
68+
window.getWidth() - 8
69+
})
6870
height = 100.percent()
6971
} childOf window
7072

@@ -78,7 +80,7 @@ class BrowseScreen(
7880
private val mainBox = UIContainer().constrain {
7981
x = 0.pixels(alignOpposite = true)
8082
y = 0.pixels()
81-
width = WindowMinConstraint(528.pixels())
83+
width = basicWidthConstraint { min(528f, window.getWidth() - 172) }
8284
height = 100.percent()
8385
} childOf contentBox
8486

src/main/kotlin/dev/dediamondpro/resourcify/gui/projectpage/ProjectScreen.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import dev.dediamondpro.minemark.elementa.style.MarkdownStyle
2121
import dev.dediamondpro.minemark.elementa.style.MarkdownTextStyle
2222
import dev.dediamondpro.minemark.style.LinkStyleConfig
2323
import dev.dediamondpro.resourcify.constraints.ChildLocationSizeConstraint
24-
import dev.dediamondpro.resourcify.constraints.WindowMinConstraint
2524
import dev.dediamondpro.resourcify.elements.McImage
2625
import dev.dediamondpro.resourcify.elements.Paginator
2726
import dev.dediamondpro.resourcify.elements.TextIcon
@@ -46,6 +45,7 @@ import java.awt.Color
4645
import java.io.File
4746
import java.net.URI
4847
import java.util.concurrent.CompletableFuture
48+
import kotlin.math.min
4949

5050
class ProjectScreen(
5151
val service: IService,
@@ -65,7 +65,9 @@ class ProjectScreen(
6565
private val contentBox = UIContainer().constrain {
6666
x = CenterConstraint()
6767
y = 4.pixels()
68-
width = ChildBasedSizeConstraint(padding = 4f)
68+
width = MinConstraint(ChildBasedSizeConstraint(padding = 4f), basicWidthConstraint {
69+
window.getWidth() - 8
70+
})
6971
height = ChildLocationSizeConstraint() + 4.pixels()
7072
} childOf scrollBox
7173

@@ -79,7 +81,7 @@ class ProjectScreen(
7981
private val mainBox = UIContainer().constrain {
8082
x = 0.pixels(alignOpposite = true)
8183
y = 0.pixels()
82-
width = WindowMinConstraint(528.pixels())
84+
width = basicWidthConstraint { min(528f, window.getWidth() - 172) }
8385
height = ChildLocationSizeConstraint()
8486
} childOf contentBox
8587

0 commit comments

Comments
 (0)