mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 09:38:32 +02:00
fix(bar): use truncated labels for titles
This commit introduces a new wrapper, CustomUi, which is used to implement custom methods on top of eframe::egui::Ui. The default ui::add_sized method always has the text in a label centered, which is not desirable for a status bar where the layout should be ltr. A new function CustomUi::add_sized_left_to_right has been added to ensure that labels can be truncated with a custom width (which requires allocate_ui_with_layout), while also retaining the ability for the text to be aligned to the left rather than the center of the allocated layout.
This commit is contained in:
@@ -408,6 +408,11 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"max_label_width": {
|
||||
"description": "Max label width before text truncation (default: 400.0)",
|
||||
"type": "number",
|
||||
"format": "float"
|
||||
},
|
||||
"monitor": {
|
||||
"description": "Monitor options",
|
||||
"type": "object",
|
||||
|
||||
Reference in New Issue
Block a user