Esempio n. 1
0
    return LinkSubjectDrag(_getSubjectOfPageNameElement(element))


_linkDragSource = ObjectDndHandler.DragSource(LinkSubjectDrag,
                                              _dragSourceCreateLink)

_controlsStyle = StyleSheet.style(Controls.bClosePopupOnActivate(True))
_projectIndexNameStyle = StyleSheet.style(
    Primitive.foreground(Color(0.25, 0.35, 0.5)), Primitive.fontSize(16),
    Primitive.fontFace(Primitive.lightFontName))
_packageNameStyle = StyleSheet.style(
    Primitive.foreground(Color(0.0, 0.0, 0.5)), Primitive.fontSize(14),
    Primitive.fontFace(Primitive.lightFontName))
_itemHoverHighlightStyle = StyleSheet.style(
    Primitive.hoverBackground(
        FilledOutlinePainter(Color(0.8, 0.825, 0.9),
                             Color(0.125, 0.341, 0.574), BasicStroke(1.0))))
_pythonPackageNameStyle = StyleSheet.style(
    Primitive.foreground(Color(0.0, 0.0, 0.5)))
_pythonPackageNameNotSetStyle = StyleSheet.style(
    Primitive.foreground(Color(0.5, 0.0, 0.0)))
_pythonPackageNameNotSetCommentStyle = StyleSheet.style(
    Primitive.foreground(Color(0.2, 0.2, 0.2)), Primitive.fontItalic(True))

_frontPageNoteBorder = SolidBorder(1.0, 1.0, 3.0, 3.0, Color(0.0, 1.0, 0.0),
                                   Color(0.85, 0.95, 0.85))
_frontPageNoteStyle = StyleSheet.style(
    Primitive.foreground(Color(0.0, 0.5, 0.0)), Primitive.fontSize(10))
_startupPageNoteBorder = SolidBorder(1.0, 1.0, 3.0, 3.0, Color(0.75, 0.5, 1.0),
                                     Color(0.925, 0.9, 0.95))
_startupPageNoteStyle = StyleSheet.style(
Esempio n. 2
0
from BritefuryJ.Live import LiveValue, LiveFunction

from Britefury.Config.UserConfig import loadUserConfig, saveUserConfig
from Britefury.Config import Configuration
from Britefury.Config.ConfigurationPage import ConfigurationPage

# Font chooser

_ge = GraphicsEnvironment.getLocalGraphicsEnvironment()
_fontNames = sorted([font.name for font in _ge.allFonts])

_nameStyle = StyleSheet.style(Primitive.fontSize(10),
                              Primitive.foreground(Color(0.45, 0.45, 0.45)))
_hoverStyle = StyleSheet.style(
    Primitive.hoverBackground(
        FilledOutlinePainter(Color(0.95, 0.95, 0.95), Color(0.65, 0.65,
                                                            0.65))))
_headerNameStyle = StyleSheet.style(Primitive.fontItalic(True))


def _fontSample(fontName, sampleFn):
    sample = sampleFn(fontName)
    name = Label(fontName)
    return _hoverStyle(
        Bin(
            Column([
                sample,
                _nameStyle(name).padX(10.0, 0.0),
            ]).pad(5.0, 5.0)))

Esempio n. 3
0
from BritefuryJ.Pres.UI import Section, SectionHeading2
from BritefuryJ.StyleSheet import StyleSheet

from BritefuryJ.Graphics import FilledOutlinePainter

from Britefury.Config import Configuration
from Britefury.Config.UserConfig import loadUserConfig, saveUserConfig
from Britefury.Config.ConfigurationPage import ConfigurationPage




_pathsConfigFilename = 'paths'


_itemHoverHighlightStyle = StyleSheet.style( Primitive.hoverBackground( FilledOutlinePainter( Color( 0.8, 0.825, 0.9 ), Color( 0.125, 0.341, 0.574 ), BasicStroke( 1.0 ) ) ) )




class PathsConfigurationPage (ConfigurationPage):
	def __init__(self):
		super( PathsConfigurationPage, self ).__init__()
		self._pluginPaths = []
		self._libraryPaths = []
		self._incr = IncrementalValueMonitor()
	
	
	def __getstate__(self):
		state = super( PathsConfigurationPage, self ).__getstate__()
		state['pluginPaths'] = self._pluginPaths