Commit Graph

9 Commits

Author SHA1 Message Date
Alessandro Portale
0650fe14e5 Utils: Update Figma text tokens
This adds UiElementLabelMedium and UiElementLabelSmall.

Change-Id: I592f2bdf7a4d0a98e38ea69c33cf1b27040f7eea
Reviewed-by: hjk <hjk@qt.io>
2024-06-05 14:30:00 +00:00
hjk
971938421c Use LayoutBuilder V2
This puts the implementation introduced in acf1ecb47f into use, after
significant simplifications in the class hierarchy. CRTP is not used
anymore, and the new tag based dispatch is also used for Layout::addItem,
effectively reducing the number of different code paths.

The Lua based settings access is disabled for now.

Change-Id: Idb6d1a25675378757c5267bdb630bcd4c1f52d34
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-27 12:38:48 +00:00
Alessandro Portale
903d01b934 Welcome: Implement new design
2024 redesign

Change-Id: I6629849921272d856f201693973a8e29c6465e94
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-02-27 16:42:10 +00:00
Alessandro Portale
7d659b446d Utils: Introduce StyleHelper::uiFontLineHeight
The "Text tokens" which are defined in Figma have an additional line
height value.

This change adds a getter function for the line heights.

Change-Id: I9513ac2f689292baf6e2c0a52fca8a1ec7f14dc1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-01-31 20:06:14 +00:00
Alessandro Portale
03db2fd6c5 Utils: Add two fonts to StyleHelper::UIElement
Change-Id: I0b4ff271ef9fe91eb369c916ad886c7d39c2e060
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-01-31 20:06:05 +00:00
Alessandro Portale
4d56f9b840 Utils: Improve metrics handling in StyleHelper::uiFont
Figma designs have font sizes defined in pixels. We want to
define font sizes in points.

This change introduces the original font pixel size values from Figma
and provides the conversion to sensible point sizes.

Change-Id: Ic8356942a9bc033d2b5cd62863d2bd0a4cc6973b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-01-31 20:05:52 +00:00
hjk
f97fd83fc9 Plugins: Add skeleton for new ExtensionManager plugin
This initial commit is merely a mockup of a ExtensionManager concept.

Change-Id: I19b2285667678a86097c043cc27a554545559eff
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-12-11 12:10:36 +00:00
Alessandro Portale
608bb8cf3d Utils: Add StyleHelper::fontToCssProperties
This function takes a QFont and returns the relevant CSS properties as a
string. Using that CSS string in Qt's HTML supporting widgets ensures
the true to detail HTML rendering of text elements with those CSS
properties.

This change also adds an HTML sample to tst_manual_widgets_uifonts.

Change-Id: I7caf3214854f6ee62ae1211015572c640fc08dc8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-12-08 09:10:50 +00:00
Alessandro Portale
723ba0fc48 Utils: Add a manual test for StyleHelper::uiFont
Visualizes the predefined ui fonts.

Change-Id: Ic0af15ab149b213a59bf8e22cf7e17ab9042c54e
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-07 15:22:54 +00:00