Skip to content

Added trace scaling, improved font size scaling, added german lang - #8

Open
Schildkroet wants to merge 30 commits into
mrehkopf:masterfrom
Schildkroet:master
Open

Added trace scaling, improved font size scaling, added german lang#8
Schildkroet wants to merge 30 commits into
mrehkopf:masterfrom
Schildkroet:master

Conversation

@Schildkroet

Copy link
Copy Markdown

DSView Fork — Change Summary

1. Vertical Y-axis Scaling (Ctrl+Shift+Mouse Wheel)

  • appconfig.h/cpp — Added persistent traceHeightFactor (range 0.1–20.0) to
    AppOptions; added GetTraceFontSize() helper returning a platform-clamped font size.
  • view.h/cpp — Added _trace_height_factor, vzoom(), and get_trace_font_scale();
    signals_changed() multiplies _signalHeight by the factor with a font-aware row-height
    floor.
  • viewport.cpp — Ctrl+Shift+wheel routes to vzoom() instead of scrolling; zoom step
    halved for finer control.
  • appconfig.cpp — Maximum font size raised from 14 → 16 on Linux.

2. Font and Geometry Scaling

All trace-area paint code had hardcoded 10 px font caps, and label/trigger geometry used
fixed constants. Replaced with dynamic scaling throughout:

  • trace.h/cpp — Added get_label_scale(), get_squareWidth(), get_squareMargin(),
    and scaled get_leftWidth() / get_rightWidth() / get_headerHeight().
  • logicsignal.cpp — Trigger button boxes and glyph insets scale with get_label_scale().
  • viewport.cpp — Hover popup (width / period / frequency) box geometry fully scaled.
  • header.cpp — Channel label font uses GetTraceFontSize() * get_trace_font_scale().
  • ruler.cpp — Timing bar font: removed 10 px cap, uses GetTraceFontSize().
  • protocoldock.cpp — Decoder results table row height set to
    QFontMetrics.height() * 1.5.
  • decoderoptionsdlg.cpp — Bottom widget area uses max(hardcoded, dynamic sizeHint)
    to prevent clipping at large font sizes.

3. Translation Fixes

  • storesession.cpp — Fixed 12 call sites using the wrong string page
    (STR_PAGE_DLGSTR_PAGE_MSG).
  • lang/en/dlg.json, lang/cn/dlg.json — Added 7–8 missing entries for new
    settings UI strings (adaptive font width, vertical scroll action, ruler units, etc.).

4. German Language (de)

  • appconfig.h — Added #define LAN_DE 7.
  • appconfig.cpp — Auto-detects German system locale.
  • langresource.h — Added {7, "de"} to the language key table; is_lang_en()
    returns true for German so decoder parameter names fall back to English gracefully.
  • logobar.h/cpp — Added Deutsch menu entry wired to on_actionDe_triggered();
    menu icon updates to the German flag on selection.
  • mainwindow.cppswitchLanguage() handles LAN_DE (removes Qt translators,
    same as English).
  • DSView/icons/German.svg — German tricolor flag (black / red / gold).
  • DSView/DSView.qrc — Registered German.svg in the resource bundle.
  • lang/de/toolbar.json — 47 entries (all menu and toolbar labels).
  • lang/de/msg.json — 97 entries (all message box and error strings).
  • lang/de/dlg.json — 209 entries (all dialog and UI strings).
  • lang/en/toolbar.json, lang/cn/toolbar.json — Added IDS_TOOLBAR_HELP_LANG_DE
    so the menu entry is labelled correctly in English and Chinese UI modes.
  • CMakeLists.txt — No change needed; the existing
    install(DIRECTORY lang …) rule already covers lang/de/. Deploy with sudo make install.

@Schildkroet
Schildkroet force-pushed the master branch 2 times, most recently from c45b84d to d65cc88 Compare July 1, 2026 19:13
@mrehkopf

mrehkopf commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Oh neat, I had given up on Qt6 on Windows because of the taskbar progress effect. Same for window dragging on wayland. 😅

@mrehkopf

mrehkopf commented Jul 9, 2026

Copy link
Copy Markdown
Owner

I see you might have encountered a pitfall with pull requests (as I have numerous times before) - since you continued pushing to the same branch all your commits have now piled up in this PR. 😆 Is it safe to assume all commits so far are fine for merging or should I cut off at some point?
(Note I'm on summer vacation at the moment so I can't really test anything - will be back in about two weeks)

@Schildkroet

Copy link
Copy Markdown
Author

Yes, i forgot to branch and accidentially used master 😅
All commits are valid and everything is in a working state. You can test it here: https://github.com/Schildkroet/DSView/releases
Currently most of my issues are done, so i guess were won't be much more changes for now.

@mrehkopf

Copy link
Copy Markdown
Owner

I took a brief look from a user's perspective (Demo mode only since I didn't bring my DSLogic 😆) and it looks pretty nice, good call matching the LA trace colors with the wire colors by default :) The additional themes are also nice. Can't say a lot about the DSCope changes since I don't own one and never used one.
One thing I noticed about the LA view is that the traces are now separated by horizontal separators. I see how it improves readability for the levels of adjacent traces but for my taste they now consume too much space vertically :D Is there a way to disable them?
Other than that I think a numerical entry option for the vertical zoom factor would be useful (or a way to reset it to 1).

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.

2 participants