~osomon/moovida/subtitle_size

« back to all changes in this revision

Viewing changes to elisa-plugins/elisa/plugins/poblesec/simple_search_controller.py

  • Committer: Florian Boucault
  • Date: 2009-11-17 22:58:05 UTC
  • mfrom: (1462.2.22 transition)
  • Revision ID: florian@boucault.net-20091117225805-vtw7gkskmngbff8v
Removed a number of direct references to 'pgm' in order to allow multiple
implementations of its API, one using Pigment 0.3 and one using Pigment 0.5
in the near future. It also tries to facilitate the writing of the
implementation based on Pigment 0.5.

Changes in details:

 - For Pigment constants: relevant 'import pgm' replaced with
   'elisa.plugins.pigment.graph import [SPECIFIC CONSTANTS]' (look at
   elisa-plugins/elisa/plugins/pigment/graph/init.py).
 - For Pigment key symbols: relevant 'import pgm' replaced with 'from
   elisa.plugins.pigment import keysyms' (look at
   elisa-plugins/elisa/plugins/pigment/graph/keysyms.py)
 - Occurences of elisa.plugins.pigment.graph.image.Image have been
   replaced with the newly introduced elisa.plugins.pigment.graph.quad.Quad
   which should be used when only a background color is needed, not loading an
   actual picture; it is API compatible with future Pigment 0.5 quad geometry
   and has a 'color' property.
 - elisa.plugins.pigment.graph.node.Node is not a gobject anymore, instead
   elisa.plugins.pigment.graph.group.Group is: that was not used anywhere else
   and conflicting with Pigment 0.5.

Note: The transition is not complete and a few references to 'pgm' are left.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
are passed to another controller.
22
22
"""
23
23
 
 
24
from elisa.plugins.pigment.graph import TEXT_WEIGHT_BOLD, TEXT_ALIGN_CENTER
24
25
from elisa.plugins.pigment.graph.text import Text
25
26
from elisa.plugins.poblesec.search_controller import SearchController
26
 
import pgm
27
27
 
28
28
class SimpleSearchController(SearchController):
29
29
    live_search = False
43
43
 
44
44
        # FIXME: move all these style constants to CSS properties
45
45
        self.title.markup = self.title_text
46
 
        self.title.weight = pgm.TEXT_WEIGHT_BOLD
 
46
        self.title.weight = TEXT_WEIGHT_BOLD
47
47
        self.title.fg_color = (195, 194, 194, 255)
48
48
        self.title.bg_color = (0, 0, 0, 0)
49
 
        self.title.alignment = pgm.TEXT_ALIGN_CENTER
 
49
        self.title.alignment = TEXT_ALIGN_CENTER
50
50
        self.title.size = (1.0, 0.18)
51
51
        self.title.position = (0.0, 0.15, 0.0)
52
52
        self.title.multiline = True
58
58
        self.subtitle.markup = self.subtitle_text
59
59
        self.subtitle.fg_color = (195, 194, 194, 255)
60
60
        self.subtitle.bg_color = (0, 0, 0, 0)
61
 
        self.subtitle.alignment = pgm.TEXT_ALIGN_CENTER
 
61
        self.subtitle.alignment = TEXT_ALIGN_CENTER
62
62
        self.subtitle.size = (1.0, 0.04)
63
63
        self.subtitle.position = (0.0, 0.3, 0.0)
64
64
        self.subtitle.visible = True