~ubuntu-branches/ubuntu/utopic/python-traitsui/utopic

« back to all changes in this revision

Viewing changes to traitsui/qt4/constants.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-07-09 13:57:39 UTC
  • Revision ID: james.westby@ubuntu.com-20110709135739-x5u20q86huissmn1
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#------------------------------------------------------------------------------
 
2
# Copyright (c) 2007, Riverbank Computing Limited
 
3
# All rights reserved.
 
4
#
 
5
# This software is provided without warranty under the terms of the BSD license.
 
6
# However, when used with the GPL version of PyQt the additional terms described in the PyQt GPL exception also apply
 
7
 
 
8
#
 
9
# Author: Riverbank Computing Limited
 
10
#------------------------------------------------------------------------------
 
11
 
 
12
""" Defines constants used by the PyQt implementation of the various text
 
13
editors and text editor factories.
 
14
"""
 
15
 
 
16
#-------------------------------------------------------------------------------
 
17
#  Imports:
 
18
#-------------------------------------------------------------------------------
 
19
 
 
20
from pyface.qt import QtGui
 
21
 
 
22
#-------------------------------------------------------------------------------
 
23
#  Constants:
 
24
#-------------------------------------------------------------------------------
 
25
 
 
26
_palette = QtGui.QApplication.palette()
 
27
 
 
28
# Default dialog title
 
29
DefaultTitle = 'Edit properties'
 
30
 
 
31
# Color of valid input
 
32
OKColor = _palette.color(QtGui.QPalette.Base)
 
33
 
 
34
# Color to highlight input errors
 
35
ErrorColor = QtGui.QColor( 255, 192, 192 )
 
36
 
 
37
# Color for background of read-only fields
 
38
ReadonlyColor = QtGui.QColor( 244, 243, 238 )
 
39
 
 
40
# Color for background of fields where objects can be dropped
 
41
DropColor = QtGui.QColor( 215, 242, 255 )
 
42
 
 
43
# Color for an editable field
 
44
EditableColor = _palette.color(QtGui.QPalette.Base)
 
45
 
 
46
# Color for background of windows (like dialog background color)
 
47
WindowColor = _palette.color(QtGui.QPalette.Window)
 
48
 
 
49
del _palette
 
50
 
 
51
# Screen size values:
 
52
 
 
53
_geom = QtGui.QApplication.desktop().availableGeometry()
 
54
 
 
55
screen_dx = _geom.width()
 
56
screen_dy = _geom.height()
 
57
 
 
58
del _geom