• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

Pegasus theme development general

Scheduled Pinned Locked Moved Ideas and Development
pegasusqmltheme makingtheme help
156 Posts 16 Posters 50.7k Views
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.
  • F
    fluffypillow
    last edited by 16 Feb 2018, 18:56

    This is a topic for general discussion about creating themes for the Pegasus frontend, solving related issues as well as sharing tips and tricks. Feel free to ask questions or tell us about issues you've encountered while themeing.

    Useful links

    • Pegasus frontend main thread
    • Home page
    • Documentation
    • Bug and issue tracker
    1 Reply Last reply Reply Quote 2
    • L
      lilbud
      last edited by 16 Feb 2018, 19:33

      Just a few questions:

      How would I compile for Windows?

      How would I control animations?

      Can the drag and drop QT creator work for theme development?

      Creator of the Radiocade: https://retropie.org.uk/forum/topic/6077/radiocade

      Backlog: http://backloggery.com/lilbud

      F 1 Reply Last reply 16 Feb 2018, 20:17 Reply Quote 0
      • F
        fluffypillow @lilbud
        last edited by 16 Feb 2018, 20:17

        @lilbud

        • To compile for Windows, you'll first need to install Qt, then download the source code, and build the project using Qt Creator.
        • You can set animations to run automatically when an object is created or one of its properties change. As for standalone animations, they have play, stop, etc. functions (see the Methods part here).
        • In theory, yes. Last time I checked, List/GridVews didn't show up properly, but for positioning non-dynamic elements, it could be useful. I couln't really use it unfortunately, as it always crashed on me in just a few minutes.
        1 Reply Last reply Reply Quote 0
        • H
          halfmanhalfcake
          last edited by 17 Feb 2018, 18:09

          A bit of help needed.

          I am trying to replicate the cover+text gridview in this screenshot

          My code format for the delegate so far is:

          Item
          ...Column
          ......Image
          .........Text

          1. I want to create a black rectangle to host the text, where would I create that?
          2. Am I putting the text code in the wrong place? As I need it to appear below the cover, not inside
          3. If I make the item width and height bigger then it stretches the image to fit

          If this helps, this is my (very bad) code: https://pastebin.com/33pGBLK8

          F 1 Reply Last reply 17 Feb 2018, 22:30 Reply Quote 0
          • F
            fluffypillow @halfmanhalfcake
            last edited by 17 Feb 2018, 22:30

            @halfmanhalfcake The current layout is almost good, though according to the code the Image and the Text is on the same level, both under the Column. To create a black background, I'd either replace the Item with a Rectangle (easier), or create a new Rectangle and put the Text in it (this might result in moving some components around in the code later, but might be more efficient technically).

            As for the image size, that's caused by the anchor settings in the Column, set to fill the whole area. You can't use top/bottom anchors there, because the vertical alignment of the items is handled by the Column (you get a QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column. Column will not function. error in the log). However, you can anchor horizontally, and use the height property.

            Here's a version where I've changed a few bits: https://pastebin.com/ayAkN9UX (removed the anchors, fixed a warning about cell sizes in the highlight, added text width + wrapping and black background). Here's a screenshot: https://snag.gy/YpZv30.jpg.

            H 1 Reply Last reply 18 Feb 2018, 09:46 Reply Quote 1
            • L
              lilbud
              last edited by 18 Feb 2018, 01:03

              No matter where I put the flixnet theme, it never shows up in Pegasus. I put it in all the folders listed on the wiki.

              Creator of the Radiocade: https://retropie.org.uk/forum/topic/6077/radiocade

              Backlog: http://backloggery.com/lilbud

              F 1 Reply Last reply 18 Feb 2018, 16:40 Reply Quote 0
              • H
                halfmanhalfcake @fluffypillow
                last edited by 18 Feb 2018, 09:46

                @fluffypillow thanks a lot mate. Will have a look at updating and hopefully get good progress on my first theme

                1 Reply Last reply Reply Quote 0
                • F
                  fluffypillow @lilbud
                  last edited by 18 Feb 2018, 16:40

                  @lilbud Interesting; do other (eg. self-made) themes works? On which platforms does this happen?

                  T L 2 Replies Last reply 18 Feb 2018, 16:46 Reply Quote 0
                  • T
                    tronkyfran @fluffypillow
                    last edited by 18 Feb 2018, 16:46

                    @fluffypillow I had the same problem with Netflix theme on Win10 previously, Ill try again tonight, It could be my mistake too...

                    1 Reply Last reply Reply Quote 0
                    • L
                      lilbud @fluffypillow
                      last edited by 18 Feb 2018, 17:57

                      @fluffypillow I haven't tried any self-made themes yet. Only tried the flixnet theme. I put the folder into all 3 directories listed for Windows. Program Data, App Data and the Pegasus main directory but none show the theme in Pegasus itself.

                      Creator of the Radiocade: https://retropie.org.uk/forum/topic/6077/radiocade

                      Backlog: http://backloggery.com/lilbud

                      1 Reply Last reply Reply Quote 0
                      • T
                        tronkyfran
                        last edited by tronkyfran 19 Feb 2018, 09:09

                        Flixnet theme works fine on C:\ProgramData\pegasus-frontend\themes for me, tested right now on win10. The only strange thing is that it appers twice on the theme selector screen:
                        0_1519031494055_theme_load.jpg

                        On the other hand, I'm having problems with video sources, cant make any video to play, even on the simplest theme with only a video loader. It could be a codec problem? I tried everything, from mp4 to webm... Everything else is working perfectly, images load..etc, so its not a path problem I think. On windows 10.
                        If anyone can send me a video file that its checked to work I would appreciate it ;)

                        H 1 Reply Last reply 19 Feb 2018, 09:25 Reply Quote 0
                        • H
                          halfmanhalfcake @tronkyfran
                          last edited by 19 Feb 2018, 09:25

                          @tronkyfran I have the same issue with themes appearing multiple times on the setting menu, they appear 3 times for me.

                          In terms of videos, I don't have any in my collection so can't test :(

                          1 Reply Last reply Reply Quote 0
                          • T
                            tronkyfran
                            last edited by tronkyfran 19 Feb 2018, 12:30

                            Is it possible to randomly access any collection on api.collectionList or just the current one?
                            Im just messing and doing wrong coding here. Pretty fun though :D

                            PD: fluffypillow, youre going to make my employer just fire me, cant stop messing with pegasus!!!

                            1 Reply Last reply Reply Quote 0
                            • F
                              fluffypillow
                              last edited by 19 Feb 2018, 16:45

                              Hm interesting, I'll try reproducing the theme finding issues on a Win10. As for the videos, in theory if it can be played with the default media player, Pegasus should be able to play it too.

                              @tronkyfran Yes, all items of the model can be accessed by the index, setting the current index is only needed for setting the current members, but you're not forced to use that either.

                              PD: fluffypillow, youre going to make my employer just fire me, cant stop messing with pegasus!!!

                              hehe :)

                              1 Reply Last reply Reply Quote 0
                              • H
                                honorio96
                                last edited by 22 Feb 2018, 20:12

                                How to add loading spinner in flixnet theme?

                                Sorry bad english!

                                1 Reply Last reply Reply Quote 0
                                • F
                                  fluffypillow
                                  last edited by 23 Feb 2018, 11:38

                                  @honorio96 the spinner is a simple circle image, set to rotate 360 degrees infinitely:

                                  Image {
                                      anchors.centerIn: parent
                                  
                                      visible: boxFront.status === Image.Loading
                                      source: "/common/loading-spinner.png"
                                  
                                      RotationAnimator on rotation {
                                          loops: Animator.Infinite;
                                          from: 0;
                                          to: 360;
                                          duration: 500
                                      }
                                  }
                                  
                                  H 1 Reply Last reply 23 Feb 2018, 18:50 Reply Quote 0
                                  • H
                                    honorio96 @fluffypillow
                                    last edited by 23 Feb 2018, 18:50

                                    @fluffypillow said in Pegasus theme development general:

                                    @honorio96 the spinner is a simple circle image, set to rotate 360 degrees infinitely:

                                    Image {
                                        anchors.centerIn: parent
                                    
                                        visible: boxFront.status === Image.Loading
                                        source: "/common/loading-spinner.png"
                                    
                                        RotationAnimator on rotation {
                                            loops: Animator.Infinite;
                                            from: 0;
                                            to: 360;
                                            duration: 500
                                        }
                                    }
                                    

                                    Thank´s

                                    Excellent work!

                                    1 Reply Last reply Reply Quote 0
                                    • H
                                      halfmanhalfcake
                                      last edited by 23 Feb 2018, 22:07

                                      What's the best way to implement a light/dark theme control?

                                      My current idea:

                                      1. Keypress/Controller Button triggers a pop up dialog or a side config menu (similar to the settings menu in pegasus)
                                      2. Have an option to switch to light theme (default option is dark)
                                      3. Have IF statements in the color codes (dependent on the switch activated)

                                      Would this work?

                                      1 Reply Last reply Reply Quote 0
                                      • F
                                        fluffypillow
                                        last edited by 24 Feb 2018, 13:28

                                        @halfmanhalfcake Ideally there'd be a theme-specific section in the settings menu, but that's not implemented yet. Until then, yes, that idea would work too. You can also use states for this too, or eg. some global properties so you have to put if's in less places.

                                        1 Reply Last reply Reply Quote 0
                                        • H
                                          halfmanhalfcake
                                          last edited by 9 Mar 2018, 17:01

                                          What is the best way (without adding any new modules for quick controls) to create some kind of toggle or selection control?

                                          I want to create one which selects type of artwork (square/poster/wide) or light & dark theme toggle?

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

                                          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

                                            This community forum collects and processes your personal information.
                                            consent.not_received