Own GUI while making mobile app

Is there possibility of full blown graphical programming of the interface that is used at phone app?

Thank you.

1 Like

Welcome to the community!

Can you explain a bit more about what you mean?

Are you asking specifically about the Librem 5?

I’m not much of a GUI programmer but my understanding is that you would use GTK to make a GUI application for the Librem 5 while at the same time GTK should also work on a Linux desktop / laptop.

1 Like

Can one make custom interface in GTK or do I have to relly on systems theme?

1 Like

Did you check the gtk website https://www.gtk.org/ for info on gui development?

1 Like

If you want to look into GUI development with GTK, I recommend using tools like Glade or Cambalache. You can create/design UI with these tools separate as XML files and load them within your code using GtkBuilder. Glade works only for GTK3 while Cambalache is designed for GTK3 and GTK4.

If you target the Librem 5 or other mobile Linux devices, you want to use widgets from libhandy in combination with GTK3 or widgets from libadwaita with GTK4.

As programming language you have multiple well supported options. I personally like to use Python or C. But Vala or Rust should be pretty good options as well.

One additional hint: Compiler languages like C/C++ or Rust can be beneficial to run your software more efficiently. So in case you want to make a rather complex application which might drain the battery, it’s probably better to stick with compiler languages to optimize runtime. For smaller tools/apps, pick what’s working best for you. Having choice is generally great.

2 Likes

GTK will typically use the system-wide theme. But you can make custom changes to it with CSS or if necessary, you could even add custom widgets or render them manually with Cairo or OpenGL.

If you are looking for a complete custom style, you might want to look into other options besides GTK which allow further customization than style sheets. You could also render your own widgets and UI manually using OpenGL. Other options I could recommend would be Qt or Godot 3 (Godot 4 does not work with the Librem 5 yet).

1 Like