Added trace scaling, improved font size scaling, added german lang - #8
Added trace scaling, improved font size scaling, added german lang#8Schildkroet wants to merge 30 commits into
Conversation
c45b84d to
d65cc88
Compare
|
Oh neat, I had given up on Qt6 on Windows because of the taskbar progress effect. Same for window dragging on wayland. 😅 |
|
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? |
|
Yes, i forgot to branch and accidentially used master 😅 |
|
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. |
DSView Fork — Change Summary
1. Vertical Y-axis Scaling (Ctrl+Shift+Mouse Wheel)
appconfig.h/cpp— Added persistenttraceHeightFactor(range 0.1–20.0) toAppOptions; addedGetTraceFontSize()helper returning a platform-clamped font size.view.h/cpp— Added_trace_height_factor,vzoom(), andget_trace_font_scale();signals_changed()multiplies_signalHeightby the factor with a font-aware row-heightfloor.
viewport.cpp— Ctrl+Shift+wheel routes tovzoom()instead of scrolling; zoom stephalved 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— Addedget_label_scale(),get_squareWidth(),get_squareMargin(),and scaled
get_leftWidth()/get_rightWidth()/get_headerHeight().logicsignal.cpp— Trigger button boxes and glyph insets scale withget_label_scale().viewport.cpp— Hover popup (width / period / frequency) box geometry fully scaled.header.cpp— Channel label font usesGetTraceFontSize() * get_trace_font_scale().ruler.cpp— Timing bar font: removed 10 px cap, usesGetTraceFontSize().protocoldock.cpp— Decoder results table row height set toQFontMetrics.height() * 1.5.decoderoptionsdlg.cpp— Bottom widget area usesmax(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_DLG→STR_PAGE_MSG).lang/en/dlg.json,lang/cn/dlg.json— Added 7–8 missing entries for newsettings 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
truefor German so decoder parameter names fall back to English gracefully.logobar.h/cpp— Added Deutsch menu entry wired toon_actionDe_triggered();menu icon updates to the German flag on selection.
mainwindow.cpp—switchLanguage()handlesLAN_DE(removes Qt translators,same as English).
DSView/icons/German.svg— German tricolor flag (black / red / gold).DSView/DSView.qrc— RegisteredGerman.svgin 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— AddedIDS_TOOLBAR_HELP_LANG_DEso the menu entry is labelled correctly in English and Chinese UI modes.
CMakeLists.txt— No change needed; the existinginstall(DIRECTORY lang …)rule already coverslang/de/. Deploy withsudo make install.