Skip to content

Commit 9dcf93f

Browse files
committed
Set sun.java2d.uiScale and make startscreen resizable
1 parent 74e831f commit 9dcf93f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/kotlin/be/ugent/topl/mio/ui/AboutScreen.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import com.formdev.flatlaf.themes.FlatMacDarkLaf
88
import com.formdev.flatlaf.themes.FlatMacLightLaf
99
import com.formdev.flatlaf.util.SystemInfo
1010
import java.awt.Desktop
11+
import java.awt.Dimension
1112
import java.awt.Image
1213
import javax.swing.*
1314

@@ -16,7 +17,7 @@ open class AboutScreen(protected val config: DebuggerConfig) : JFrame() {
1617
init {
1718
configureTheme()
1819
setSize(400, 300)
19-
isResizable = false
20+
minimumSize = Dimension(400, 300)
2021
val mainPanel = JPanel()
2122
mainPanel.setLayout(BoxLayout(mainPanel, BoxLayout.Y_AXIS))
2223
mainPanel.border = BorderFactory.createEmptyBorder(20, 20, 20, 20)
@@ -44,6 +45,7 @@ open class AboutScreen(protected val config: DebuggerConfig) : JFrame() {
4445
}
4546

4647
private fun configureTheme() {
48+
System.setProperty("sun.java2d.uiScale", config.uiScale)
4749
if (SystemInfo.isMacFullWindowContentSupported) {
4850
rootPane.putClientProperty("apple.awt.transparentTitleBar", true)
4951
rootPane.putClientProperty("apple.awt.fullWindowContent", true)

0 commit comments

Comments
 (0)