feat: Replace hideTextInVerticalBar with maxTextLength object

- Replace boolean hideTextInVerticalBar with maxTextLength object that has
  separate horizontal and vertical properties for more flexible text length control
- Add NSpinBox controls in settings UI to configure both horizontal and
  vertical max text length independently
- Update CustomButton widget to use new maxTextLength structure and
  implement text scrolling based on direction-specific limits
- Set default values to 10 for both horizontal and vertical (was 20/0)
- Update translations and widget registry metadata accordingly
- When vertical maxTextLength is 0, text is completely hidden (preserving
  original hideTextInVerticalBar: true behavior)

This allows users to set different text length limits for horizontal and
vertical bar orientations, providing more granular control over text display.
This commit is contained in:
loner
2025-11-21 09:07:30 +08:00
parent e549cfcb78
commit 516fc47b68
4 changed files with 63 additions and 30 deletions
+7 -3
View File
@@ -123,9 +123,13 @@
"stream-description": "Enter a command to run continuously."
},
"dynamic-text": "Dynamic text",
"hide-vertical": {
"description": "If enabled, the text from the command output will not be shown when the bar is in a vertical layout (left or right).",
"label": "Hide text in vertical bar"
"max-text-length-horizontal": {
"description": "Maximum number of characters to show in horizontal bar (0 to hide text)",
"label": "Max text length (horizontal)"
},
"max-text-length-vertical": {
"description": "Maximum number of characters to show in vertical bar (0 to hide text)",
"label": "Max text length (vertical)"
},
"icon": {
"description": "Select an icon from the library.",