Warning
libbricks is currently in very early development. Bugs and missing features abound. If you want to use it then expect to have to help out.
The missing GTK4 platform library for reactionaries and curmudgeons.
Provides the necessary pieces for developing traditional desktop applications using GTK4.
Goals:
- Provide a positive description of how a generic GTK4 application should look and feel.
- Provide widgets implementing common patterns to improve consistency between apps and enable user theming using CSS.
- Fix the GTK user experience in tiling window managers, where client side decorations don't make sense.
- Bring back the (probably misremembered) golden age of desktop application design. Make GTK great again!
Non-goals:
- Replace
libadwaita. Gnome applications will continue to look and behave like gnome applications. That is fine.libadwaitais developed independently of GTK specifically to enable efforts likelibbricksto exist. - Patch in support for platform specific APIs. If you want to know where your windows are then adding
libbrickswon't help. - Bring about the year of the Linux mobile phone.
libbricksis for writing desktop applications. No compromises.
What we aim to provide:
- Named container and widget classes that allow applications to be assembled without dipping into CSS (in progress).
- Human Interface Guidelines that try to describe what it means to be a "traditional desktop application" and how to build one (in progress).
- Helpers for loading icon and widget themes.
- Demo application for illustrating patterns and testing themes (todo).
- A curated set of widget themes, tested with each release (todo).
- An updated baseline true colour icon theme (todo).
- Generic choosers and dialogs that support typeahead and look good with server side decorations (might be out of scope).
- A community of like-minded developers (todo).
- A curated list of applications that follow the
libbricksstyle (todo).
libbricks is developed as a monorepo, but its components are designed to be packaged separately.
GTK4 contains the common core of components for both Gnome and non-Gnome applications. Libadwaita adds the Gnome specific components. This is us stepping up to provide the bits that don't make sense in Gnome. Hopefully it will reduce the bickering that Gnome developers currently have to put up with.
Insert Venn diagram with [libadwaita [GTK4] libbrick] and GTK2 wrapping libbricks and GTK4
libbricks applications should feel at home in Mate, XFCE and any of the numerous lightweight and tiling window managers.
One of the central goals of libbricks is to bring back themeing.
Applications are free to pick and choose different parts.
libbricks applications are structured very similarly to KDE applications.
We would like the breeze GTK theme to support libbricks widgets and will do what we can to make it straightforward.
- Bedit - https://github.com/bwhmather/bedit2 - A tabbed text editor.
Widgets:
- General:
BrkStyleManager- Supports switching theme. Should also (somehow) support registering theme specific extensions for custom widgets.BrkVisibilityGroup- Allows hiding and showing widgets as a group.
- Main window:
BrkToolBar- A box with.toolbarclass already applied.BrkToolBarView- A vertical box with top and bottom toolbars and a content area.BrkStatusBar- More general widget for displaying mostly non-interactive information at the bottom of a window.BrkGroup(?) - InBrkToolBarwill group sets of buttons separated by separators. InBrkStatusBarthey will have a border around them.BrkTabView- A tabbed container for switching between homogeneous pages.
- Other:
BrkScrollbar- Old school scroll bar supporting buttons and styling. Can, of course, be made to look like the default one with none of that.
- Dialogs:
BrkDialog- Something for centering stuff in a dialog.
- Extra information revealer.
- Windows style logo header.
- Big icon on left and form stuff on right.
- Preferences:
BrkPreferencesWindowBrkPreferencesGroup(possiblyBrkFieldSet, à la html, orBrkFrame, à la old GTK).BrkPreferencesRow
- Selection:
BrkFileChooser
Discouraged widgets:
GtkHeaderBar- Prefer server side decorations.GtkDialog- Replace withBrkDialogorBrkPreferencesWindow.GtkMessageDialog- Replace withBrkDialog.GtkAboutDialog- Replace withBrkDialog.GtkAssistant- Replacement provided without client side decorations.GtkShortcutsWindow- No replacement provided. Show keyboard shortcuts inline in menus.GtkFrame- Replaced withBrkPreferencesGroupand similar.
No client side decorations, no prisoners, no surrender!
Types of windows:
- Launchers.
- Wizards.
- Main windows.
- Tool windows.
- Settings windows.
- Keyboard shortcut windows.
- About windows.
libbricks maintains two separate contracts:
- A contract with theme authors: CSS classes.
- A contract with application developers: Widgets.
Application developers using libbricks should not need to manually set margins or separation.
Application developers using libbricks should not need to manually set CSS classes.
- XApp - https://linuxmint-developer-guide.readthedocs.io/en/latest/xapps.html - Similar goals. Gtk3 Only
- Adwaita - https://gnome.pages.gitlab.gnome.org/libadwaita/doc/ - Gnome style guide.
- Granite - https://valadoc.org/granite-7/index.htm
- Helium - https://docs.developers.tauos.co/libhelium/libhelium-1/