Brisk v0.9.7
Bug fixes for the 0.9.6 release:
- Updated ICU data loading code to resolve issues on macOS ARM64.
- Fixed a WebGPU memory leak.
- Ensured the D3D11 render context is flushed after every batch.
- Increased the minimum required CMake version to 3.22.
- Fixed
imageResize.
❗ indicates a breaking change.
Added
- Added support for SVG fonts🖋️💻.
- Added support for color emojis🔤😊.
- Resource bundling has been rewritten from scratch. Apps can now override Brisk resources, such as supplying their own fonts.
- Support for viewport-relative units (vw/vh/vmax/vmin)
- ❗ Buffered GUI mode has been introduced. The GUI is rendered to an offscreen texture, tracking the updated rectangles each frame. The texture is then blitted to the screen, significantly improving performance in cases where GUI updates are infrequent. This mode can be switched off for a specific window or globally.
- Lucide icons have been updated to latest version.
- Ability to override
ItemListvisible property. WidgetTreecan now be used without aGUIWindowandInputQueue.- New algorithm for shadow rendering by Evan Wallace.
- A new
ColorWtype has been introduced, capable of storing extended-range sRGB values in a compact form. storeWidgetfunction to store the weak pointer to the widget to an external variable during tree building.string_viewversions of thetrim,ltrimandrtrimfunctions.BRISK_ASSUMEmacro that maps to__builtin_assumeon supported compilers.SVGImage::renderToto render to an existingImage.- Resources are now packed into a binary using the
.incbinassembly instruction on supported compilers for improved performance. - HTML SAX parser added.
- Very basic HTML support in the
Textwidget viatextOption = TextOptions::HTML. - Stateless functions in
Canvasclass. - Added the ability to select the internationalization implementation: basic or ICU-based. Apps can now choose the implementation without rebuilding the Brisk binaries.
- Visual tests for widgets.
Changed
- ❗ A new implementation of widget clipping has been introduced. Widget painting can now be clipped to the parent's bounds, the parent's clip rectangle, or the widget's own bounds.
- ❗
DialogComponent::resultis now aPropertyinstead of a plain field.
Useresult.get()to retrieve the boolean value or rely on implicit conversion.
The same applies to thevalue,prompt,text, andiconfields in derived dialogs. - ❗
buttonColorhas been renamed tomainColor. - ❗ The
layoutOptionsproperty of theTextwidget has been renamed totextOptions, and theLayoutOptionstype is nowTextOptions. - ❗ The
createWindowfunction should now be overridden instead ofmakeWindowto use a custom window class for the component. - ❗ A new
isHintVisibleproperty controls whether the widget's hint is visible. - ❗ The
descriptionproperty has been removed in favor of thehintproperty. - ❗ New font size default (12 pixels).
- ❗ The
reflectionstatic field is now used to store field information (previouslyReflection). - ❗ Style variables (e.g.,
selectedColor) are now indexed by string hash instead of a linear index, making it easier to create custom variables. ComboBoxandPopupBoxmouse interaction fixes.ImplicitContextis now convertible tobool.- The descender value of Lucide icons has been adjusted to improve their alignment within text.
- The
KnobandSlidercolors can be changed by assigning theselectedColorstyle variable. Hover and pressed styles are preserved. Showcaseapp updated.- The
ReflectionOfutility class has been introduced to provide reflection information for external types. - ❗ Shell-related functions moved to the
Shellclass:Shell::showMessage,Shell::openURLInBrowser,Shell::showDialog, etc. - ❗ Clipboard-related functions moved to the
Clipboardclass:Resources::getText, etc. - ❗ Resource-related functions moved to the
Resourcesclass:Resources::load, etc. - ❗
InplacePtrandPossiblySharedtypes are removed. - ❗
uiThreadhas been renamed touiSchedulerto matchmainScheduler. - ❗
std::optionalandstd::nulloptare no more included in Brisk namespaces. Use full qualified names instead. - ❗ File IO functions now use
uint64_tinstead ofuintmax_t. - ❗ Several renames have been made to ensure style consistency (
bytes→Bytes,bytes_view→BytesView). - ❗
Bytes,BytesView, and other related types now usestd::byteinstead ofuint8_t. - ❗ The lifetime of
BindingObjectis now accessed via thelifetimefunction. Replace occurrences ofm_lifetimewithlifetime()in your code. - ❗ Font name constants moved to the
Fontclass:Fonts::Monospace→Font::Monospace. - Documentation files have been updated.
- ❗ Fonts are now set by their names, not IDs. Examples:
fontFamily = "Lato",Font{"Noto", 16}. - Performance optimizations.
- New
WrapAnywhereflag inTextOptions. - ❗ Aliases to
stdtypes removed.
Fixed
- Numerous fixes and improvements.
BRISK_SCRIPTS_DIRis now cached inCMakeCache.txt, resolving issues when Brisk is included usingadd_subdirectory.Rectangle::emptyhas been fixed to returntruefor{INT_MAX, INT_MAX, INT_MIN, INT_MIN}.BackStrikedTextnow uses opacity for painting.- Fixed contrast ratio calculation, ensuring that light text color is preferred on certain backgrounds.
findIntegralTypefixes.- Brisk now supports spaces around commas in the font list ("Lato, Noto").