TRichView 23.1 - RichViewActions for Lazarus for Linux

News about TRichView, ScaleRichView, ReportWorkshop, RVMedia
Post Reply
Sergey Tkachenko
Site Admin
Posts: 17684
Joined: Sat Aug 27, 2005 10:28 am
Contact:

TRichView 23.1 - RichViewActions for Lazarus for Linux

Post by Sergey Tkachenko »

We have released TRichView 23.1 and updates of related components

The main new feature in this update is the porting of RichViewActions to Lazarus for Linux.

RichViewActions is a set of components and actions designed to create a user interface for a word processor based on the TRichView editor. It includes both simple actions (such as toggling bold, italic, and underline) and actions that use dialog windows (for page, font, and paragraph properties, as well as properties of various document objects, etc.).

The user interface is translated into 30+ languages.

RichViewActions webpage: https://www.trichview.com/resources/actions/

A trial version can be download here: https://www.trichview.com/download/ . RichViewActions is a free TRichView add-on, included with source code. Unfortunately, we cannot create a trial version for Lazarus.

Previous version
https://www.trichview.com/forums/viewtopic.php?t=13650
Sergey Tkachenko
Site Admin
Posts: 17684
Joined: Sat Aug 27, 2005 10:28 am
Contact:

RichViewActions for Lazarus for Linux

Post by Sergey Tkachenko »

Lazarus for Linux

RichViewAction have been ported to Lazarus for Linux.

All dialog windows look almost the same as in the Windows version. The differences are:
  • The order of the OK and Cancel buttons has been adjusted to match the typical layout for Linux users.
  • The font properties dialog now uses TEdit + TRVFontListBox (a new component) instead of TRVFontComboBox. This change was made because TRVFontComboBox in the Linux version does not support the csSimple style.
font-dialog-lazarus-linux-en.png
font-dialog-lazarus-linux-en.png (112.54 KiB) Viewed 54979 times

Dark mode of Linux UI is supported.

text-box-properties-dark-mode-lazarus-linux.png
text-box-properties-dark-mode-lazarus-linux.png (39.52 KiB) Viewed 54979 times

There are some visual differences in the components designed for RichViewActions. In the Linux version, TRVOfficeRadioButton draws a border around the entire component instead of just the icon. This change was made because full control transparency does not work properly in Linux.
If you like this button appearance, you can enable the same style in RichViewActions for Windows by setting the global variable FullSizeDefault (from the RVOfficeRadioBtn.pas module) to True.

page-setup-default-radiobuttons.png
page-setup-default-radiobuttons.png (17.25 KiB) Viewed 54979 times
page-setup-fullsize-radiobuttons.png
page-setup-fullsize-radiobuttons.png (17.31 KiB) Viewed 54979 times

The appearance of color selection components (TRVColorCombo) in Linux is rendered using themes implemented in Lazarus. It does not fully match the standard ComboBox appearance—you may see two triangles instead of one. However, I believe the component still looks good, and using themes is preferable to manual rendering.

background-dialog-color-picker-lazarus-linux.png
background-dialog-color-picker-lazarus-linux.png (143.22 KiB) Viewed 54979 times
The color selection popup in Linux uses raised buttons instead of flat ones. This change was made because flat buttons do not display a pressed state, making it impossible to indicate the selected color and, consequently, to navigate using the keyboard.
Sergey Tkachenko
Site Admin
Posts: 17684
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Redesigned dialog windows

Post by Sergey Tkachenko »

Redesigned dialog windows

To ensure that dialog windows look good on both Windows and Linux, they have been redesigned.

The main changes include:
  • Increased spacing between controls, as edits and combo boxes in Lazarus for Linux have greater height.
  • More precise positioning of TRVOfficeRadioButton, since misalignments are more noticeable when the border is drawn around the entire control.
As a result, most dialog windows have become slightly larger.

Additionally, an optimal resizing function has been applied to all TRVOfficeRadioButton controls arranged in a single row. Now, text labels for nearly all buttons fit within a single line across different languages. Previously, this function was only used for paragraph alignment buttons in the paragraph properties dialog. This adjustment was necessary because the border around the text made the buttons require slightly more space.

You can compare buttons widths on the two screenshots below (English and Ukrainian version of the same dialog):

paragraph-border-dialog-lazarus-linux-en.png
paragraph-border-dialog-lazarus-linux-en.png (102.25 KiB) Viewed 54978 times
paragraph-border-dialog-lazarus-linux-ua.png
paragraph-border-dialog-lazarus-linux-ua.png (107.49 KiB) Viewed 54978 times

TRVOfficeRadioGroup has a new property: OptimalButtonWidths; True by default. It is applied if buttons are arranged in a single row.

The width of numeric input fields has been increased to make it easier to enter long decimal numbers, especially when measurements are not in pixels.
Sergey Tkachenko
Site Admin
Posts: 17684
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: TRichView 23.1 - RichViewActions for Lazarus for Linux

Post by Sergey Tkachenko »

Other changes

Package structure for Lazarus

The package structure for Lazarus has been changed so that each package is in its own folder. This change is necessary to ensure that Lazarus recompiles the modules when needed. While having multiple packages in the same folder does not cause significant issues in the Windows version, it is critical for the Linux version.
  • The separation of runtime and designtime packages for Lazarus has been removed. Lazarus does not support dynamic package linking, so separating packages into designtime and runtime is not necessary.
  • The packages with DB components have been removed, and their units have been included in the main corresponding packages.
  • Some packages were moved to separate folders (GDI+ support for Lazarus, ReportWorkshop data providers for Lazarus, ReportWorkshop+ScaleRichView integration).
VirtualTree for Linux

TRichView can be used to draw and edit rich text cells in a Virtual TreeView component.
In this update, Lazarus version of TRichView+VirtualTree integration has been ported to Linux.

TRVFontListBox

New component: TRVFontListBox. This is an analog of TRVFontComboBox: a list of font names (with optional preview) that can work with TRichViewEdit or TSRichViewEdit automatically. It has the same properties as TRVFontComboBox.
Internally, it is used in the "font properties" dialog in Lazarus for Linux.

TRVAControlPanel.DialogFontName

TRVAControlPanel.DialogFontName define the font name for all dialog windows in RichViewActions.
Previously, this property contained a single font name, with the default being 'Tahoma'. Now, it contains a semicolon-separated list of fonts in order of preference. The new default value is: 'Segoe UI;Tahoma;Microsoft Sans Serif;MS Sans Serif;Arial'.
Since this property value was always saved (even when it was set to 'Tahoma'), to apply this change to existing projects, you will need to manually update the property value.

This property is only applied in VCL and Lazarus for Windows. For Lazarus for Linux, a new property has been added: DialogFontNameLin, with the default value set to 'default'. The value 'default' in Lazarus is special—it allows the font name to be automatically selected.

The font name that will be used by RichViewActions is returned by the method GetRealDialogFontName.

TRVAControlPanel.DialogPosition

A new option has been added for the TRVAControlPanel.DialogPosition property: rvafpEditorFormCenter. This option centers dialog windows in the middle of the editor form. Other possible values include centering the dialog on the screen or in the center of the main form.

Symbol fonts → Unicode

A series of changes were made to eliminate the use of fonts specific to Microsoft Windows and replace them with Unicode.

In particular:
  • TRichView no longer uses the letter "o" from the "Courier New" font to represent a circle bullet from HTML or Markdown.
  • In special character display mode, heading levels are shown using the "Wingdings" font only on Windows. On other platforms, Unicode digit-in-circle symbols are used instead.
  • Actions for paragraph bullets no longer use templates containing characters from the "Symbol" and "Wingdings" fonts, as these fonts are not available on all operating systems. Instead, equivalent Unicode characters are used from the font specified in RVDefaultLoadProperties.DefaultBulletFontName.
    If you want to continue using "Symbol" and "Wingdings" in the default bullet templates, compile your project with the RVAUSESYMBOLFONTS $define.
Post Reply