diff options
| author | Nippy <nippy@rp1.hu> | 2026-05-08 19:50:49 +0200 |
|---|---|---|
| committer | Nippy <nippy@rp1.hu> | 2026-05-08 19:50:49 +0200 |
| commit | 3462bcc46ecf74f576ea4397f16492c16bd75b10 (patch) | |
| tree | c5ab7aef4498647e057bda8d49c11e5f9dda74c9 /raveos-hyprland-theme/theme-data/dms/PLUGINS/THEME_REFERENCE.md | |
| parent | 56616f693b4f263cbf0d47da43b67424efa6022d (diff) | |
| download | RaveOS-PKGBUILD-3462bcc46ecf74f576ea4397f16492c16bd75b10.tar.gz RaveOS-PKGBUILD-3462bcc46ecf74f576ea4397f16492c16bd75b10.zip | |
raveos update
Diffstat (limited to 'raveos-hyprland-theme/theme-data/dms/PLUGINS/THEME_REFERENCE.md')
| -rw-r--r-- | raveos-hyprland-theme/theme-data/dms/PLUGINS/THEME_REFERENCE.md | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/raveos-hyprland-theme/theme-data/dms/PLUGINS/THEME_REFERENCE.md b/raveos-hyprland-theme/theme-data/dms/PLUGINS/THEME_REFERENCE.md new file mode 100644 index 0000000..be1373a --- /dev/null +++ b/raveos-hyprland-theme/theme-data/dms/PLUGINS/THEME_REFERENCE.md @@ -0,0 +1,132 @@ +# Theme Property Reference for Plugins + +Quick reference for commonly used Theme properties in plugin development. + +## Font Sizes + +```qml +Theme.fontSizeSmall // 12px (scaled) +Theme.fontSizeMedium // 14px (scaled) +Theme.fontSizeLarge // 16px (scaled) +Theme.fontSizeXLarge // 20px (scaled) +``` + +**Note**: These are scaled by `SettingsData.fontScale` + +## Icon Sizes + +```qml +Theme.iconSizeSmall // 16px +Theme.iconSize // 24px (default) +Theme.iconSizeLarge // 32px +``` + +## Spacing + +```qml +Theme.spacingXS // Extra small +Theme.spacingS // Small +Theme.spacingM // Medium +Theme.spacingL // Large +Theme.spacingXL // Extra large +``` + +## Border Radius + +```qml +Theme.cornerRadius // Standard corner radius +Theme.cornerRadiusSmall // Smaller radius +Theme.cornerRadiusLarge // Larger radius +``` + +## Colors + +### Surface Colors +```qml +Theme.surface +Theme.surfaceContainerLow +Theme.surfaceContainer +Theme.surfaceContainerHigh +Theme.surfaceContainerHighest +``` + +### Text Colors +```qml +Theme.onSurface // Primary text on surface +Theme.onSurfaceVariant // Secondary text on surface +Theme.outline // Border/divider color +``` + +### Semantic Colors +```qml +Theme.primary +Theme.onPrimary +Theme.secondary +Theme.onSecondary +Theme.error +Theme.warning +Theme.success +``` + +### Special Functions +```qml +Theme.popupBackground() // Popup background with opacity +``` + +## Common Patterns + +### Icon with Text +```qml +DankIcon { + name: "icon_name" + color: Theme.onSurface + font.pixelSize: Theme.iconSize +} + +StyledText { + text: "Label" + color: Theme.onSurface + font.pixelSize: Theme.fontSizeMedium +} +``` + +### Container with Border +```qml +Rectangle { + color: Theme.surfaceContainerHigh + radius: Theme.cornerRadius + border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.width: 1 +} +``` + +### Hover Effect +```qml +MouseArea { + hoverEnabled: true + onEntered: parent.color = Qt.lighter(Theme.surfaceContainerHigh, 1.1) + onExited: parent.color = Theme.surfaceContainerHigh +} +``` + +## Common Mistakes + +❌ **Wrong**: +```qml +font.pixelSize: Theme.fontSizeS // Property doesn't exist +font.pixelSize: Theme.iconSizeS // Property doesn't exist +``` + +✅ **Correct**: +```qml +font.pixelSize: Theme.fontSizeSmall // Use full name +font.pixelSize: Theme.iconSizeSmall // Use full name +``` + +## Checking Available Properties + +To see all available Theme properties, check `Common/Theme.qml` or use: + +```bash +grep "property" Common/Theme.qml +``` |