Skip to content

Commit c9b3052

Browse files
Fix system bar issue and update to Godot 4.5 beta 5 (#68)
* Update to Godot 4.5 beta5 * Fix system bar issue * Update GodotApp.patch
1 parent 9ebabc7 commit c9b3052

4 files changed

Lines changed: 17 additions & 19 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ env:
1111
# Which godot version to use for exporting.
1212
GODOT_VERSION: 4.5
1313
# Which godot release to use for exporting. (stable/rc/beta/alpha)
14-
GODOT_RELEASE: beta4
14+
GODOT_RELEASE: beta5
1515
# Used in the editor config file name. Do not change this for patch releases.
1616
GODOT_FEATURE_VERSION: 4.5
1717
# Commit hash
18-
GODOT_COMMIT_HASH: 2d113cc22
18+
GODOT_COMMIT_HASH: c81fd6c
1919
PROJECT_NAME: VectorTouch
2020
BUILD_OPTIONS: target=template_release lto=full production=yes deprecated=no minizip=no brotli=no vulkan=no openxr=no use_volk=no disable_3d=yes disable_physics_2d=yes disable_navigation_2d=yes modules_enabled_by_default=no module_freetype_enabled=yes module_gdscript_enabled=yes module_svg_enabled=yes module_jpg_enabled=yes module_text_server_adv_enabled=yes graphite=no module_webp_enabled=yes module_mbedtls_enabled=yes swappy=no build_profile=../vectortouch/.github/disabled_classes.build
2121
GODOT_REPO: https://github.com/godotengine/godot.git

export_presets.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ shader_baker/enabled=false
5656
xr_features/xr_mode=0
5757
gesture/swipe_to_dismiss=false
5858
screen/immersive_mode=false
59+
screen/edge_to_edge=false
5960
screen/support_small=true
6061
screen/support_normal=true
6162
screen/support_large=true
6263
screen/support_xlarge=true
63-
screen/edge_to_edge=false
64-
screen/background_color=Color(0, 0, 0, 1)
64+
screen/background_color=Color(0.101960786, 0.101960786, 0.101960786, 1)
6565
user_data_backup/allow=false
6666
command_line/extra_args=""
6767
apk_expansion/enable=false
@@ -281,12 +281,12 @@ shader_baker/enabled=false
281281
xr_features/xr_mode=0
282282
gesture/swipe_to_dismiss=false
283283
screen/immersive_mode=false
284+
screen/edge_to_edge=false
284285
screen/support_small=true
285286
screen/support_normal=true
286287
screen/support_large=true
287288
screen/support_xlarge=true
288-
screen/edge_to_edge=false
289-
screen/background_color=Color(0, 0, 0, 1)
289+
screen/background_color=Color(0.101960786, 0.101960786, 0.101960786, 1)
290290
user_data_backup/allow=false
291291
command_line/extra_args=""
292292
apk_expansion/enable=false

godot_only/GodotApp.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- GodotAppOriginal.java 2025-08-02 16:51:43.415399621 +0530
2-
+++ GodotApp.java 2025-08-02 12:41:12.176163024 +0530
1+
--- GodotAppOriginal.java 2025-08-07 12:07:46.000000000 +0530
2+
+++ GodotApp.java 2025-08-07 19:36:45.992086899 +0530
33
@@ -34,6 +34,8 @@
44
import org.godotengine.godot.GodotActivity;
55

@@ -17,7 +17,7 @@
1717
static {
1818
// .NET libraries.
1919
if (BuildConfig.FLAVOR.equals("mono")) {
20-
@@ -66,9 +69,10 @@
20+
@@ -67,9 +70,10 @@
2121

2222
@Override
2323
public void onCreate(Bundle savedInstanceState) {
@@ -29,10 +29,10 @@
2929
}
3030

3131
@Override
32-
@@ -81,5 +85,8 @@
32+
@@ -82,5 +86,8 @@
3333
public void onGodotMainLoopStarted() {
3434
super.onGodotMainLoopStarted();
35-
runOnUiThread(updateImmersiveAndEdgeToEdgeModes);
35+
runOnUiThread(updateWindowAppearance);
3636
+ new Handler(Looper.getMainLooper()).postDelayed(() -> {
3737
+ isAppReady = true;
3838
+ }, 300);

src/autoload/HandlerGUI.gd

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,12 @@ func set_system_bar_color(color: Color, override_appearance := false) -> void:
3434
var decorView: JavaObject = window.getDecorView()
3535
decorView.setBackgroundColor(color.to_argb32())
3636

37-
if (is_light_system_bars != (color.get_luminance() > 0.5)) or override_appearance:
38-
is_light_system_bars = color.get_luminance() > 0.5
39-
var wic = JavaClassWrapper.wrap("android.view.WindowInsetsController")
40-
var insets_controller = window.getInsetsController()
41-
insets_controller.setSystemBarsAppearance(
42-
wic.APPEARANCE_LIGHT_STATUS_BARS if is_light_system_bars else 0, wic.APPEARANCE_LIGHT_STATUS_BARS)
43-
insets_controller.setSystemBarsAppearance(
44-
wic.APPEARANCE_LIGHT_NAVIGATION_BARS if is_light_system_bars else 0, wic.APPEARANCE_LIGHT_NAVIGATION_BARS)
37+
if (is_light_system_bars != (color.get_luminance() > 0.45)) or override_appearance:
38+
is_light_system_bars = color.get_luminance() > 0.45
39+
var WindowInsetsControllerCompat = JavaClassWrapper.wrap("androidx.core.view.WindowInsetsControllerCompat")
40+
var controller = WindowInsetsControllerCompat.call("<init>", window, window.getDecorView())
41+
controller.setAppearanceLightNavigationBars(is_light_system_bars)
42+
controller.setAppearanceLightStatusBars(is_light_system_bars)
4543

4644
activity.runOnUiThread(android_runtime.createRunnableFromGodotCallable(callable))
4745

0 commit comments

Comments
 (0)