|
|
|
|
@@ -121,6 +121,12 @@ const (
|
|
|
|
|
|
|
|
|
|
const translateTabEnabled = false
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
defaultGUIFontSize = 14
|
|
|
|
|
minGUIFontSize = 8
|
|
|
|
|
maxGUIFontSize = 30
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var joinLeaveLinePattern = regexp.MustCompile(`^\[(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})\]\s+\[(join|leave)\]\s+(.+?)\s+\((\d+)\)$`)
|
|
|
|
|
var runtimeTimePattern = regexp.MustCompile(`^\[(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})\]`)
|
|
|
|
|
var worldIdPattern = regexp.MustCompile(`worldId=(wrld_[0-9a-fA-F-]+)`)
|
|
|
|
|
@@ -222,8 +228,6 @@ type guiApp struct {
|
|
|
|
|
tabSettings uintptr
|
|
|
|
|
btnTopMost uintptr
|
|
|
|
|
btnAutoUnmute uintptr
|
|
|
|
|
btnFontDown uintptr
|
|
|
|
|
btnFontUp uintptr
|
|
|
|
|
activeTab string
|
|
|
|
|
topMost bool
|
|
|
|
|
autoUnmuteOnLeave bool
|
|
|
|
|
@@ -450,7 +454,7 @@ func runNativeGUI(initialTab string) error {
|
|
|
|
|
if guiCfg.FontSize > 0 {
|
|
|
|
|
app.fontSize = guiCfg.FontSize
|
|
|
|
|
} else {
|
|
|
|
|
app.fontSize = 18
|
|
|
|
|
app.fontSize = defaultGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
app.refreshIntervalValue = guiCfg.RefreshIntervalValue
|
|
|
|
|
if app.refreshIntervalValue <= 0 {
|
|
|
|
|
@@ -580,8 +584,6 @@ func runNativeGUI(initialTab string) error {
|
|
|
|
|
rightTitle, _ := syscall.UTF16PtrFromString("")
|
|
|
|
|
topMostTitle, _ := syscall.UTF16PtrFromString("Top most")
|
|
|
|
|
autoUnmuteTitle, _ := syscall.UTF16PtrFromString("Leave unmute")
|
|
|
|
|
fontDownTitle, _ := syscall.UTF16PtrFromString("A-")
|
|
|
|
|
fontUpTitle, _ := syscall.UTF16PtrFromString("A+")
|
|
|
|
|
browseTitle, _ := syscall.UTF16PtrFromString("参照")
|
|
|
|
|
saveTitle, _ := syscall.UTF16PtrFromString("保存")
|
|
|
|
|
toolbarTitle, _ := syscall.UTF16PtrFromString("")
|
|
|
|
|
@@ -629,41 +631,43 @@ func runNativeGUI(initialTab string) error {
|
|
|
|
|
app.settingsPaneHwnd, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(paneClassName)), uintptr(unsafe.Pointer(settingsPaneTitle)), paneStyle, 0, contentTop, windowWidth, settingsPaneHeight, hwnd, idLog+1, hInstance, 0)
|
|
|
|
|
app.btnTopMost, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(buttonClass)), uintptr(unsafe.Pointer(topMostTitle)), buttonStyle, leftPaneWidth+32, contentTop+86, 140, 30, hwnd, 3005, hInstance, 0)
|
|
|
|
|
app.btnAutoUnmute, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(buttonClass)), uintptr(unsafe.Pointer(autoUnmuteTitle)), buttonStyle, leftPaneWidth+32, contentTop+132, 180, 30, hwnd, 3008, hInstance, 0)
|
|
|
|
|
app.btnFontDown, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(buttonClass)), uintptr(unsafe.Pointer(fontDownTitle)), buttonStyle, leftPaneWidth+32, contentTop+178, 52, 30, hwnd, 3006, hInstance, 0)
|
|
|
|
|
app.btnFontUp, _, _ = createWindowEx.Call(0, uintptr(unsafe.Pointer(buttonClass)), uintptr(unsafe.Pointer(fontUpTitle)), buttonStyle, leftPaneWidth+92, contentTop+178, 52, 30, hwnd, 3007, hInstance, 0)
|
|
|
|
|
exportDirTitle, _ := syscall.UTF16PtrFromString("")
|
|
|
|
|
exportDirRect := settingsHistoryExportDirRect()
|
|
|
|
|
app.settingsExportDirEdit, _, _ = createWindowEx.Call(
|
|
|
|
|
0,
|
|
|
|
|
uintptr(unsafe.Pointer(editClassTitle)),
|
|
|
|
|
uintptr(unsafe.Pointer(exportDirTitle)),
|
|
|
|
|
uintptr(wsChild|wsVisible|wsBorder|wsTabstop|esAutohscroll),
|
|
|
|
|
116, 410, 520, 24,
|
|
|
|
|
uintptr(exportDirRect.Left), uintptr(exportDirRect.Top), uintptr(exportDirRect.Right-exportDirRect.Left), uintptr(exportDirRect.Bottom-exportDirRect.Top),
|
|
|
|
|
app.settingsPaneHwnd, idHistoryExportDir, hInstance, 0,
|
|
|
|
|
)
|
|
|
|
|
browseStyle := uintptr(wsChild | wsTabstop)
|
|
|
|
|
browseRect := settingsHistoryExportBrowseRect()
|
|
|
|
|
app.settingsExportBrowseBtn, _, _ = createWindowEx.Call(
|
|
|
|
|
0,
|
|
|
|
|
uintptr(unsafe.Pointer(buttonClass)),
|
|
|
|
|
uintptr(unsafe.Pointer(browseTitle)),
|
|
|
|
|
browseStyle,
|
|
|
|
|
644, 410, 92, 24,
|
|
|
|
|
uintptr(browseRect.Left), uintptr(browseRect.Top), uintptr(browseRect.Right-browseRect.Left), uintptr(browseRect.Bottom-browseRect.Top),
|
|
|
|
|
app.settingsPaneHwnd, idHistoryExportBrowse, hInstance, 0,
|
|
|
|
|
)
|
|
|
|
|
exportCustomTitle, _ := syscall.UTF16PtrFromString("")
|
|
|
|
|
customRect := settingsHistoryExportCustomRect()
|
|
|
|
|
app.settingsExportCustomEdit, _, _ = createWindowEx.Call(
|
|
|
|
|
0,
|
|
|
|
|
uintptr(unsafe.Pointer(editClassTitle)),
|
|
|
|
|
uintptr(unsafe.Pointer(exportCustomTitle)),
|
|
|
|
|
uintptr(wsChild|wsVisible|wsBorder|wsTabstop|esAutohscroll),
|
|
|
|
|
116, 520, 520, 24,
|
|
|
|
|
uintptr(customRect.Left), uintptr(customRect.Top), uintptr(customRect.Right-customRect.Left), uintptr(customRect.Bottom-customRect.Top),
|
|
|
|
|
app.settingsPaneHwnd, idHistoryExportCustom, hInstance, 0,
|
|
|
|
|
)
|
|
|
|
|
saveRect := settingsHistoryExportCustomSaveRect()
|
|
|
|
|
app.settingsExportCustomSaveBtn, _, _ = createWindowEx.Call(
|
|
|
|
|
0,
|
|
|
|
|
uintptr(unsafe.Pointer(buttonClass)),
|
|
|
|
|
uintptr(unsafe.Pointer(saveTitle)),
|
|
|
|
|
browseStyle,
|
|
|
|
|
644, 520, 92, 24,
|
|
|
|
|
uintptr(saveRect.Left), uintptr(saveRect.Top), uintptr(saveRect.Right-saveRect.Left), uintptr(saveRect.Bottom-saveRect.Top),
|
|
|
|
|
app.settingsPaneHwnd, idHistoryExportSave, hInstance, 0,
|
|
|
|
|
)
|
|
|
|
|
applyRefreshTimer(hwnd, &app)
|
|
|
|
|
@@ -749,8 +753,11 @@ func runNativeGUI(initialTab string) error {
|
|
|
|
|
if !allowRapidSettingsAction(&app) {
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
if app.fontSize > 10 {
|
|
|
|
|
if app.fontSize > minGUIFontSize {
|
|
|
|
|
app.fontSize -= 2
|
|
|
|
|
if app.fontSize < minGUIFontSize {
|
|
|
|
|
app.fontSize = minGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
oldFont := app.hFont
|
|
|
|
|
app.hFont = createAppFont(app.fontSize)
|
|
|
|
|
applyFont(&app)
|
|
|
|
|
@@ -764,8 +771,11 @@ func runNativeGUI(initialTab string) error {
|
|
|
|
|
if !allowRapidSettingsAction(&app) {
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
if app.fontSize < 30 {
|
|
|
|
|
if app.fontSize < maxGUIFontSize {
|
|
|
|
|
app.fontSize += 2
|
|
|
|
|
if app.fontSize > maxGUIFontSize {
|
|
|
|
|
app.fontSize = maxGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
oldFont := app.hFont
|
|
|
|
|
app.hFont = createAppFont(app.fontSize)
|
|
|
|
|
applyFont(&app)
|
|
|
|
|
@@ -1200,7 +1210,7 @@ func refreshGUI(setWindowText *syscall.LazyProc, app *guiApp, reloadData bool) {
|
|
|
|
|
if app.settingsPaneHwnd != 0 {
|
|
|
|
|
showWindowProc.Call(app.settingsPaneHwnd, swHideControl)
|
|
|
|
|
}
|
|
|
|
|
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute, app.btnFontDown, app.btnFontUp} {
|
|
|
|
|
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute} {
|
|
|
|
|
if hwnd != 0 {
|
|
|
|
|
showWindowProc.Call(hwnd, swHideControl)
|
|
|
|
|
}
|
|
|
|
|
@@ -1241,7 +1251,7 @@ func refreshSettingsControls(showWindowProc, setWindowPosProc *syscall.LazyProc,
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
app.lastSettingsVisible = true
|
|
|
|
|
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute, app.btnFontDown, app.btnFontUp} {
|
|
|
|
|
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute} {
|
|
|
|
|
if hwnd != 0 {
|
|
|
|
|
showWindowProc.Call(hwnd, swHideControl)
|
|
|
|
|
}
|
|
|
|
|
@@ -1265,7 +1275,7 @@ func refreshSettingsControls(showWindowProc, setWindowPosProc *syscall.LazyProc,
|
|
|
|
|
if app.settingsPaneHwnd != 0 {
|
|
|
|
|
showWindowProc.Call(app.settingsPaneHwnd, swHideControl)
|
|
|
|
|
}
|
|
|
|
|
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute, app.btnFontDown, app.btnFontUp, app.settingsExportDirEdit, app.settingsExportCustomEdit, app.settingsExportBrowseBtn, app.settingsExportCustomSaveBtn} {
|
|
|
|
|
for _, hwnd := range []uintptr{app.btnTopMost, app.btnAutoUnmute, app.settingsExportDirEdit, app.settingsExportCustomEdit, app.settingsExportBrowseBtn, app.settingsExportCustomSaveBtn} {
|
|
|
|
|
if hwnd != 0 {
|
|
|
|
|
showWindowProc.Call(hwnd, swHideControl)
|
|
|
|
|
}
|
|
|
|
|
@@ -1433,7 +1443,7 @@ func applyJoinLogFont(app *guiApp, presentCount int) {
|
|
|
|
|
size = app.fontSize
|
|
|
|
|
}
|
|
|
|
|
if size <= 0 {
|
|
|
|
|
size = 18
|
|
|
|
|
size = defaultGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
if app.joinHFont != 0 && app.joinBoldHFont != 0 && app.joinHeadlineHFont != 0 &&
|
|
|
|
|
app.joinFontSize == size && app.joinBoldFontSize == size && app.joinHeadlineSize == size+2 {
|
|
|
|
|
@@ -1508,7 +1518,7 @@ func applyJoinLogFontSize(app *guiApp, size int) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if size <= 0 {
|
|
|
|
|
size = 18
|
|
|
|
|
size = defaultGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
if app.joinHFont != 0 && app.joinBoldHFont != 0 && app.joinFontSize == size && app.joinBoldFontSize == size {
|
|
|
|
|
return
|
|
|
|
|
@@ -1538,7 +1548,7 @@ func applyJoinLogFontSize(app *guiApp, size int) {
|
|
|
|
|
func fitJoinLogFontSize(baseSize, lineCount, availableHeight int) int {
|
|
|
|
|
size := baseSize
|
|
|
|
|
if size <= 0 {
|
|
|
|
|
size = 18
|
|
|
|
|
size = defaultGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
if lineCount <= 0 {
|
|
|
|
|
lineCount = 1
|
|
|
|
|
@@ -1546,14 +1556,14 @@ func fitJoinLogFontSize(baseSize, lineCount, availableHeight int) int {
|
|
|
|
|
if availableHeight <= 0 {
|
|
|
|
|
availableHeight = 300
|
|
|
|
|
}
|
|
|
|
|
for size > 8 {
|
|
|
|
|
for size > minGUIFontSize {
|
|
|
|
|
if joinPaneContentHeight(size, lineCount) <= availableHeight {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
size -= 2
|
|
|
|
|
}
|
|
|
|
|
if size < 8 {
|
|
|
|
|
size = 8
|
|
|
|
|
if size < minGUIFontSize {
|
|
|
|
|
size = minGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
return size
|
|
|
|
|
}
|
|
|
|
|
@@ -1857,22 +1867,17 @@ func paintSettingsPane(hwnd uintptr, app *guiApp) uintptr {
|
|
|
|
|
drawPaneText(hdc, 24, 68, "表示", app.hFont, clrMutedText)
|
|
|
|
|
drawSettingsWideButton(hdc, settingsTopMostRect(), "Top most", onOffBool(app.topMost), app.hFont, app.topMost)
|
|
|
|
|
drawSettingsWideButton(hdc, settingsAutoUnmuteRect(), "Leave unmute", onOffBool(app.autoUnmuteOnLeave), app.hFont, app.autoUnmuteOnLeave)
|
|
|
|
|
drawPaneText(hdc, 24, 190, "文字サイズ", app.hFont, clrMutedText)
|
|
|
|
|
drawPaneText(hdc, 24, 190, "更新間隔", app.hFont, clrMutedText)
|
|
|
|
|
drawSettingsRefreshControl(hdc, app)
|
|
|
|
|
drawPaneText(hdc, 24, 314, "文字サイズ", app.hFont, clrMutedText)
|
|
|
|
|
drawSettingsFontControl(hdc, app)
|
|
|
|
|
drawPaneText(hdc, 24, 390, "履歴 Export", app.hFont, clrMutedText)
|
|
|
|
|
drawPaneText(hdc, 24, 414, "出力先フォルダ", app.hFont, clrMutedText)
|
|
|
|
|
drawSettingsBox(hdc, settingsHistoryExportDirRect(), 0x0038281a, clrPaneBorder)
|
|
|
|
|
drawPaneText(hdc, 120, 414, exportDirDisplayText(app.historyExportDir), app.hFont, clrText)
|
|
|
|
|
drawSettingsWideButton(hdc, settingsHistoryExportBrowseRect(), "参照", "", app.hFont, true)
|
|
|
|
|
drawPaneText(hdc, 24, 412, "出力先フォルダ", app.hFont, clrMutedText)
|
|
|
|
|
drawSettingsWideButton(hdc, settingsHistoryExportTimeRect(), "Time", onOffBool(app.historyExportIncludeTime), app.hFont, app.historyExportIncludeTime)
|
|
|
|
|
drawSettingsWideButton(hdc, settingsHistoryExportWorldRect(), "World", onOffBool(app.historyExportIncludeWorld), app.hFont, app.historyExportIncludeWorld)
|
|
|
|
|
drawSettingsWideButton(hdc, settingsHistoryExportJoinLeaveRect(), "Join/Leave", onOffBool(app.historyExportIncludeJoinLeave), app.hFont, app.historyExportIncludeJoinLeave)
|
|
|
|
|
drawSettingsWideButton(hdc, settingsHistoryExportCustomToggleRect(), "Custom", onOffBool(app.historyExportCustomEnabled), app.hFont, app.historyExportCustomEnabled)
|
|
|
|
|
drawPaneText(hdc, 24, 522, "Custom 条件", app.hFont, clrMutedText)
|
|
|
|
|
drawSettingsBox(hdc, settingsHistoryExportCustomRect(), 0x0038281a, clrPaneBorder)
|
|
|
|
|
drawPaneText(hdc, 120, 522, previewLine(app.historyExportCustom, 60), app.hFont, clrText)
|
|
|
|
|
drawSettingsWideButton(hdc, settingsHistoryExportCustomSaveRect(), "保存", "", app.hFont, true)
|
|
|
|
|
drawPaneText(hdc, 24, 532, "Custom 条件", app.hFont, clrMutedText)
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1913,35 +1918,35 @@ func settingsFontUpRect() winRect {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func settingsHistoryExportDirRect() winRect {
|
|
|
|
|
return winRect{Left: 116, Top: 410, Right: 636, Bottom: 434}
|
|
|
|
|
return winRect{Left: 24, Top: 436, Right: 636, Bottom: 460}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func settingsHistoryExportBrowseRect() winRect {
|
|
|
|
|
return winRect{Left: 644, Top: 410, Right: 736, Bottom: 434}
|
|
|
|
|
return winRect{Left: 644, Top: 436, Right: 736, Bottom: 460}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func settingsHistoryExportTimeRect() winRect {
|
|
|
|
|
return winRect{Left: 24, Top: 442, Right: 360, Bottom: 476}
|
|
|
|
|
return winRect{Left: 24, Top: 468, Right: 360, Bottom: 498}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func settingsHistoryExportWorldRect() winRect {
|
|
|
|
|
return winRect{Left: 376, Top: 442, Right: 736, Bottom: 476}
|
|
|
|
|
return winRect{Left: 376, Top: 468, Right: 736, Bottom: 498}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func settingsHistoryExportJoinLeaveRect() winRect {
|
|
|
|
|
return winRect{Left: 24, Top: 480, Right: 360, Bottom: 514}
|
|
|
|
|
return winRect{Left: 24, Top: 504, Right: 360, Bottom: 534}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func settingsHistoryExportCustomToggleRect() winRect {
|
|
|
|
|
return winRect{Left: 376, Top: 480, Right: 736, Bottom: 514}
|
|
|
|
|
return winRect{Left: 376, Top: 504, Right: 736, Bottom: 534}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func settingsHistoryExportCustomRect() winRect {
|
|
|
|
|
return winRect{Left: 116, Top: 520, Right: 636, Bottom: 544}
|
|
|
|
|
return winRect{Left: 24, Top: 552, Right: 636, Bottom: 574}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func settingsHistoryExportCustomSaveRect() winRect {
|
|
|
|
|
return winRect{Left: 644, Top: 520, Right: 736, Bottom: 544}
|
|
|
|
|
return winRect{Left: 644, Top: 552, Right: 736, Bottom: 574}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func handleSettingsPaneClick(app *guiApp, x, y int32, getWindowText, setWindowText *syscall.LazyProc) bool {
|
|
|
|
|
@@ -1972,15 +1977,21 @@ func handleSettingsPaneClick(app *guiApp, x, y int32, getWindowText, setWindowTe
|
|
|
|
|
applyRefreshTimer(app.hwnd, app)
|
|
|
|
|
}
|
|
|
|
|
case pointInRect(x, y, settingsFontDownRect()):
|
|
|
|
|
if app.fontSize > 10 {
|
|
|
|
|
if app.fontSize > minGUIFontSize {
|
|
|
|
|
app.fontSize -= 2
|
|
|
|
|
if app.fontSize < minGUIFontSize {
|
|
|
|
|
app.fontSize = minGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
app.hFont = createAppFont(app.fontSize)
|
|
|
|
|
applyFont(app)
|
|
|
|
|
saveGUISettings(app)
|
|
|
|
|
}
|
|
|
|
|
case pointInRect(x, y, settingsFontUpRect()):
|
|
|
|
|
if app.fontSize < 30 {
|
|
|
|
|
if app.fontSize < maxGUIFontSize {
|
|
|
|
|
app.fontSize += 2
|
|
|
|
|
if app.fontSize > maxGUIFontSize {
|
|
|
|
|
app.fontSize = maxGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
app.hFont = createAppFont(app.fontSize)
|
|
|
|
|
applyFont(app)
|
|
|
|
|
saveGUISettings(app)
|
|
|
|
|
@@ -2025,9 +2036,9 @@ func drawSettingsRefreshControl(hdc uintptr, app *guiApp) {
|
|
|
|
|
drawSettingsBox(hdc, settingsRefreshValueRect(), uint32(0x0038281a), border)
|
|
|
|
|
drawSettingsBox(hdc, settingsRefreshUpRect(), fill, border)
|
|
|
|
|
drawSettingsWideButton(hdc, settingsRefreshUnitRect(), "\u5358\u4f4d", refreshIntervalUnitLabel(app.refreshIntervalUnit), font, true)
|
|
|
|
|
drawCenteredPaneText(hdc, settingsRefreshDownRect(), "A-", font, clrText)
|
|
|
|
|
drawCenteredPaneText(hdc, settingsRefreshDownRect(), "-", font, clrText)
|
|
|
|
|
drawCenteredPaneText(hdc, settingsRefreshValueRect(), refreshIntervalValueLabel(app.refreshIntervalValue, app.refreshIntervalUnit), font, clrMutedText)
|
|
|
|
|
drawCenteredPaneText(hdc, settingsRefreshUpRect(), "A+", font, clrText)
|
|
|
|
|
drawCenteredPaneText(hdc, settingsRefreshUpRect(), "+", font, clrText)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func refreshIntervalValueLabel(value int, unit string) string {
|
|
|
|
|
@@ -2652,7 +2663,7 @@ func drawSettingsFontControl(hdc uintptr, app *guiApp) {
|
|
|
|
|
drawSettingsBox(hdc, settingsFontValueRect(), uint32(0x0038281a), border)
|
|
|
|
|
drawSettingsBox(hdc, settingsFontUpRect(), fill, border)
|
|
|
|
|
drawCenteredPaneText(hdc, settingsFontDownRect(), "A-", font, clrText)
|
|
|
|
|
drawCenteredPaneText(hdc, settingsFontValueRect(), strconv.Itoa(app.fontSize), font, clrMutedText)
|
|
|
|
|
drawCenteredPaneText(hdc, settingsFontValueRect(), strconv.Itoa(app.fontSize)+" pt", font, clrMutedText)
|
|
|
|
|
drawCenteredPaneText(hdc, settingsFontUpRect(), "A+", font, clrText)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -3310,7 +3321,7 @@ func formatDurationShort(d time.Duration) string {
|
|
|
|
|
func joinLogFontSize(baseSize, presentCount int) int {
|
|
|
|
|
size := baseSize
|
|
|
|
|
if size <= 0 {
|
|
|
|
|
size = 18
|
|
|
|
|
size = defaultGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
if presentCount <= 32 {
|
|
|
|
|
return size
|
|
|
|
|
@@ -3323,8 +3334,8 @@ func joinLogFontSize(baseSize, presentCount int) int {
|
|
|
|
|
case presentCount >= 33:
|
|
|
|
|
size -= 2
|
|
|
|
|
}
|
|
|
|
|
if size < 8 {
|
|
|
|
|
size = 8
|
|
|
|
|
if size < minGUIFontSize {
|
|
|
|
|
size = minGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
return size
|
|
|
|
|
}
|
|
|
|
|
@@ -3779,7 +3790,7 @@ func loadGUISettings() config.GUIConfig {
|
|
|
|
|
if err != nil || cfg == nil {
|
|
|
|
|
return config.GUIConfig{
|
|
|
|
|
TopMost: false,
|
|
|
|
|
FontSize: 18,
|
|
|
|
|
FontSize: defaultGUIFontSize,
|
|
|
|
|
RefreshIntervalValue: 2,
|
|
|
|
|
RefreshIntervalUnit: "sec",
|
|
|
|
|
HistoryExportIncludeTime: true,
|
|
|
|
|
@@ -3788,7 +3799,7 @@ func loadGUISettings() config.GUIConfig {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if cfg.GUI.FontSize <= 0 {
|
|
|
|
|
cfg.GUI.FontSize = 18
|
|
|
|
|
cfg.GUI.FontSize = defaultGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
cfg.GUI.RefreshIntervalValue, cfg.GUI.RefreshIntervalUnit = normalizeRefreshIntervalSettings(cfg.GUI.RefreshIntervalValue, cfg.GUI.RefreshIntervalUnit)
|
|
|
|
|
cfg.GUI.HistoryRegex = strings.TrimSpace(cfg.GUI.HistoryRegex)
|
|
|
|
|
@@ -4139,7 +4150,7 @@ func formatRightPane(tab string, state map[string]any, worldLabel string, curren
|
|
|
|
|
b.WriteString("\r\nFont size: ")
|
|
|
|
|
fontSize, _ := state["font_size"].(int)
|
|
|
|
|
if fontSize == 0 {
|
|
|
|
|
fontSize = 18
|
|
|
|
|
fontSize = defaultGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
b.WriteString(strconv.Itoa(fontSize))
|
|
|
|
|
b.WriteString("\r\nLeave unmute: ")
|
|
|
|
|
@@ -4177,7 +4188,7 @@ func formatSettingsPane(state map[string]any) string {
|
|
|
|
|
b.WriteString("\r\nFont size: ")
|
|
|
|
|
fontSize, _ := state["font_size"].(int)
|
|
|
|
|
if fontSize == 0 {
|
|
|
|
|
fontSize = 18
|
|
|
|
|
fontSize = defaultGUIFontSize
|
|
|
|
|
}
|
|
|
|
|
b.WriteString(strconv.Itoa(fontSize))
|
|
|
|
|
b.WriteString("\r\nLeave unmute: ")
|
|
|
|
|
|