Skip to content

Refactor font scaling and icon resolution in CompactView - #75

Merged
yassine20011 merged 3 commits into
masterfrom
fix/font-scaling-padding
Jul 26, 2026
Merged

Refactor font scaling and icon resolution in CompactView#75
yassine20011 merged 3 commits into
masterfrom
fix/font-scaling-padding

Conversation

@yassine20011

Copy link
Copy Markdown
Owner

Related Issue

Fixes #74

Testing

  • Tested on KDE Plasma 6.7.3
  • Distro: Fedora 43
  • Widget installs cleanly with install.sh
  • Widget displays correctly in the panel

@greptile-apps

greptile-apps Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR refines CompactView font inheritance, sticky-width invalidation, and bundled icon resolution.

  • Uses inherited panel font sizing when no explicit size is configured while preserving the selected font family.
  • Keeps metric widths grow-only between relevant display-setting changes.
  • Resolves bundled icons consistently in the metrics configuration preview.
  • Uses the theme’s small font for configuration guidance text.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
contents/ui/CompactView.qml Applies inherited font sizing without a self-referential family binding and resets grow-only width state when width-affecting settings change.
contents/ui/configGeneral.qml Replaces a calculated guidance-text point size with the theme-provided small font.
contents/ui/configMetrics.qml Resolves bundled metric icons to local SVG URLs consistently with runtime icon resolution.
contents/ui/main.qml Represents the absence of an explicit configured font size as inherited sizing.

Reviews (3): Last reviewed commit: "fix: resolve font family bindings, custo..." | Re-trigger Greptile

Comment thread contents/ui/CompactView.qml Outdated
Comment thread contents/ui/CompactView.qml Outdated
Use Kirigami.Theme.defaultFont.family as the fallback font to
eliminate the self-referential font.family binding cycle.

Update sticky width caching to follow a strict grow-only policy by
removing the shrink threshold, preventing layout oscillations caused
by fluctuating text metrics.
Comment thread contents/ui/CompactView.qml
…reflow in CompactView

- Bind font.family directly to compactRow.fontFamily across all delegates, breaking the self-referential binding cycle that triggered runtime QML loop warnings.
- Decouple font family application from the customFont size check (effectiveFontSize > 0) to ensure a custom font family is not discarded when the user chooses the system-default font size.
- Restrict _stickyWidth caching to only expand the cached width, ensuring the grow-only invariant is respected and eliminating reflow oscillations for fluctuating metrics.
@yassine20011
yassine20011 merged commit 76a4642 into master Jul 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Issues with font scaling and other UI bugs

1 participant