@@ -8,7 +8,7 @@ DllCall("SetThreadDpiAwarenessContext", "ptr", -4, "ptr")
8
8
global pt_IniFile := A_ScriptDir " \ppttimer.ini"
9
9
global lastProfile, profiles := [], MonitorCount, lastMonitor, manualModeSupressDetection, showOnAllMonitors, isPptTimerOn
10
10
global startKey, stopKey, resetKey, pauseKey, quitKey, moveKey, allMonitorKey
11
- global opacity, fontface, fontweight, fontsize, textColor, AheadColor, timeoutColor, backgroundColor, bannerWidth, bannerHeight, bannerPosition, bannerMargin, stopResetsTimer, pt_Duration, pt_Ahead, pt_PlayFinishSound, pt_FinishSoundFile, pt_PlayWarningSound, pt_WarningSoundFile, sendOnTimeout
11
+ global opacity, fontface, fontweight, fontsize, indicator_fontsize := 12 , textColor, AheadColor, timeoutColor, backgroundColor, bannerWidth, bannerHeight, bannerPosition, bannerMargin, stopResetsTimer, pt_Duration, pt_Ahead, pt_PlayFinishSound, pt_FinishSoundFile, pt_PlayWarningSound, pt_WarningSoundFile, sendOnTimeout
12
12
global currentIndicator := ""
13
13
14
14
global Guis := []
@@ -247,19 +247,16 @@ refreshUI() {
247
247
dpi_scale := GetDpiForMonitor(EnumMonitors()[A_index ]) / 96
248
248
249
249
if (! dpi_scale) {
250
- dpi_scale := 1
251
- fontsize_scaled := fontsize * 1.5
252
- indicator_fontsize := 9 * 1.5
253
- } else {
254
- fontsize_scaled := fontsize * dpi_scale
255
- indicator_fontsize := 9
250
+ dpi_scale := A_ScreenDPI / 96
256
251
}
257
252
253
+ fontsize_scaled := fontsize * dpi_scale
254
+ indicator_fontsize_scaled := indicator_fontsize * dpi_scale
255
+
258
256
bannerWidth_scaled := bannerWidth * dpi_scale
259
257
bannerHeight_scaled := bannerHeight * dpi_scale
260
258
bannerMargin_scaled := bannerMargin * dpi_scale
261
259
indicator_y_scaled := 2.5 * dpi_scale
262
- indicator_fontsize_scaled := indicator_fontsize * dpi_scale
263
260
indicator_width_scaled := 40
264
261
265
262
MonitorWidth := MonitorRight - MonitorLeft
@@ -281,8 +278,6 @@ refreshUI() {
281
278
xposition := MonitorRight - bannerWidth_scaled - bannerMargin_scaled
282
279
yposition := MonitorTop + bannerMargin_scaled
283
280
}
284
- ; msgbox, % bannerWidth_scaled ", " bannerHeight_scaled
285
- ; msgbox, % (MonitorRight - bannerWidth_scaled) ", " xposition ", " yposition
286
281
hCountDown := Guis[A_index ]
287
282
hText := Texts[A_index ]
288
283
hIndicatorText := Indicators[A_index ]
@@ -489,6 +484,8 @@ loadProfile(idx) {
489
484
pt_Duration := validNumberOrDefault(pt_Duration, 1200 )
490
485
pt_Ahead := validNumberOrDefault(pt_Ahead, 120 )
491
486
487
+ fontsize := fontsize * 96 / A_ScreenDPI
488
+
492
489
refreshUI()
493
490
if (isPptTimerOn) {
494
491
updateCountDownText()
@@ -508,7 +505,7 @@ loadProfile(idx) {
508
505
loadDefaultProfile (){
509
506
InIRead , fontface, %pt_IniFile%, Main, fontface, Microsoft Yahei
510
507
InIRead , fontweight, %pt_IniFile%, Main, fontweight, bold
511
- InIRead , fontsize, %pt_IniFile%, Main, fontsize, 24
508
+ InIRead , fontsize, %pt_IniFile%, Main, fontsize, 36
512
509
InIRead , textColor, %pt_IniFile%, Main, textcolor, 000000
513
510
514
511
InIRead , AheadColor, %pt_IniFile%, Main, aheadColor, 9D1000
0 commit comments