Skip to content

fix(ui): give the Defaults profile chip a real icon - #184

Open
mmaher88 wants to merge 1 commit into
masterfrom
fix/defaults-profile-icon
Open

mmaher88 wants to merge 1 commit into
masterfrom
fix/defaults-profile-icon

Conversation

@mmaher88

Copy link
Copy Markdown
Owner

Summary

Every startup logged a warning because the Defaults profile asked the icon theme for an icon named ⊞, which isn't an icon name. The chip also left an empty 16px space where that icon would have gone.

  • New icon: AppProfileBar.qml draws a 2×2 "all applications" grid for the Defaults chip. It uses the label colour, so it matches the theme and turns the active-chip text colour when the tab is selected. No icon theme has a name for this on every desktop, which is why it's drawn rather than looked up.
  • No icon name: ProfileModel no longer gives Defaults a theme icon name, so the lookup and the warning are gone.
  • Chip width: each chip is now as wide as what it actually shows. A chip whose app icon fails to load (missing from the user's theme) no longer keeps the empty space.

Tests

  • test_profile_model.cpp: DefaultEntry now checks that Defaults has no icon name.
  • New tests/qml/tst_AppProfileBar.qml:
    • The Defaults chip shows the grid, asks the theme for nothing, and is exactly as wide as grid + label + padding.
    • An app chip with no icon shows neither the grid nor any empty space.
  • Local results: C++ 894/894, QML 76/76 (three runs). The pre-push hook passed.
  • Checked in the running app: no ⊞ warning in the log since launch. Rendered chips checked in dark and light themes, active and inactive.

🤖 Generated with Claude Code

The Defaults entry passed "⊞" as its icon name, so every startup asked
the icon theme for a non-existent icon and logged a warning, and the
chip reserved an empty 16px slot for it.

AppProfileBar now draws a 2x2 "all applications" grid for the Defaults
chip in the label colour, so it follows the theme and the active-chip
colours. ProfileModel no longer gives Defaults a theme icon name.

Chip width now comes from the content row, which skips hidden children,
so chips whose theme icon fails to load no longer keep a gap either.

Tests: ProfileModel checks Defaults has no icon name; new
tst_AppProfileBar.qml checks the Defaults mark and chip widths.
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.

1 participant