def script_switch_flatMode(self,gesture) :
val = config.conf['lambda']['brailleFlatMode'] = not config.conf['lambda']['brailleFlatMode']
#Translators: This determines whether to use API or DisplayMode to render the editor window on a braille display. It is a toggle (on/off)
flatModeMessage = _("flat mode ")
self.TextInfo = self._get_TextInfo()
ui.message(flatModeMessage + ((lambda x: shMsg.GLB_ON if x else shMsg.GLB_OFF)(val)))
braille.handler.mainBuffer.clear()
braille.handler.handleGainFocus(self)
#This script set the desired textInfo for braille, when flat mode is on, the LambdaEditorFlatTextInfo is used, otherwise the LambdaEditorTextInfo is set.
评论列表
文章目录