UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Bug with transparent apps and possible workarounds

    Scheduled Pinned Locked Moved App Development
    transparencybugterminaltranslucentproblem
    6 Posts 3 Posters 368 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • J Offline
        johndoe
        last edited by

        Hello,
        I think, it would be really nice to have transparent apps. At least for a terminal or for a messenger it would be a nice feature, if you could see the Lomiri background you selected.
        Unfortunately this does not seem to work on my device (Pixel 3a with 20.04 OTA-2) with following code:

        import QtQuick 2.6
        import QtQuick.Window 2.2
        import QtQuick.Layouts 1.3
        import QtQuick.Controls 2.2
        import Lomiri.Components 1.3
        import Qt.labs.settings 1.0
        
        ApplicationWindow {
        	flags: Qt.FramelessWindowHint | Qt.WA_TranslucentBackground
        	title: "Test-App"
        	color: "#00000000"
        }
        

        example3_mini.png example1_mini.png example2_mini.png
        The black image is how the app actually looks like and the next picture right of it is the screenshot that probably appears white, because it is a picture with transparent colors. The app only gets actually transparent, when I go to the app overview.

        This problem also seems to exist with the terminal app for some time now:
        https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/issues/57

        Is it for everyone like this or is this only on some devices the case?

        As a workaround, it would be nice, if app developers could easily get the selected Lomiri background from somewhere and place it in their app as a background.

        I tried:

        gsettings get org.gnome.desktop.background picture-uri
        

        But this only gave me the default background ('file:///usr/share/backgrounds/lomiri-default-background.png') and not the one, that was selected by me.

        Does someone know where to find for the current background or does someone have a better solution?

        K 1 Reply Last reply Reply Quote 0
        • K Offline
          kugiigi @johndoe
          last edited by

          @johndoe Honestly, I'm not sure why Canonical decided to put an opaque background behind apps but disables it on tablets or when the side-stage is enabled. So at the moment, there's no way to do it via the app. You have to hack Lomiri to disable it or configure your device as a tablet.

          I enabled side-stage on my phone so transparent app does work šŸ˜„

          screenshot20230919_023418330.png

          J 1 Reply Last reply Reply Quote 1
          • J Offline
            johndoe @kugiigi
            last edited by

            @kugiigi Oh wow, so it is actually possible. I thought it would be a some complicated problem with Lomiri.
            What is "side-stage" and how do I enable it? How would you need to hack Lomiri?

            K 1 Reply Last reply Reply Quote 0
            • K Offline
              kugiigi @johndoe
              last edited by

              @johndoe You can configure your device as a tablet. Try checking here /etc/device-info or /etc/ubuntu-touch-session.d/. However, it also has other effects such as a different lockscreen layout.

              Side-stage is the split screen-like feature in Lomiri. It's currently tied with the tablet configuration so it's only enabled if your device is detected as a tablet. You can try hacking Lomiri's code if you're fine with that. The files are at /usr/share/lomiri and the relevant codes are here https://github.com/kugiigi/jerk-packages/blob/673d73e7e9cbeaaa39dc99aa9148318da6530619/Lomiri/Lomiri_Plus/focal/MOD/Shell.qml#L3903

              This however is out of scope of the app development šŸ˜„

              KenedaK 1 Reply Last reply Reply Quote 1
              • KenedaK Offline
                Keneda @kugiigi
                last edited by

                @kugiigi
                You can force tablet mode with UTTT also.

                2015-2023 : Meizu MX4 ā˜ ļøāš°ļøāœļø
                2023-2024 : Nexus 5 ā˜ ļøāš°ļøāœļø
                2024-***** : FPOS Fairphone 5 waiting UT for freedom šŸ˜‰
                šŸ‡²šŸ‡«šŸ‡¬šŸ‡§

                K 1 Reply Last reply Reply Quote 0
                • K Offline
                  kugiigi @Keneda
                  last edited by

                  @Keneda No, that's only for stage or windowed mode which is different from being configured as a tablet.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post