From cbd6159d4e4a2c6ffdb49a13eeba9f731a8928c1 Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Tue, 23 Feb 2021 20:37:17 -0500 Subject: [PATCH] Start on #73, #103, #104, #105, and #106 Allow adjustment of font settings GUI modifications to come --- Includes/_GetLanguage.au3 | 5 +++++ Lang/Template.ini | 5 +++++ NotCPUCores.au3 | 3 +++ 3 files changed, 13 insertions(+) diff --git a/Includes/_GetLanguage.au3 b/Includes/_GetLanguage.au3 index acbdc0f..6315049 100644 --- a/Includes/_GetLanguage.au3 +++ b/Includes/_GetLanguage.au3 @@ -433,6 +433,11 @@ Func _LoadLanguage($sPath = @OSLang) Global $_sLang_Translator = IniRead($sPath, "File", "Translator", "Robert Maehl") #EndRegion + #Region ; GUI Values + Global $_sLang_GUIFontSize = IniRead($sPath, "Font", "Size" , "8.5") + Global $_sLang_GUIFontWeight = IniRead($sPath, "Font", "Weight" , "400") + Global $_sLang_GUIFontName = IniRead($sPath, "Font", "Name" , "" ) + #Region ; Global Tips Usage Global $_sLang_Example = IniRead($sPath, "Global Tips", "Example", "Example") Global $_sLang_Usage = IniRead($sPath, "Global Tips", "Usage" , "Usage" ) diff --git a/Lang/Template.ini b/Lang/Template.ini index 979d8ab..03447f2 100644 --- a/Lang/Template.ini +++ b/Lang/Template.ini @@ -3,6 +3,11 @@ Version= Language= Translator= +[Font] +Size=8.5 +Weight=400 +Name="" + [Global Tips] Example=Example Usage=Usage diff --git a/NotCPUCores.au3 b/NotCPUCores.au3 index 5ec3cf3..e36ae1f 100644 --- a/NotCPUCores.au3 +++ b/NotCPUCores.au3 @@ -98,6 +98,7 @@ Func Main() Local $hGUI = GUICreate("NotCPUCores", 640, 480, -1, -1, BitOr($WS_MINIMIZEBOX, $WS_CAPTION, $WS_SYSMENU)) GUISetOnEvent($GUI_EVENT_CLOSE, "OnInterrupt") + GUISetFont($_sLang_GUIFontSize, $_sLang_GUIFontWeight, 0, $_sLang_GUIFontName) #Region ; Dummy Controls Local $hClear = GUICtrlCreateDummy() @@ -443,6 +444,7 @@ Func Main() $hQuickTabs = GUICreate("", 360, 300, 280, 0, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) GUISetAccelerators($aHotkeys) + GUISetFont($_sLang_GUIFontSize, $_sLang_GUIFontWeight, 0, $_sLang_GUIFontName) $hTabs = GUICtrlCreateTab(0, 0, 360, 300) @@ -496,6 +498,7 @@ Func Main() #Region ; Sleep Timer GUI $hTimerGUI = GUICreate($_sLang_SleepSet, 240, 120, -1, -1, $WS_POPUP + $WS_CAPTION, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) + GUISetFont($_sLang_GUIFontSize, $_sLang_GUIFontWeight, 0, $_sLang_GUIFontName) GUICtrlCreateLabel($_sLang_SleepText, 10, 5, 220, 45) GUICtrlCreateLabel($_sLang_NewSleep & ":", 10, 60, 110, 20)