Dropdown and context menus now sit on the content background (surface-main) with a more defined border (border-muted, ~22% white) instead of the elevated surface plus hairline border, so the popover edge reads cleanly against the content instead of looking coarse. cc
23 lines
661 B
Plaintext
23 lines
661 B
Plaintext
// Context-menu surface — the styled panel that hosts ContextMenuItem
|
|
// rows. Place it as the single child of a PopupWindow; the rows are
|
|
// passed as children.
|
|
|
|
import { Theme } from "../foundation/semantic-colors.slint";
|
|
import { Radius } from "../foundation/radius.slint";
|
|
|
|
export component ContextMenu inherits Rectangle {
|
|
background: Theme.surface-main;
|
|
border-radius: Radius.sm;
|
|
border-width: 1px;
|
|
border-color: Theme.border-muted;
|
|
drop-shadow-blur: 22px;
|
|
drop-shadow-color: Theme.card-shadow;
|
|
drop-shadow-offset-y: 6px;
|
|
|
|
VerticalLayout {
|
|
padding-top: 5px;
|
|
padding-bottom: 5px;
|
|
@children
|
|
}
|
|
}
|