GTK: Showcase configuration using broadwayd
This commit is contained in:
parent
14a23fdfed
commit
4967410f51
|
@ -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")
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue