Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 82387c6

Browse files
bwmilbylivecodeali
authored andcommitted
[[TreeView Widget]] Mobile Support Enhancements (#7154)
* Adjust row height to reflect font size changes * Add charsToTrimFromKey property - this allows custom key sort display by removing a set number of characters from each key when rendering the widget. The array needs to be configured with characters prepended to each key that will sort in the desired order. * Add hilitedElementIsFolded property - this can be used to adjust the fold state of the selected element. * Add scroller support and custom text height - added `formattedHeight` property and `scroll` property (also includes `vScroll`) and `formattedHeightChanged` message * Add `textHeight` property - this allows for changing the default height of a row to a custom value instead of using what would be calculated. * Clear hilitedElement bug fix - If no element was selected, setting the hilitedElement to empty would throw an error. Added an additional test to ensure that the widget did not attempt to unselect and empty path. * Add vScrollbar property * Add showHover property - this allows the hover shading to be disabled. This is useful on mobile where the hover is not something that makes sense in that UI. * Save `alternate row backgrounds` property which was not being saved/restored. * Add iconHeight property - allows the setting of the size of the icons displayed in the widget. * Handle font changes and improve trimming logic - When the font size changes, re-evaluate the width of the ellipsis. - When the font name changes, re-evaluate the width of the ellipsis. - When in readOnly mode, only save space for one icon on the right. - If full string displayed, remove ellipsis length from the returned width. - `displayWidth` was reporting the incorrect width when a string was being trimmed. Keep track of the previous width to return a proper value. - Prevent the last character (key/value) from being turned into an ellipsis. - Remove padding from ellipsis width calculation. Only add padding in when looking at a key where a value also exists. No need to save space for an ellipsis and padding otherwise. * Save `show border` property * Add `showValues` property
1 parent 2e8db35 commit 82387c6

5 files changed

Lines changed: 508 additions & 91 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# [21719] Allow setting fold state of selected element
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# [22386] Save `alternate row backgrounds` property
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# [22387] Save `showBorder` property
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Properties
2+
3+
Enhance the Tree View Widget to support use on the mobile platform.
4+
5+
* Adjust row height when font name or size changes
6+
* Trimming improvements
7+
* When font name or size changes, re-evaluate ellipsis width to properly trim contents of keys/values
8+
* In `readOnly` mode, only save space for a single icon on the right
9+
* Prevent last character from being turned into an ellipsis
10+
* Width was being reported with extra space for an ellipsis when not needed
11+
* Remove padding from ellipsis width, only add padding when needed
12+
* Save `alternate row backgrounds` property
13+
* Save `show border` property
14+
15+
New properties:
16+
17+
* `charsToTrimFromKey` - allow a sorting value to be added to the front of the key that is trimmed for display
18+
* `hilitedElementIsFolded` - adjust the fold state of the selected element
19+
* `formattedHeight` - content height for scroller support
20+
* `scroll` and `vScroll` - scroll position
21+
* `textHeight` - custom row height
22+
* `vScrollBar` - control visibility of scroll bar
23+
* `showHover` - allow hover to be disabled, useful on mobile
24+
* `iconHeight` - allow configuration of icon size
25+
* `showValues` - allow the values to be hidden
26+
27+
# Signals
28+
29+
* `formattedHeightChanged` - message to report content height change to support scrollers

0 commit comments

Comments
 (0)