def set_indicator(self, options):
        self._indicator_loaded = False
        self._options = deepcopy(options)
        self._name = options[Option.Name]

        self._option_type.value = options[Option.Name]
        self._option_path.value = options.get(Option.Path)

        self._option_text.value = options.get(Option.Text, "")
        self._option_text.enabled = Option.Text in options

        self._option_image.value = options.get(Option.Image)
        self._option_image.enabled = Option.Image in options

        self._reversed = Option.Layout in options and LayoutSet.Reversed in options[Option.Layout]

        hide_disabled = options.get(Option.HideDisabled, bool2string(False))
        self._option_hide_disabled.value = hide_disabled or bool2string(True)

        self._indicator_loaded = True
        self._on_option_changed()
    def set_indicator(self, options):
        self._indicator_loaded = False
        self._options = deepcopy(options)
        self._name = options[Option.Name]

        self._option_type.value = options[Option.Name]
        self._option_path.value = options.get(Option.Path)

        self._option_text.value = options.get(Option.Text, '')
        self._option_text.enabled = Option.Text in options

        self._option_image.value = options.get(Option.Image)
        self._option_image.enabled = Option.Image in options

        self._reversed = Option.Layout in options and LayoutSet.Reversed in options[
            Option.Layout]

        hide_disabled = options.get(Option.HideDisabled, bool2string(False))
        self._option_hide_disabled.value = hide_disabled or bool2string(True)

        self._indicator_loaded = True
        self._on_option_changed()
Пример #3
0
 def _get_value(self):
     return bool2string(not self._value.props.active)
Пример #4
0
 def _get_value(self):
     return bool2string(not self._value.props.active)