This week in SixtyFPS

27th of September to 3rd of October 2021

Posted on October 4, 2021

SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++, and JavaScript. Find more information at https://sixtyfps.io/ or go straight to github at https://github.com/sixtyfpsui/sixtyfps

SixtyFPS UI Library

  • New Features
    • Add moved and pressed-changed callback to TouchArea ( 0aecec )
    • Add API to sixtyfps::Image in Rust and C++ to access the optional path ( 4eef8c )
    • New widget: StandardButton ( 671df0 )
    • Builtin can now have default binding on properties that are inherited from a NativeClass ( 3cf908 )

      And make the Window have a NativeClass parent, so it can be re-used for the Dialog

    • Add the Dialog element ( 7f05bf )
  • Demos and Examples
    • Add an example using bash and jq together with the viewer application to add GUIs to scripts ( 672c95 )
    • Todo example: clear the line edit when adding a Todo item ( 54c848 )
  • Fixes
    • Fix abrupt process abort when showing a window with constraints in Weston/Wayland ( 137ad3 )

      Don't apply constraints to the winit window if we're in fullscreen mode, as that might result in us allocating a surface that's bigger than the screen, which in turn may result in the process exiting right away.

      Fixes #532

    • Fluent style: The Slider and ScrollBar now updates as the mouse moves ( 28fd5a )

      Fixes #494

    • Handle the Keypad Enter as Return ( 465857 )

      Fixes #525 : LineEdit::accepted doesn't react on numpad Enter

    • Fix compilation with Qt 6.2.0 and MSVC ( f6f06a )

      Apply the same fix as woboq/qmetaobject-rs#fb6e8c

    • GL backend: Fix rendering of SVGs with text inside ( 87dc98 )

      It works with the Qt backend, and it should work with the GL backend as well. usvg supports it, uses the same underlying shaper and the API even allows sharing the font database.

    • Qt backend: Fix drawing of the TextInput with vertical alignment ( 33e051 )

      This aligns the text properly in the LineEdit

    • Native style: Fix size of button with icon ( c7227f )

      Some styles recompute the size based on the contents given in the QStyleOptionButton, Some styles need to be given the icon in their content size. And this was not done properly

    • Fix TabWidget drawing with the Qt Fusion style ( e858b3 )

      - The Tab must be drawn before the contents, because the style draws something under the active tab, outside of its region - Also set the QStyleOptionTab::HasFrame flag since we are in the equivalent of a QTabWidget

    • Native style: use the QPalette for the placeholder color in a LineEdit ( a72c44 )
    • Fix the default Text color overriding a color specified in a two way binding ( fd435e )

      We just need to adjust the priority of the default binding to be a high value (eg, less priority) since the other values must always win.

      This fixes the placeholder text color

    • Fix rendering with OpenGL ES 2.0 (684fcc8)

      Glutin panics when requesting GlLatest on a GLES-only display that doesn't support Desktop GL. So request GLES 2.0 before falling back to GlLatest.

    • Reduce memory consumption for text rendering with the GL backend (91ffb4)

      Use new femtovg API and the memmap2 crate to map font files from disk into RAM, instead of allocating memory on the heap for each file.

  • Janitor work

    Changes: 5935b9, 7a2f36, 5c7a8e, 21f985, efae60

Contributions in 3rd party projects

Contributions submitted to third-party projects.

FemtoVG

  • Add support for sharing font data with the application (PR #50)

    This change set adds support for supplying the font data with an application-supplied type that implements AsRef<[u8]>. This allows applications to for example supply reference-counted (shared) font data, instead of femtovg always taking a copy. The added API also allows for applications to specify face indices when using TrueType font collections and extends add_font_dir to support such collections.

  • Fix rendering into FBOs with OpenGL ES 2.0 (PR #51)

    This change set fixes the stencil buffer attachment to not use a combined depth buffer, as that's not supported in GLES 2.0. With WebGL 1.0 there's an extension that allows for it, but we don't need that anymore by switching directly to a stencil-only attachment, which is all we need.

Applications

News about applications built with SixtyFPS.

  • cargo-ui
    • Improve the dependency tree view
      • Dependency tree: default to collapsed dependency ( ea74ae )

        Only show by default direct dependency from the workspace

      • Show the dependency kind in the dependency tree ( 3c36bb )
      • Make the tree view a bit nicer ( d0558e )
    • Filter the feature for the given package when a package is selected ( 7d0a1e )
    • Allow passing arguments to cargo run ( d69355 )

Statistics

37 patches were committed by 2 authors.