Better ordering of settings
An example of what I mean:
A fresh 3.4.5 settings file; https://pastebin.com/raw/d6J8JV9A
and IMO, how it should look; https://pastebin.com/raw/Gam312gg
This would help with upgrades and keeping settings better organized/better readability. Is something like this possible? Right now everything seems to be in random orders, even just looking at my previous not so old v3.3.3 file, it's much different in the ordering.
Originally posted by @ImSpecial in https://github.com/sumatrapdfreader/sumatrapdf/discussions/2680
Personally prefered constants at start and variables last by that I mean the single line entries are easy to find in the first block on open settings and also those more static like annotation[ settings ] then others that need some occasional edit like [commands/external viewers/search] finally those changed frequently by usage such as [file history] [session data] but session data is most volatile and best left to the end after favorites which are part of file history
I agree with you that my ordering isn't ideal, and I like the sound of your way better, but my example was just a quick WIP done in notepad++, keeping things "mostly" the same layout as it was while fixing some spacing a bit and making things alphabetical in order. The real takeaway point I was trying to make and ask for was better readability though, and now that SumatraPDF has the amazing ability (seriously thank you!) to add in custom hotkeys/shortcuts, now is a good time to address this, as now many more people might have reason to poke inside that file to tweak things. :)
So this is @ImSpecial ordering.
To keep discussion specific, add your own version and I'll pick one I like best (possibly with my own changes).
FixedPageUI [
TextColor = #000000
BackgroundColor = #ffffff
SelectionColor = #f5fc0c
WindowMargin = 2 4 2 4
PageSpacing = 4 4
HideScrollbars = false
]
ComicBookUI [
WindowMargin = 0 0 0 0
PageSpacing = 4 4
CbxMangaMode = false
]
ChmUI [
UseFixedPageUI = false
]
Annotations [
HighlightColor = #ffff00
UnderlineColor = #00ff00
TextIconColor = #ffff00
TextIconType =
DefaultAuthor =
]
ExternalViewers [
]
FileStates [
]
ForwardSearch [
HighlightOffset = 0
HighlightWidth = 15
HighlightColor = #6581ff
HighlightPermanent = false
]
PrinterDefaults [
PrintScale = shrink
]
SelectionHandlers [
]
SessionData [
]
Shortcuts [
]
CheckForUpdates = true
CustomScreenDPI = 0
DefaultDisplayMode = automatic
DefaultZoom = fit page
EnableTeXEnhancements = false
EscToExit = false
FullPathInTitle = false
MainWindowBackground = #80fff200
OpenCountWeek = 596
ReloadModifiedDocuments = true
RememberOpenedFiles = true
RememberStatePerDocument = true
RestoreSession = true
ReuseInstance = false
ShowFavorites = false
ShowMenubar = true
ShowStartPage = true
ShowToc = true
ShowToolbar = true
SidebarDx = 0
SmoothScroll = false
TabWidth = 300
TimeOfLastUpdateCheck = 0 0
TocDy = 0
ToolbarSize = 18
TreeFontSize = 0
UiLanguage = en
UseSysColors = false
UseTabs = true
WindowPos = 511 0 897 1162
WindowState = 1
ZoomIncrement = 0
ZoomLevels = 8.33 12.5 18 25 33.33 50 66.67 75 100 125 150 200 300 400 600 800 1000 1200 1600 2000 2400 3200 4800 6400
# Settings below are not recognized by the current version
If I had to "do it over" and make a v2 of my example, I'd flip the bottom and top parts around like so;
# For documentation, see https://www.sumatrapdfreader.org/settings/settings3-4-5.html
CheckForUpdates = true
CustomScreenDPI = 0
DefaultDisplayMode = automatic
DefaultZoom = fit page
EnableTeXEnhancements = false
EscToExit = false
FullPathInTitle = false
MainWindowBackground = #80fff200
OpenCountWeek = 596
ReloadModifiedDocuments = true
RememberOpenedFiles = true
RememberStatePerDocument = true
RestoreSession = true
ReuseInstance = false
ShowFavorites = false
ShowMenubar = true
ShowStartPage = true
ShowToc = true
ShowToolbar = true
SidebarDx = 0
SmoothScroll = false
TabWidth = 300
TimeOfLastUpdateCheck = 0 0
TocDy = 0
ToolbarSize = 18
TreeFontSize = 0
UiLanguage = en
UseSysColors = false
UseTabs = true
WindowPos = 511 0 897 1162
WindowState = 1
ZoomIncrement = 0
ZoomLevels = 8.33 12.5 18 25 33.33 50 66.67 75 100 125 150 200 300 400 600 800 1000 1200 1600 2000 2400 3200 4800 6400
FixedPageUI [
TextColor = #000000
BackgroundColor = #ffffff
SelectionColor = #f5fc0c
WindowMargin = 2 4 2 4
PageSpacing = 4 4
HideScrollbars = false
]
ComicBookUI [
WindowMargin = 0 0 0 0
PageSpacing = 4 4
CbxMangaMode = false
]
ChmUI [
UseFixedPageUI = false
]
Annotations [
HighlightColor = #ffff00
UnderlineColor = #00ff00
TextIconColor = #ffff00
TextIconType =
DefaultAuthor =
]
ExternalViewers [
]
FileStates [
]
ForwardSearch [
HighlightOffset = 0
HighlightWidth = 15
HighlightColor = #6581ff
HighlightPermanent = false
]
PrinterDefaults [
PrintScale = shrink
]
SelectionHandlers [
]
SessionData [
]
Shortcuts [
]
# Settings below are not recognized by the current version
I'm torn on the UI settings, keep them where they are like shown in my v2, or make them alphabetical along with the rest (no favoritism!), but either way I'd be happy with it.
Also are there any hidden settings? If so, maybe have them be in there but commented out. I did a quick Google search and there's mention of "GradientColors", not sure if it still works though.
For references on that setting; https://oak.dev/2020/05/06/dark-mode-for-sumatra-pdf/ https://superuser.com/questions/52133/how-to-change-the-background-color-in-sumatrapdf-reader
@ImSpecial GradientColors = #123456 [#123456] [#123456] can be added into FixedPageUI [
Okay good to know, it even says so in the link at the top!
https://www.sumatrapdfreader.org/settings/settings3-4-5