11---
22date: 2025-09-12
3- title: Preview of LibrePCB 2.0 UI
3+ title: Preview of LibrePCB 2.0's Next-Gen UI
44author: U. Bruhin
55preview: new-window.png
66---
77
8- I've made a lot of progress with the new user interface for LibrePCB 2.0 and
9- am very excited to share some insights how it will look, and how it makes
10- LibrePCB better in many ways.
8+ I've made a lot of progress with the completely new user interface for
9+ LibrePCB 2.0 and am very excited to share some insights how it will look,
10+ and how it makes LibrePCB better in many ways.
1111
1212The Original Problem
1313--------------------
@@ -20,8 +20,8 @@ library editor etc.):
2020[.imageblock]
2121{{< imglink "old windows" "old-windows.png" >}}
2222
23- But with more features added over time, the UI got more and more crowded. Also
24- the paradigm of separate windows is often cumbersome to work with -- e.g.
23+ But with more features added over time, the UI got more and more cluttered.
24+ Also the paradigm of separate windows is often cumbersome to work with -- e.g.
2525having just one library and one project opened required to constantly switch
2626between four(!) windows. Even a dual-monitor setup was not enough to work
2727efficiently with LibrePCB. So it was clear we need a completely new
@@ -38,52 +38,53 @@ In the blog post
3838link:{{< relref "blog/2024-10-17_roadmap_2.0/index.adoc" >}}[NGI0 Grant for LibrePCB 2.0]
3939I listed a few possible solutions how to build a more modern user interface. The
4040most promising option was https://slint.dev/[Slint], a relatively new UI
41- toolkit (written in Rust) which uses a custom, declarative language to describe
42- the UI. Declarative means that relations and behavior can be described in the
43- language :
41+ toolkit (open-source & written in Rust) which uses a custom, declarative
42+ language to describe the UI. With the declarative approach, relations and
43+ behavior can be easily specified right in the UI description :
4444
4545{{< highlight qml >}}
4646Window {
4747 Button {
48- x: parent.width - self.width - 5px;
49- y: 5px;
48+ x: parent.width - self.width - 5px; // place 5px from the right border
49+ y: 5px; // place 5px from the top border
5050 text: @tr("Open Project");
5151 }
5252}
5353{{< /highlight >}}
5454
55- It may sound trivial to place a button in the top right edge of its parent,
55+ It may sound trivial to place a button at the top right corner of its parent,
5656but with the procedural approach of Qt this is not trivially doable. In many
5757cases, it requires to implement event handlers in C++ which update the
5858widgets position whenever the parent object's size or the widgets's own size
5959has changed. Writing such code is time-consuming and error-prone, while the
60- declarative approach of Slint is very quick, easy and safe. Now consider this
61- advantage for a large project like LibrePCB, that contains hundrets or even
62- thousands of UI elements -- here the declarative approach is really a
63- game-changer!
60+ declarative approach of Slint is quick, easy and safe -- not just for
61+ this trivial example, but also in more complex cases. For a large project like
62+ LibrePCB, which consists of hundrets of UI elements, the declarative approach
63+ is really a game-changer for us developers !
6464
6565An Incremental Migration
6666------------------------
6767
6868Unfortunately, even with several months of full-time work, LibrePCB is too
69- big to be migrated to Slint by 100% at once -- to avoid delaying the next
69+ large to be migrated to Slint by 100% at once -- to avoid delaying the next
7070release too much, we need to do the migration in steps. All the main windows &
7171editors first, and the remaining dialogs and wizards in later releases. Also
7272our whole business logic depends on Qt (it is much more than just a UI
73- framework) so the dependency on Qt will remain for a long time.
73+ framework), thus our dependency on Qt will remain for a long time.
7474
7575So the question is, can we mix Qt with Slint? In the end, LibrePCB only works
7676if the main thread is running Qt's event loop. But Slint only works when the
77- main thread is running their event loop. So at first glance it seems we
77+ main thread is running _their_ event loop. So at first glance it seems we
7878have a very bad conflict here :-/
7979
8080In fact, Slint supports
8181https://docs.slint.dev/latest/docs/slint/guide/backends-and-renderers/backends_and_renderers/[different backends]
8282for interaction with the underlying system, e.g. for input events handling
83- and window drawing. These are Qt, https://docs.rs/winit/latest/winit/[winit]
84- and LinuxKMS. Winit comes with the ability of GPU-accelerated rendering,
85- which would be interesting for performance reasons. But unfortunately we
86- can't use winit because of the event loop conflict.
83+ and window drawing. These are (interestingly) Qt,
84+ https://docs.rs/winit/latest/winit/[winit] and LinuxKMS. Winit comes with the
85+ ability of GPU-accelerated rendering, which would be interesting for
86+ performance reasons. But unfortunately right now we can't use winit because
87+ of the event loop conflict.
8788
8889Luckily Slint's Qt backend avoids that problem since Slint will run Qt's
8990event loop for us. So the event loop will process the events for both, the
@@ -96,7 +97,7 @@ One Window For Everything
9697-------------------------
9798
9899Enough background information for now, let's have a look at the new UI of
99- LibrePCB 2.0. The most important thing is that all the separate windows
100+ LibrePCB 2.0. The most important thing is that all the individual windows
100101mentioned above have been replaced by a single, multifunctional window.
101102Within that window, any kind of "document" (e.g. a footprint, a schematic or
102103a board) is opened as a tab. The toolbars of the new window now depend on
@@ -115,15 +116,15 @@ individual tabs.
115116Sidebar & Panel
116117~~~~~~~~~~~~~~~
117118
118- A lot of functionality is accessible through the sidebar. Depending on context,
119- there are different kinds of panels available. For example if you're working
120- on a schematic, there is a panel which displays ERC messages. But if you're
121- working on a board, that panel will display DRC messages.
119+ A lot of functionality is accessible through the new sidebar. Depending on
120+ context, there are different kinds of panels available. For example if you're
121+ working on a schematic, there is a panel which displays ERC messages. But if
122+ you're working on a board, that panel will display DRC messages.
122123
123124[.imageblock]
124125{{< imglink "side panels" "side-panels.png" >}}
125126
126- The sidebar shows you status information about various parts of the
127+ The sidebar also shows you status information about various parts of the
127128application. For example you see if there are ERC warnings or outdated
128129workspace libraries without even opening the corresponding panel:
129130
@@ -134,7 +135,7 @@ Working Area
134135~~~~~~~~~~~~
135136
136137The most important part of our UI is of course the working area where you
137- draw schematics, layout traces etc. This area has been improved in many ways.
138+ draw schematics or layout traces etc. This area has been improved in many ways.
138139Not only that _everything_ is now a tab (remember that schematics were not
139140tabs in the old UI), you can now even split the window into multiple sections
140141and open tabs side-by-side. For example if you're working on a single-monitor
@@ -148,17 +149,18 @@ In addition, the working area has been maximized and decluttered to have as
148149much of the screen size available for the graphics view as possible. For
149150example, tool buttons are now overlays inside the editors rather than
150151traditional toolbars spanning the whole window height or width even if
151- only a third of them is filled with buttons.
152+ only a third of them is filled with buttons. There is no such wasted space
153+ anymore in the new UI.
152154
153155Statusbar & Notifications
154156~~~~~~~~~~~~~~~~~~~~~~~~~
155157
156158We already had a status bar in the old UI, but it was purely visual and not
157159interactive. Instead of just _displaying_ the grid interval, the new UI
158- allows you to modify the grid interval and the grid style right in the status
160+ allows you to _modify_ the grid interval and the grid style right in the status
159161bar -- no dedicated dialog window is required anymore. Also the state of
160- placement locks is not only visible, but can be toggled right in the status
161- bar. Last but not least, there is a completely new notification system which
162+ placement locks is displayed and can be toggled right in the status bar.
163+ Last but not least, there is a completely new notification system which
162164displays messages and ongoing operations in an expandable/collapsible popup
163165in the bottom right corner:
164166
@@ -183,7 +185,7 @@ Simplified Library Management
183185The old library manager was not that bad, but it was more complicated than
184186necessary due to its "operation-based" workflow of manually triggering the
185187installation or uninstallation of libraries, with those operations even
186- spread across multiple list views and tabs .
188+ spread across multiple list views and pages .
187189
188190The new library manager is much simpler (but as functional as before)
189191by following a "state-based" paradigm now. Instead of triggering the
@@ -212,7 +214,7 @@ This is now possible by changing the transparency of those objects:
212214Built-In Hints, Tips & Guides
213215-----------------------------
214216
215- In our opinion , an EDA tool should support engineers/makers as good as
217+ In my vision , an EDA tool should support engineers/makers as good as
216218possible (in a non-disruptive way) to help them creating PCB designs without
217219errors as quick as possible. The new UI has therefore various new tips & hints
218220implemented which show up in certain situations. Many of them are especially
@@ -223,8 +225,8 @@ As an example, the built-in PCB ordering feature now displays the state of
223225the electrical- & design-rule checks as a friendly reminder to review & fix
224226any issues before ordering a (possibly faulty) PCB. The order panel contains
225227direct hyperlinks to the ERC & DRC panels, and even allows to run the DRC
226- right from the order panel. In addition, as a psychological effect the order
227- button is only highlighted if there are no issues, though it is always
228+ right from the order panel. And as an additional psychological effect, the
229+ order button is only highlighted if there are no issues, though it is always
228230clickable. 🤓
229231
230232[.imageblock.rounded-window.window-border]
@@ -250,19 +252,20 @@ release. Just a few examples:
250252
251253And of course a lot of new non-UI features are beeing developed for LibrePCB
2522542.0 and beyond, this blog post just focused on the UI things due to its huge
253- impact .
255+ relevance in this moment .
254256
255257Give it a Try!
256258~~~~~~~~~~~~~~
257259
258260If you like to try out the new UI already, we have nightly builds available
259261*https://download.librepcb.org/nightly_builds/new-ui-with-file-format-1_0/[here]*.
260262In contrast to the current `master` branch, these builds still use the stable
261- file format 1.0 so no changes will be made to your library and project files.
263+ file format 1.0 so no changes will be made to your library- and project files.
262264But of course there might still be some bugs -- if you experience any issues
263265or annoyances, or have any other feedback, please
264266link:{{< relref "help/help/index.adoc" >}}[let us know]!
265267
266- Regarding timeline for LibrePCB 2.0: There are still some new features to be
267- implemented and it is hard to say when they are finished. But roughly I'd
268- estimate it should be ready in around 2-3 months.
268+ Btw, if you are curious about the timeline of the LibrePCB 2.0 release:
269+ There are still some new features to be implemented (mostly non-UI things now)
270+ and it is hard to say when they are finished. But roughly I'd estimate it
271+ should be ready in around 2-3 months.
0 commit comments