DialWindow: Scaling font in both dimensions (#4469)

Currently the font in DialWindow is only scaled to make the text fit
into the label vertically. This commit scales the font in both
dimensions and prevents cutting off the content.

The font is rescaled
* If the DialWindow itself is resized
* If the text set and is longer than the previous one
* Every 10 text-changes
This commit is contained in:
Joachim Kohlhammer
2024-05-07 01:40:16 +02:00
committed by GitHub
parent f97770fa94
commit 63a14d0edf
5 changed files with 273 additions and 25 deletions

View File

@@ -699,7 +699,8 @@ HEADERS += Train/AddDeviceWizard.h Train/CalibrationData.h Train/ComputrainerCon
HEADERS += Train/TrainBottom.h Train/TrainDB.h Train/TrainSidebar.h \
Train/VideoLayoutParser.h Train/VideoSyncFile.h Train/WorkoutPlotWindow.h Train/WebPageWindow.h \
Train/WorkoutWidget.h Train/WorkoutWidgetItems.h Train/WorkoutWindow.h Train/WorkoutWizard.h Train/ZwoParser.h \
Train/LiveMapWebPageWindow.h
Train/LiveMapWebPageWindow.h \
Train/ScalingLabel.h
###=============
@@ -803,7 +804,8 @@ SOURCES += Train/AddDeviceWizard.cpp Train/CalibrationData.cpp Train/Computraine
SOURCES += Train/TrainBottom.cpp Train/TrainDB.cpp Train/TrainSidebar.cpp \
Train/VideoLayoutParser.cpp Train/VideoSyncFile.cpp Train/WorkoutPlotWindow.cpp Train/WebPageWindow.cpp \
Train/WorkoutWidget.cpp Train/WorkoutWidgetItems.cpp Train/WorkoutWindow.cpp Train/WorkoutWizard.cpp Train/ZwoParser.cpp \
Train/LiveMapWebPageWindow.cpp
Train/LiveMapWebPageWindow.cpp \
Train/ScalingLabel.cpp
## Crash Handling
win32-msvc* {