(self)
Apply various configuration options
Apply various configuration options
Apply various configuration options
def apply_config(self):
        """Apply various configuration options"""
        options = self.config.options_get()
        maximise = self.config['window_state'] == 'maximise'
        fullscreen = self.config['window_state'] == 'fullscreen'
        hidden = self.config['window_state'] == 'hidden'
        borderless = self.config['borderless']
        skiptaskbar = self.config['hide_from_taskbar']
        alwaysontop = self.config['always_on_top']
        sticky = self.config['sticky']

        if options:
            if options.maximise:
                maximise = True
            if options.fullscreen:
                fullscreen = True
            if options.hidden:
                hidden = True
            if options.borderless:
                borderless = True

        self.set_fullscreen(fullscreen)
        self.set_maximised(maximise)
        self.set_borderless(borderless)
        self.set_always_on_top(alwaysontop)
        self.set_real_transparency()
        self.set_sticky(sticky)
        if self.hidebound:
            self.set_hidden(hidden)
            self.set_skip_taskbar_hint(skiptaskbar)
        else:
            self.set_iconified(hidden)
def apply_config ( self ) : options = self . config . options_get ( ) maximise = self . config [ 'window_state' ] == 'maximise' fullscreen = self . config [ 'window_state' ] == 'fullscreen' hidden = self . config [ 'window_state' ] == 'hidden' borderless = self . config [ 'borderless' ] skiptaskbar = self . config [ 'hide_from_taskbar' ] alwaysontop = self . config [ 'always_on_top' ] sticky = self . config [ 'sticky' ] if options : if options . maximise : maximise = True if options . fullscreen : fullscreen = True if options . hidden : hidden = True if options . borderless : borderless = True self . set_fullscreen ( fullscreen ) self . set_maximised ( maximise ) self . set_borderless ( borderless ) self . set_always_on_top ( alwaysontop ) self . set_real_transparency ( ) self . set_sticky ( sticky ) if self . hidebound : self . set_hidden ( hidden ) self . set_skip_taskbar_hint ( skiptaskbar ) else : self . set_iconified ( hidden )