@ -64,7 +64,7 @@ local KoptOptions = {
}
}
end
end
end ,
end ,
-- For Dispatcher 's sake
-- For Dispatcher & onMakeDefault 's sake
labels = { C_ ( " Rotation " , " ⤹ 90° " ) , C_ ( " Rotation " , " ↑ 0° " ) , C_ ( " Rotation " , " ⤸ 90° " ) , C_ ( " Rotation " , " ↓ 180° " ) } ,
labels = { C_ ( " Rotation " , " ⤹ 90° " ) , C_ ( " Rotation " , " ↑ 0° " ) , C_ ( " Rotation " , " ⤸ 90° " ) , C_ ( " Rotation " , " ↓ 180° " ) } ,
alternate = false ,
alternate = false ,
values = { Screen.ORIENTATION_LANDSCAPE_ROTATED , Screen.ORIENTATION_PORTRAIT , Screen.ORIENTATION_LANDSCAPE , Screen.ORIENTATION_PORTRAIT_ROTATED } ,
values = { Screen.ORIENTATION_LANDSCAPE_ROTATED , Screen.ORIENTATION_PORTRAIT , Screen.ORIENTATION_LANDSCAPE , Screen.ORIENTATION_PORTRAIT_ROTATED } ,
@ -119,6 +119,10 @@ In 'semi-auto' and 'manual' modes, you may need to define areas once on an odd p
{
{
name = " zoom_overlap_h " ,
name = " zoom_overlap_h " ,
name_text = _ ( " Horizontal overlap " ) ,
name_text = _ ( " Horizontal overlap " ) ,
enabled_func = function ( configurable , document )
-- NOTE: document.is_reflowable is wonky as hell, don't trust it.
return optionsutil.enableIfEquals ( configurable , " text_wrap " , 0 )
end ,
buttonprogress = true ,
buttonprogress = true ,
fine_tune = true ,
fine_tune = true ,
values = { 0 , 12 , 24 , 36 , 48 , 60 , 72 , 84 } ,
values = { 0 , 12 , 24 , 36 , 48 , 60 , 72 , 84 } ,
@ -137,6 +141,10 @@ In 'semi-auto' and 'manual' modes, you may need to define areas once on an odd p
{
{
name = " zoom_overlap_v " ,
name = " zoom_overlap_v " ,
name_text = _ ( " Vertical overlap " ) ,
name_text = _ ( " Vertical overlap " ) ,
enabled_func = function ( configurable , document )
-- NOTE: document.is_reflowable is wonky as hell, don't trust it.
return optionsutil.enableIfEquals ( configurable , " text_wrap " , 0 )
end ,
buttonprogress = true ,
buttonprogress = true ,
fine_tune = true ,
fine_tune = true ,
values = { 0 , 12 , 24 , 36 , 48 , 60 , 72 , 84 } ,
values = { 0 , 12 , 24 , 36 , 48 , 60 , 72 , 84 } ,
@ -155,10 +163,14 @@ In 'semi-auto' and 'manual' modes, you may need to define areas once on an odd p
{
{
name = " zoom_mode_type " ,
name = " zoom_mode_type " ,
name_text = _ ( " Fit " ) ,
name_text = _ ( " Fit " ) ,
enabled_func = function ( configurable , document )
-- NOTE: document.is_reflowable is wonky as hell, don't trust it.
return optionsutil.enableIfEquals ( configurable , " text_wrap " , 0 )
end ,
toggle = { _ ( " full " ) , _ ( " width " ) , _ ( " height " ) } ,
toggle = { _ ( " full " ) , _ ( " width " ) , _ ( " height " ) } ,
alternate = false ,
alternate = false ,
values = { 2 , 1 , 0 } ,
values = { 2 , 1 , 0 } ,
default_value = 2 ,
default_value = 1 ,
show_func = function ( config ) return config and config.zoom_mode_genus > 2 end ,
show_func = function ( config ) return config and config.zoom_mode_genus > 2 end ,
event = " DefineZoom " ,
event = " DefineZoom " ,
args = { " full " , " width " , " height " } ,
args = { " full " , " width " , " height " } ,
@ -176,6 +188,10 @@ In 'semi-auto' and 'manual' modes, you may need to define areas once on an odd p
return _ ( " Number " )
return _ ( " Number " )
end ,
end ,
name_text_true_values = true ,
name_text_true_values = true ,
enabled_func = function ( configurable , document )
-- NOTE: document.is_reflowable is wonky as hell, don't trust it.
return optionsutil.enableIfEquals ( configurable , " text_wrap " , 0 )
end ,
show_true_value_func = function ( str )
show_true_value_func = function ( str )
return string.format ( " %.1f " , str )
return string.format ( " %.1f " , str )
end ,
end ,
@ -202,6 +218,10 @@ In 'semi-auto' and 'manual' modes, you may need to define areas once on an odd p
name = " zoom_factor " ,
name = " zoom_factor " ,
name_text = _ ( " Zoom factor " ) ,
name_text = _ ( " Zoom factor " ) ,
name_text_true_values = true ,
name_text_true_values = true ,
enabled_func = function ( configurable , document )
-- NOTE: document.is_reflowable is wonky as hell, don't trust it.
return optionsutil.enableIfEquals ( configurable , " text_wrap " , 0 )
end ,
show_true_value_func = function ( str )
show_true_value_func = function ( str )
return string.format ( " %.1f " , str )
return string.format ( " %.1f " , str )
end ,
end ,
@ -226,6 +246,10 @@ In 'semi-auto' and 'manual' modes, you may need to define areas once on an odd p
{
{
name = " zoom_mode_genus " ,
name = " zoom_mode_genus " ,
name_text = _ ( " Zoom to " ) ,
name_text = _ ( " Zoom to " ) ,
enabled_func = function ( configurable , document )
-- NOTE: document.is_reflowable is wonky as hell, don't trust it.
return optionsutil.enableIfEquals ( configurable , " text_wrap " , 0 )
end ,
-- toggle = {_("page"), _("content"), _("columns"), _("rows"), _("manual")},
-- toggle = {_("page"), _("content"), _("columns"), _("rows"), _("manual")},
item_icons = {
item_icons = {
" zoom.page " ,
" zoom.page " ,
@ -236,6 +260,7 @@ In 'semi-auto' and 'manual' modes, you may need to define areas once on an odd p
} ,
} ,
alternate = false ,
alternate = false ,
values = { 4 , 3 , 2 , 1 , 0 } ,
values = { 4 , 3 , 2 , 1 , 0 } ,
labels = { _ ( " page " ) , _ ( " content " ) , _ ( " columns " ) , _ ( " rows " ) , _ ( " manual " ) } ,
default_value = 4 ,
default_value = 4 ,
event = " DefineZoom " ,
event = " DefineZoom " ,
args = { " page " , " content " , " columns " , " rows " , " manual " } ,
args = { " page " , " content " , " columns " , " rows " , " manual " } ,
@ -245,7 +270,7 @@ In 'semi-auto' and 'manual' modes, you may need to define areas once on an odd p
name = " zoom_direction " ,
name = " zoom_direction " ,
name_text = _ ( " Direction " ) ,
name_text = _ ( " Direction " ) ,
enabled_func = function ( config )
enabled_func = function ( config )
return config.zoom_mode_genus < 3
return optionsutil.enableIfEquals( config , " text_wrap " , 0 ) and config.zoom_mode_genus < 3
end ,
end ,
item_icons = {
item_icons = {
" direction.LRTB " ,
" direction.LRTB " ,
@ -259,6 +284,16 @@ In 'semi-auto' and 'manual' modes, you may need to define areas once on an odd p
} ,
} ,
alternate = false ,
alternate = false ,
values = { 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 } ,
values = { 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 } ,
labels = {
_ ( " Left to Right, Top to Bottom " ) ,
_ ( " Top to Bottom, Left to Right " ) ,
_ ( " Left to Right, Bottom to Top " ) ,
_ ( " Bottom to Top, Left to Right " ) ,
_ ( " Bottom to Top, Right to Left " ) ,
_ ( " Right to Left, Bottom to Top " ) ,
_ ( " Top to Bottom, Right to Left " ) ,
_ ( " Right to Left, Top to Bottom " ) ,
} ,
default_value = 7 ,
default_value = 7 ,
event = " DefineZoom " ,
event = " DefineZoom " ,
args = { 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 } ,
args = { 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 } ,