Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › theme global color

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #23910

    Bas

    hi,

     

    i have an app, and want to set the global color.

    on Android it is working but on IOS not.

        onInitTheme: {
            if(system.desktopPlatform)
                Theme.platform = "ios"
    
            // default theme setup
            Theme.colors.tintColor = "#ff0000"
    

     

     

    #23915

    Alex
    Felgo Team

    Hi Bas,

    are you referring e.g. to the color of the navigation bar? The difference is how the platforms styles use the tint color. E.g. iOS only uses it for certain controls etc. If you want to have a colored navigation bar on iOS, you need to set Theme.navigationBar.backgroundColor and other properties of the navigation bar theme accordingly.

    Best,
    Alex

    #23918

    Bas

    Hi Alex,

    on Android, the color is set nicely on IOS the color is still blue.

    so I have to set the color on every single element used in the theme?

    greetz,

    Bas

    #23921

    Alex
    Felgo Team

    Hi Bas,

    no, the tint color should be applied correctly, this must me something different then. Does it work for you with a minimal example like this?

    import Felgo 3.0
    import QtQuick 2.0
    
    App {
    
      onInitTheme: {
        Theme.platform = "ios"
    
        Theme.colors.tintColor = "#f00"
      }
    
      NavigationStack {
    
        Page {
          title: qsTr("My First App")
    
          AppButton {
            text: "I am red"
            flat: false
          }
        }
      }
    }

    Cheers,
    Alex

    #23922

    Bas

    i am loading pages, maybe that is causing the problem?

    #23923

    Bas

    yes that was it, setting the color on the first loaded page did the job on IOS

Viewing 6 posts - 1 through 6 (of 6 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded