Skip to content

Follow Omarchy display text size live and scale icons with it - #223

Open
dhh wants to merge 1 commit into
mainfrom
follow-omarchy-text-size
Open

dhh wants to merge 1 commit into
mainfrom
follow-omarchy-text-size

Conversation

@dhh

@dhh dhh commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

omarchy display text size updates ~/.config/omarchy/shell.toml ([font] base-size, anchored at 12px = 1.0) and GNOME/GTK's text-scaling-factor, leaving qtengine's fixed font size unchanged at 11pt. Because Theme only read QFontDatabase::FixedFont and watched fontconfig/fonts.conf, Folio stayed at 1.0x when changing display text size in Omarchy.

Changes

  • Live text-size tracking (src/theme.h, src/theme.cpp):
    • Parse [font] base-size from ~/.config/omarchy/shell.toml (falling back to the active theme's theme/shell.toml), anchored at 12px = 1.0 and clamped to Folio's [0.75, 1.5] layout range.
    • Watch ~/.config/omarchy (or nearest existing ancestor) and shell.toml, re-arming after atomic renames (mktemp + mv) and re-reading size without triggering a full fontconfig reload.
    • Subscribe to org.freedesktop.portal.Settings (Read async + SettingChanged live) for org.gnome.desktop.interface / text-scaling-factor as fallback when shell.toml does not pin base-size (skipped for folio chooser and never double-scaled).
  • Scale icons and layout proportions with theme.textScale:
    • Scale Glyph, IconButton, and Spinner with theme.textScale (keeping pre-scaled grid tile art and fixed hero previews opted out with scaled: false to avoid double-scaling).
    • Scale grid tile art (tileZoom + cellHeight), list/column row heights and thumbnails (FileRow, FolderList, FolderColumns), top bar height (Main, PathBar), sidebar width/rows/buttons (Main, Sidebar), and menu item height (FolioMenuItem), keeping 1.0x pixel-identical.
  • Tests (tests/folio_tests.cpp):
    • Add themeFollowsOmarchyTextSize() covering shell.toml parsing, theme fallback, live creation and atomic rename, portal fallback without double-scaling, and Glyph scaling.

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect Folio’s main window and preview, but stay within its interface.

Fix the font-family reset before merging.

Findings

  1. P1 Text size resets the font ▶

Summary

Folio now follows Omarchy text-size changes live and scales icons and layout sizes with the text.

  • Folio follows live text-size changes from Omarchy and the desktop.
  • File views resize their rows and tile art with the text size.
  • Folio’s controls and surrounding layout grow with the text size.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Shell file changes] --> D[Read text size]
  B[Theme changes] --> D
  C[Portal setting changes] --> D
  D --> E{Size source}
  E -->|First| F[User shell setting]
  E -->|Second| G[Theme shell setting]
  E -->|Fallback| H[Fixed font size and portal factor]
  F --> I[Update textScale]
  G --> I
  H --> I
  I --> J[Text, icons, and layouts resize]
Loading

Reviews (1) · Last reviewed commit: "Follow Omarchy display text size live an..." · Reviewed by Greptile

Comment thread src/theme.cpp
Comment on lines +424 to +425
connect(&m_fontDebounce, &QTimer::timeout, this, [this] {
readSystemFont(std::exchange(m_reloadFontconfig, false));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Text size resets the font

After a live change to fonts.conf, readSystemFont(true) finds the new family through a separate fontconfig configuration, then destroys that configuration. The new size-only paths call readSystemFont(false), which resolves the family through the unchanged FcConfigGetCurrent(). For an alias such as monospace, changing text size or switching themes can therefore restore the old font. Keep the last resolved family for size-only updates instead of resolving it against the startup configuration.

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