Exemplo n.º 1
0
def setWindowSelectionColors(color=None,view=None):
	if not color:
		for v in VIEW_TYPES:
			sc = util.getSetting('selection_color_%s' % v, '802080FF')
			v_nf = dialogs.binascii.hexlify(chr(int(ord(dialogs.binascii.unhexlify(sc[:2])) / 4))) + sc[2:]
			dialogs.setGlobalSkinProperty('ForumBrowser_selection_color_%s' % v,sc)
			dialogs.setGlobalSkinProperty('ForumBrowser_selection_color_nofocus_%s' % v,v_nf)
	else:
		util.setSetting('selection_color_%s' % view, color)
		color_nf = dialogs.binascii.hexlify(chr(int(ord(dialogs.binascii.unhexlify(color[:2])) / 4))) + color[2:]
		dialogs.setGlobalSkinProperty('ForumBrowser_selection_color_%s' % view,color)
		dialogs.setGlobalSkinProperty('ForumBrowser_selection_color_nofocus_%s' % view,color_nf)
Exemplo n.º 2
0
def setWindowSlideUp(up=None,view=None):
	if up == None:
		up = util.getSetting('window_slide_up', False)
		for v in VIEW_TYPES:
			u = util.getSetting('window_slide_up_%s' % v, False)
			dialogs.setGlobalSkinProperty('ForumBrowser_window_slide_up_%s' % v, u and '1' or '0')
	else:
		if view:
			util.setSetting('window_slide_up_%s' % view, up)
			dialogs.setGlobalSkinProperty('ForumBrowser_window_slide_up_%s' % view, up and '1' or '0')
		util.setSetting('window_slide_up', up)
	dialogs.setGlobalSkinProperty('ForumBrowser_window_slide_up', up and '1' or '0')
Exemplo n.º 3
0
def setWindowBackgroundImage(image=None,view=None,clear=False,save=True):
	if clear:
		util.setSetting('window_background_%s' % view, '')
		dialogs.setGlobalSkinProperty('ForumBrowser_window_background_%s' % view,'')
		return
	if view == None:
		for v in VIEW_TYPES:
			i = util.getSetting('window_background_%s' % v,'')
			dialogs.setGlobalSkinProperty('ForumBrowser_window_background_%s' % v,i)
	else:
		if not image: image = util.getSetting('window_background_%s' % view,'')
		if save: util.setSetting('window_background_%s' % view, image)
		dialogs.setGlobalSkinProperty('ForumBrowser_window_background_%s' % view,image)
Exemplo n.º 4
0
def setWindowBackgroundFades():
	for v in VIEW_TYPES:
		f = util.getSetting('background_fade_%s' % v, 50)
		val = hex(int((f/100.0)*255))[2:].upper()
		dialogs.setGlobalSkinProperty('ForumBrowser_window_background_fade_white_%s' % v,val + 'FFFFFF')
		dialogs.setGlobalSkinProperty('ForumBrowser_window_background_fade_black_%s' % v,val + '000000')
Exemplo n.º 5
0
def setWindowColorsDark(dark=None,view=None):
	if dark == None:
		dark = util.getSetting('window_colors_dark', False)
		for v in VIEW_TYPES:
			d = util.getSetting('window_colors_dark_%s' % v, False)
			dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_dark_%s' % v, d and '1' or '0')
			if d:
				dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_fore_%s' % v, 'FFFFFFFF')
				dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_back_%s' % v, 'FF000000')
			else:
				dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_fore_%s' % v, 'FF000000')
				dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_back_%s' % v, 'FFFFFFFF')
	elif view:
		util.setSetting('window_colors_dark_%s' % view, dark)
		dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_dark_%s' % view, dark and '1' or '0')
		if dark:
			dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_fore_%s' % view, 'FFFFFFFF')
			dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_back_%s' % view, 'FF000000')
		else:
			dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_fore_%s' % view, 'FF000000')
			dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_back_%s' % view, 'FFFFFFFF')
	else:
		util.setSetting('window_colors_dark', dark)
		
	dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_dark', dark and '1' or '0')
	if dark:
		dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_fore', 'FFFFFFFF')
		dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_back', 'FF000000')
	else:
		dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_fore', 'FF000000')
		dialogs.setGlobalSkinProperty('ForumBrowser_window_colors_back', 'FFFFFFFF')