tuikit/application.py
changeset 52 50a1857557da
parent 49 1611c462c3e3
child 57 911927edbdde
equal deleted inserted replaced
51:dce7325109c1 52:50a1857557da
   122             if self.quit:
   122             if self.quit:
   123                 break
   123                 break
   124 
   124 
   125 
   125 
   126     def applytheme(self):
   126     def applytheme(self):
       
   127         #TODO: allow custom colors:
       
   128         #    e.g. "blue (#2020FF) on black (#101010), underline"
       
   129         #    color in brackets is used when driver supports custom colors
   127         driver = self.driver
   130         driver = self.driver
   128         driver.setcolor('normal',                  'white on black')
   131         driver.setcolor('normal',                  'white on black')
   129         driver.setcolor('strong',                  'white on black, bold')
   132         driver.setcolor('strong',                  'white on black, bold')
   130         driver.setcolor('active',                  'black on cyan')
   133         driver.setcolor('active',                  'black on cyan')
   131         driver.setcolor('window:normal',           'white on blue')
   134         driver.setcolor('window:normal',           'white on blue')
   135         driver.setcolor('button-active',           'black on cyan')
   138         driver.setcolor('button-active',           'black on cyan')
   136         driver.setcolor('menu',                    'black on cyan')
   139         driver.setcolor('menu',                    'black on cyan')
   137         driver.setcolor('menu-active',             'white on cyan, bold')
   140         driver.setcolor('menu-active',             'white on cyan, bold')
   138         driver.setcolor('combo:normal',            'black on green')
   141         driver.setcolor('combo:normal',            'black on green')
   139 
   142 
   140         driver.setcolor('test-blink',              'cyan on blue, blink')
       
   141         driver.setcolor('test-bold',               'cyan on blue, bold')
       
   142         driver.setcolor('test-dim',                'cyan on blue, dim')
       
   143         driver.setcolor('test-standout',           'cyan on blue, standout')
       
   144         driver.setcolor('test-underline',          'cyan on blue, underline')
       
   145 
       
   146 
   143 
   147     def get_driver_instance(self, name):
   144     def get_driver_instance(self, name):
   148         module = __import__('tuikit.driver_' + name, fromlist=['driverclass'])
   145         module = __import__('tuikit.driver_' + name, fromlist=['driverclass'])
   149         return module.driverclass()
   146         return module.driverclass()
   150 
   147