LVRS Document Viewer
components/control/IconMenuButton.svx
Path: components/control/IconMenuButton.svx
IconMenuButton
Location: qml/components/control/buttons/IconMenuButton.qml
IconMenuButton combines a main icon and trailing menu indicator chevron.
Purpose
- Provide compact menu-trigger button for icon-centric surfaces.
- Use project-structure fallback for main icon and tone-aware policy for chevron indicator.
API
Main icon API:
iconSource(alias)iconNameiconGlyphiconSize
Indicator behavior:
- indicator name is computed from tone + effective enabled state
- rendered indicator source uses
SvgManager.icon(...)
Layout:
- fixed height:
Theme.gap20 horizontalPadding: Theme.gap2verticalPadding: Theme.gap2spacing: Theme.gap4
Main Icon Resolution Order
- explicit
iconSource - explicit
iconName - grouped
icon.name - default fallback icon (
projectStructure)
Usage
import LVRS 1.0 as LV
LV.IconMenuButton {
tone: LV.AbstractButton.Default
iconName: "viewMoreSymbolicDefault"
}
Practical Notes
IconMenuButtonis best for compact menu affordances where text labels are unnecessary.- For text-first menus, use
LabelMenuButtonfor clearer affordance.
FAQ
Q. Which icon wins when both iconSource and iconName are set?
A. iconSource has higher priority.
Q. Is text label supported?
A. No explicit text label is part of this component contract. For text + indicator, use LabelMenuButton.
Validation Checklist
- main icon fallback order works for empty/partial inputs,
- indicator icon changes correctly on tone/enable transitions,
- compact geometry remains stable in toolbar rows.