mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
feat(styles): create global styles entry point and organize global styles feat(styles): implement base HTML element styles and utility classes for flexbox feat(styles): establish layout, position, spacing, and text utility classes feat(styles): introduce mixins for animations, cards, dialogs, flexbox, grid, and responsive design test(quick_guide): add component and metadata validation tests for quick_guide package test(ui_level6): implement metadata validation tests for ui_level6 package
34 lines
753 B
QML
34 lines
753 B
QML
import QtQuick
|
|
|
|
/**
|
|
* CIcon.qml - Icon container (mirrors _icon.scss)
|
|
* Consistent icon sizing and coloring
|
|
*/
|
|
Text {
|
|
id: root
|
|
|
|
property string icon: "" // Unicode emoji or icon font character
|
|
property string size: "md" // sm, md, lg, xl
|
|
property color iconColor: Theme.onSurface
|
|
|
|
// Size mapping
|
|
readonly property int _size: {
|
|
switch (size) {
|
|
case "sm": return 16
|
|
case "lg": return 24
|
|
case "xl": return 32
|
|
default: return 20
|
|
}
|
|
}
|
|
|
|
text: icon
|
|
color: iconColor
|
|
font.pixelSize: _size
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
width: _size
|
|
height: _size
|
|
}
|