mirror of
https://github.com/gen2brain/cbconvert
synced 2026-06-30 09:11:54 +02:00
Organize Input tab, add more tooltips
This commit is contained in:
+46
-38
@@ -836,50 +836,55 @@ func preview() iup.Ihandle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func tabs() iup.Ihandle {
|
func tabs() iup.Ihandle {
|
||||||
vboxInput := iup.Vbox(
|
vboxInput := iup.Hbox(
|
||||||
iup.Toggle(" Recurse SubDirectories").SetHandle("Recursive").
|
iup.Vbox(
|
||||||
SetAttributes(`TIP="Process subdirectories recursively"`),
|
iup.Toggle(" Recurse SubDirectories").SetHandle("Recursive").
|
||||||
iup.Toggle(" Only Grayscale Images").SetHandle("NoRGB").
|
SetAttributes(`TIP="Process subdirectories recursively"`),
|
||||||
SetAttributes(`TIP="Do not convert images that have RGB colorspace"`),
|
iup.Toggle(" Only Grayscale Images").SetHandle("NoRGB").
|
||||||
iup.Toggle(" Exclude Cover").SetHandle("NoCover").
|
SetAttributes(`TIP="Do not convert images that have RGB colorspace"`),
|
||||||
SetAttributes(`TIP="Do not convert the cover image"`),
|
iup.Toggle(" Exclude Cover").SetHandle("NoCover").
|
||||||
iup.Toggle(" Remove Non-Image Files from the Archive").SetHandle("NoNonImage").
|
SetAttributes(`TIP="Do not convert the cover image"`),
|
||||||
SetAttribute("TIP", "Remove .nfo, .xml, .txt files from the archive"),
|
iup.Toggle(" Remove Non-Image Files from the Archive").SetHandle("NoNonImage").
|
||||||
iup.Toggle(" Do not Transform or Convert Images").SetHandle("NoConvert").
|
SetAttribute("TIP", "Remove .nfo, .xml, .txt files from the archive"),
|
||||||
SetAttributes(`TIP="Copy images from archive or directory without modifications"`).
|
iup.Toggle(" Do not Transform or Convert Images").SetHandle("NoConvert").
|
||||||
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
SetAttributes(`TIP="Copy images from archive or directory without modifications"`).
|
||||||
setActive()
|
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
||||||
|
setActive()
|
||||||
|
|
||||||
return iup.DEFAULT
|
return iup.DEFAULT
|
||||||
})),
|
})),
|
||||||
|
).SetAttributes("NGAP=10"),
|
||||||
|
iup.Space().SetAttribute("SIZE", "15"),
|
||||||
iup.Vbox(
|
iup.Vbox(
|
||||||
iup.Label("Minimum Size (MiB):"),
|
iup.Vbox(
|
||||||
iup.Text().SetAttributes(`SPIN=YES, SPINMAX=2048, VISIBLECOLUMNS=4, MASK="/d*"`).SetHandle("Size").
|
iup.Label("Minimum Size (MiB):"),
|
||||||
SetAttributes(`TIP="Process only files larger than minimum size"`),
|
iup.Text().SetAttributes(`SPIN=YES, SPINMAX=2048, VISIBLECOLUMNS=4, MASK="/d*"`).SetHandle("Size").
|
||||||
),
|
SetAttributes(`TIP="Process only files larger than minimum size"`),
|
||||||
iup.Vbox(
|
),
|
||||||
iup.Label("Document DPI:"),
|
iup.Vbox(
|
||||||
iup.List().SetAttributes(map[string]string{
|
iup.Label("Document DPI:"),
|
||||||
"DROPDOWN": "YES",
|
iup.List().SetAttributes(map[string]string{
|
||||||
"EDITBOX": "YES",
|
"DROPDOWN": "YES",
|
||||||
"VISIBLECOLUMNS": "6",
|
"EDITBOX": "YES",
|
||||||
"VALUE": "Default",
|
"VISIBLECOLUMNS": "6",
|
||||||
"1": "Default",
|
"VALUE": "Default",
|
||||||
"2": "150",
|
"1": "Default",
|
||||||
"3": "300",
|
"2": "150",
|
||||||
"4": "600",
|
"3": "300",
|
||||||
"5": "1200",
|
"4": "600",
|
||||||
}).SetHandle("DPI").
|
"5": "1200",
|
||||||
SetAttribute("TIP", "Resolution for rendering documents (PDF, EPUB, etc.); Default is 300"),
|
}).SetHandle("DPI").
|
||||||
),
|
SetAttribute("TIP", "Resolution for rendering documents (PDF, EPUB, etc.); Default is 300"),
|
||||||
iup.Space().SetAttributes("EXPAND=HORIZONTAL"),
|
),
|
||||||
).SetHandle("VboxInput").SetAttributes("NGAP=10")
|
).SetAttributes("NGAP=10"),
|
||||||
|
).SetHandle("VboxInput")
|
||||||
|
|
||||||
vboxOutput := iup.Hbox(
|
vboxOutput := iup.Hbox(
|
||||||
iup.Vbox(
|
iup.Vbox(
|
||||||
iup.Vbox(
|
iup.Vbox(
|
||||||
iup.Label("Output Directory:"),
|
iup.Label("Output Directory:"),
|
||||||
iup.Text().SetAttributes("VISIBLECOLUMNS=16, MINSIZE=100x").SetHandle("OutDir").
|
iup.Text().SetAttributes("VISIBLECOLUMNS=16, MINSIZE=100x").SetHandle("OutDir").
|
||||||
|
SetAttribute("TIP", "Directory where converted files are written (required)").
|
||||||
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
||||||
setActive()
|
setActive()
|
||||||
|
|
||||||
@@ -902,6 +907,7 @@ func tabs() iup.Ihandle {
|
|||||||
"1": "ZIP",
|
"1": "ZIP",
|
||||||
"2": "TAR",
|
"2": "TAR",
|
||||||
}).SetHandle("Archive").
|
}).SetHandle("Archive").
|
||||||
|
SetAttribute("TIP", "Output container: ZIP (.cbz) or uncompressed TAR (.cbt)").
|
||||||
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
||||||
setActive()
|
setActive()
|
||||||
|
|
||||||
@@ -965,6 +971,7 @@ func tabs() iup.Ihandle {
|
|||||||
"6": "AVIF",
|
"6": "AVIF",
|
||||||
"7": "JXL",
|
"7": "JXL",
|
||||||
}).SetHandle("Format").
|
}).SetHandle("Format").
|
||||||
|
SetAttribute("TIP", "Output image format for the converted pages").
|
||||||
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
||||||
setEffort(strings.ToLower(ih.GetAttribute("VALUESTRING")))
|
setEffort(strings.ToLower(ih.GetAttribute("VALUESTRING")))
|
||||||
setActive()
|
setActive()
|
||||||
@@ -1157,6 +1164,7 @@ func tabs() iup.Ihandle {
|
|||||||
"3": "180",
|
"3": "180",
|
||||||
"4": "270",
|
"4": "270",
|
||||||
}).SetHandle("Rotate").
|
}).SetHandle("Rotate").
|
||||||
|
SetAttribute("TIP", "Rotate every page clockwise by the given angle in degrees").
|
||||||
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
||||||
previewPost()
|
previewPost()
|
||||||
|
|
||||||
@@ -1213,12 +1221,12 @@ func buttons() iup.Ihandle {
|
|||||||
remove,
|
remove,
|
||||||
removeAll,
|
removeAll,
|
||||||
).SetAttribute("NGAP", "2"),
|
).SetAttribute("NGAP", "2"),
|
||||||
iup.Space().SetAttribute("SIZE", "x8"),
|
iup.Space().SetAttribute("SIZE", "x5"),
|
||||||
iup.Vbox(
|
iup.Vbox(
|
||||||
thumbnail,
|
thumbnail,
|
||||||
cover,
|
cover,
|
||||||
).SetAttribute("NGAP", "2"),
|
).SetAttribute("NGAP", "2"),
|
||||||
iup.Space().SetAttribute("SIZE", "x8"),
|
iup.Space().SetAttribute("SIZE", "x5"),
|
||||||
iup.Vbox(
|
iup.Vbox(
|
||||||
convert,
|
convert,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user