GTK: Showcase configuration using broadwayd
ci/woodpecker/push/docs Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Johannes Frohnmeyer 2023-01-29 17:19:02 +01:00
parent 14a23fdfed
commit 4967410f51
Signed by: Johannes
GPG Key ID: E76429612C2929F4
2 changed files with 16 additions and 0 deletions

View File

@ -25,6 +25,20 @@ tasks.compileJava {
}
tasks.runShadow {
if (project.hasProperty("showcase")) {
environment("GTK_THEME", "Adwaita")
environment("GDK_BACKEND", "broadway")
environment("BROADWAY_DISPLAY", ":5")
var proc: Process? = null
doFirst {
proc = Runtime.getRuntime().exec(arrayOf("gtk4-broadwayd", ":5"))
Runtime.getRuntime().exec(arrayOf("xdg-open", "http://127.0.0.1:8085"))
Thread.sleep(1000)
}
doLast {
if (proc != null) Runtime.getRuntime().exec(arrayOf("kill", proc!!.pid().toString()))
}
}
workingDir = rootProject.projectDir
environment("GTK_DEBUG", "interactive") // interactive:actions
jvmArgs("--enable-preview", "--enable-native-access=ALL-UNNAMED")

View File

@ -36,6 +36,8 @@ public class SettingsWindow extends Window {
view.append(bottomBar);
child = view;
setDefaultSize(720, 360);
}
public void addTab(SettingsTab tab, @PropertyKey(resourceBundle = I18n.BUNDLE) String title, String iconName) {