mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-02 21:03:00 +00:00
Fix large icons in menu items enlarging the menus unnecessarily
Size them according to the icon size and preserve the aspect-ratio.
This commit is contained in:
parent
43a3b9a6b3
commit
b6421b0730
1 changed files with 3 additions and 0 deletions
|
|
@ -139,6 +139,9 @@ export component MenuItemBase {
|
|||
Image {
|
||||
source: entry.icon;
|
||||
accessible-role: none;
|
||||
image-fit: contain;
|
||||
width: 100%;
|
||||
height: label.font-metrics.ascent - label.font-metrics.descent;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue