MCPcopy Create free account
hub / github.com/SolarLune/masterplan / NewProgramSettings

Function NewProgramSettings

settings.go:159–274  ·  view source on GitHub ↗
(load bool)

Source from the content-addressed store, hash-verified

157)
158
159func NewProgramSettings(load bool) *Properties {
160
161 // We're setting the defaults here; after setting them, we'll attempt to load settings from a preferences file below
162
163 props := NewProperties()
164 props.Get(SettingsTheme).Set("Moonlight")
165 props.Get(SettingsLightboxEffect).Set(0.25)
166 props.Get(SettingsTargetFPS).Set(60.0)
167 props.Get(SettingsUnfocusedFPS).Set(60.0)
168 props.Get(SettingsDisplayMessages).Set(true)
169 props.Get(SettingsDoubleClickMode).Set(DoubleClickLast)
170 props.Get(SettingsShowGrid).Set(true)
171 props.Get(SettingsSaveWindowPosition).Set(true)
172 props.Get(SettingsFlashSelected).Set(true)
173 props.Get(SettingsFocusOnElapsedTimers).Set(false)
174 props.Get(SettingsNotifyOnElapsedTimers).Set(true)
175 props.Get(SettingsPlayAlarmSound).Set(true)
176 props.Get(SettingsShowAboutDialogOnStart).Set(true)
177 props.Get(SettingsReversePan).Set(false)
178 props.Get(SettingsCustomFontPath).Set("")
179 props.Get(SettingsScreenshotPath).Set("")
180 props.Get(SettingsBrowserPath).Set("")
181 props.Get(SettingsBrowserDefaultURL).Set("https://www.duckduckgo.com/")
182 props.Get(SettingsBrowserUserDataPath).Set("")
183 props.Get(SettingsAutoLoadLastProject).Set(false)
184 props.Get(SettingsSmoothMovement).Set(true)
185 props.Get(SettingsNumberTopLevelCards).Set(true)
186 props.Get(SettingsNumberingStyle).Set(NumberingStyleNumber)
187 props.Get(SettingsNumberingSeparator).Set(".")
188 props.Get(SettingsFocusOnSelectingWithKeys).Set(true)
189 props.Get(SettingsFocusOnUndo).Set(true)
190 props.Get(SettingsOutlineWindow).Set(false)
191 props.Get(SettingsAutoBackup).Set(true)
192 props.Get(SettingsAutoBackupTime).Set(10.0)
193 props.Get(SettingsMaxAutoBackups).Set(6.0)
194 props.Get(SettingsMouseWheelSensitivity).Set(Percentage100)
195 props.Get(SettingsZoomToCursor).Set(true)
196 props.Get(SettingsCardShadows).Set(true)
197 props.Get(SettingsFlashDeadlines).Set(true)
198 props.Get(SettingsMaxInternalImageSize).Set(ImageBufferSize2048)
199 props.Get(SettingsPlaceNewCardsInStack).Set(true)
200 props.Get(SettingsHideGridOnZoomOut).Set(true)
201 props.Get(SettingsDisplayNumberedPercentagesAs).Set(NumberedPercentagePercent)
202 props.Get(SettingsShowTableHeaders).Set(TableHeadersSelected)
203 props.Get(SettingsWebCardZoomLevel).Set(0.75)
204
205 props.Get(SettingsAudioSoundVolume).Set(0.8)
206 props.Get(SettingsAudioUIVolume).Set(0.8)
207 props.Get(SettingsAudioSampleRate).Set(AudioSampleRate44100)
208 props.Get(SettingsAudioBufferSize).Set(AudioBufferSize1024)
209
210 props.Get(SettingsWindowBGTransparency).Set(1)
211 props.Get(SettingsWindowBGTransparencyMode).Set(WindowTransparencyAlways)
212 props.Get(SettingsWindowFrameTransparency).Set(1)
213 props.Get(SettingsWindowFrameTransparencyMode).Set(WindowTransparencyAlways)
214
215 borderless := props.Get(SettingsBorderlessWindow)
216 borderless.Set(false)

Callers 2

initFunction · 0.85
ConstructMenusFunction · 0.85

Calls 11

GetMethod · 0.95
DeserializeMethod · 0.95
NewPropertiesFunction · 0.85
FileExistsFunction · 0.85
SaveSettingsFunction · 0.85
AsBoolMethod · 0.80
ParseMethod · 0.80
SetMethod · 0.45
StringMethod · 0.45
GetMethod · 0.45
DeserializeMethod · 0.45

Tested by

no test coverage detected