- Many minor small fixes
- This could be the final commit before 0.1 release
This commit is contained in:
parent
1f609074cc
commit
19857baadf
|
@ -44,12 +44,11 @@ class GlossMgr:
|
|||
self.set_menu_transition("slide")
|
||||
|
||||
#The background is a bit messy due to the depth issues :(
|
||||
background = self.themeMgr.get_texture("background", None, None)
|
||||
background.set_size(self.stage.get_width(), self.stage.get_height())
|
||||
|
||||
background.show()
|
||||
self.background = self.themeMgr.get_texture("background", None, None)
|
||||
self.background.set_size(self.stage.get_width(), self.stage.get_height())
|
||||
self.background.show()
|
||||
|
||||
self.stage.add(background)
|
||||
self.stage.add(self.background)
|
||||
|
||||
self.currentPlugin = None
|
||||
|
||||
|
|
|
@ -76,17 +76,11 @@ class Module:
|
|||
|
||||
colour = clutter.color_parse('White')
|
||||
font_string = "Tahoma 30"
|
||||
heading_label = self.glossMgr.themeMgr.get_label("music_heading")
|
||||
self.heading = musicHeading(colour, font_string)
|
||||
self.heading.set_width(self.stage.get_width())
|
||||
self.heading.set_position(0, 250)
|
||||
"""
|
||||
self.artist_label_1.set_position(200, 200)
|
||||
self.artist_label_2.set_position(200, 200)
|
||||
self.artist_label_3.set_position(200, 200)
|
||||
self.artist_label_1.set_color(clutter.color_parse('White'))
|
||||
self.artist_label_2.set_color(clutter.color_parse('White'))
|
||||
self.artist_label_3.set_color(clutter.color_parse('White'))
|
||||
"""
|
||||
self.heading.set_position(0, heading_label.get_y())
|
||||
|
||||
|
||||
#Get the images dir setting our of the DB
|
||||
#But also creates the setting if it doesn't already exist
|
||||
|
@ -308,7 +302,7 @@ class Module:
|
|||
self.opacity_behaviour = clutter.BehaviourOpacity(opacity_start=0, opacity_end=255, alpha=self.alpha)
|
||||
|
||||
#Create a backdrop for the player. In this case we just use the same background as the menus
|
||||
self.backdrop = glossMgr.get_themeMgr().get_texture("background", None, None)
|
||||
self.backdrop = clutter.CloneTexture(glossMgr.background) #glossMgr.get_themeMgr().get_texture("background", None, None)
|
||||
self.backdrop.set_size(self.stage.get_width(), self.stage.get_height())
|
||||
self.backdrop.set_opacity(0)
|
||||
self.backdrop.show()
|
||||
|
@ -359,6 +353,7 @@ class Module:
|
|||
self.opacity_behaviour_outgoing.apply(self.loading_img)
|
||||
|
||||
self.stage.add(self.artistImageRow)
|
||||
self.artistImageRow.set_position(0, 40)
|
||||
self.artistImageRow.set_opacity(0)
|
||||
self.artistImageRow.select_first()
|
||||
self.artistImageRow.show()
|
||||
|
|
|
@ -152,13 +152,6 @@ class osd_channel(clutter.Group):
|
|||
self.stage = glossMgr.stage
|
||||
|
||||
self.box = self.glossMgr.themeMgr.get_texture("tv_osd_box", self.stage, None)
|
||||
"""
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file("ui/splash_box.png")
|
||||
self.box = clutter.Texture()
|
||||
self.box.set_pixbuf(pixbuf)
|
||||
self.box.set_opacity(int(255 * 0.75))
|
||||
self.box.set_height(int(self.stage.get_height()* 0.15))
|
||||
"""
|
||||
self.add(self.box)
|
||||
|
||||
self.logo = clutter.Texture()
|
||||
|
@ -169,9 +162,11 @@ class osd_channel(clutter.Group):
|
|||
self.logo.set_position(20, pos_y )
|
||||
self.add(self.logo)
|
||||
|
||||
text_colour = clutter.color_parse('Black')
|
||||
|
||||
self.name = clutter.Label()
|
||||
self.name.set_font_name(self.font + str(self.name_font_size))
|
||||
self.name.set_color(clutter.color_parse('White'))
|
||||
self.name.set_color(text_colour)
|
||||
pos_x = self.logo.get_x() + int (self.logo.get_width() * 1.1)
|
||||
pos_x = pos_x
|
||||
self.name.set_position(pos_x, 0)
|
||||
|
@ -180,7 +175,7 @@ class osd_channel(clutter.Group):
|
|||
|
||||
self.prog_title = clutter.Label()
|
||||
self.prog_title.set_font_name(self.font + str(self.prog_title_font_size))
|
||||
self.prog_title.set_color(clutter.color_parse('White'))
|
||||
self.prog_title.set_color(text_colour)
|
||||
self.prog_title.set_position(\
|
||||
self.name.get_x(),\
|
||||
self.name.get_y() + self.name.get_height()\
|
||||
|
@ -189,7 +184,7 @@ class osd_channel(clutter.Group):
|
|||
|
||||
self.detail = clutter.Label()
|
||||
self.detail.set_font_name(self.font + str(self.detail_font_size))
|
||||
self.detail.set_color(clutter.color_parse('White'))
|
||||
self.detail.set_color(text_colour)
|
||||
self.detail.set_position(\
|
||||
self.prog_title.get_x(),\
|
||||
self.prog_title.get_y() + self.prog_title.get_height()\
|
||||
|
|
|
@ -253,7 +253,7 @@ class Module():
|
|||
return
|
||||
|
||||
#Create a backdrop for the player. In this case we just use the same background as the menus
|
||||
self.backdrop = glossMgr.get_themeMgr().get_texture("background", None, None) #clutter.CloneTexture(glossMgr.get_skinMgr().get_Background())
|
||||
self.backdrop = clutter.CloneTexture(glossMgr.background) #glossMgr.get_themeMgr().get_texture("background", None, None) #clutter.CloneTexture(glossMgr.get_skinMgr().get_Background())
|
||||
self.backdrop.set_size(self.stage.get_width(), self.stage.get_height())
|
||||
self.backdrop.set_opacity(0)
|
||||
self.backdrop.show()
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
</position>
|
||||
</image_frame>
|
||||
|
||||
<label id="heading">
|
||||
<label id="music_heading">
|
||||
<font id="font">
|
||||
<face>Tahoma</face>
|
||||
<size id="default">30</size>
|
||||
|
|
|
@ -12,10 +12,16 @@
|
|||
</texture>
|
||||
|
||||
<texture id="tv_osd_box">
|
||||
<image>osd/splash_box.png</image>
|
||||
<rounded_rectangle>
|
||||
<colour id="rect_colour">
|
||||
<r>100</r>
|
||||
<g>100</g>
|
||||
<b>100</b>
|
||||
</colour>
|
||||
</rounded_rectangle>
|
||||
<dimensions type="relativeToStage">
|
||||
<width>50%</width>
|
||||
<height>30%</height>
|
||||
<width>70%</width>
|
||||
<height>20%</height>
|
||||
</dimensions>
|
||||
<opacity>188</opacity>
|
||||
</texture>
|
||||
|
|
|
@ -10,4 +10,5 @@
|
|||
<y>0</y>
|
||||
</position>
|
||||
</texture>
|
||||
|
||||
</gloss-theme>
|
||||
|
|
|
@ -109,4 +109,23 @@
|
|||
<y>40%</y>
|
||||
</position>
|
||||
</image_frame>
|
||||
|
||||
<label id="music_heading">
|
||||
<font id="font">
|
||||
<face>Tahoma</face>
|
||||
<size id="default">30</size>
|
||||
<size id="1024x768">38</size>
|
||||
<size id="800x600">30</size>
|
||||
<size id="1920x1080">25</size>
|
||||
</font>
|
||||
|
||||
<dimensions type="relativeToStage">
|
||||
<width>25%</width>
|
||||
<height>25%</height>
|
||||
</dimensions>
|
||||
<position type="relativeToStage">
|
||||
<x>10%</x>
|
||||
<y>40%</y>
|
||||
</position>
|
||||
</label>
|
||||
</gloss-theme>
|
||||
|
|
|
@ -12,10 +12,16 @@
|
|||
</texture>
|
||||
|
||||
<texture id="tv_osd_box">
|
||||
<image>osd/splash_box.png</image>
|
||||
<rounded_rectangle>
|
||||
<colour id="rect_colour">
|
||||
<r>100</r>
|
||||
<g>100</g>
|
||||
<b>100</b>
|
||||
</colour>
|
||||
</rounded_rectangle>
|
||||
<dimensions type="relativeToStage">
|
||||
<width>50%</width>
|
||||
<height>30%</height>
|
||||
<width>70%</width>
|
||||
<height>20%</height>
|
||||
</dimensions>
|
||||
<opacity>188</opacity>
|
||||
</texture>
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
</position>
|
||||
</image_frame>
|
||||
|
||||
<label id="heading">
|
||||
<label id="music_heading">
|
||||
<font id="font">
|
||||
<face>Tahoma</face>
|
||||
<size id="default">30</size>
|
||||
|
|
|
@ -12,10 +12,16 @@
|
|||
</texture>
|
||||
|
||||
<texture id="tv_osd_box">
|
||||
<image>osd/splash_box.png</image>
|
||||
<rounded_rectangle>
|
||||
<colour id="rect_colour">
|
||||
<r>100</r>
|
||||
<g>100</g>
|
||||
<b>100</b>
|
||||
</colour>
|
||||
</rounded_rectangle>
|
||||
<dimensions type="relativeToStage">
|
||||
<width>50%</width>
|
||||
<height>30%</height>
|
||||
<width>70%</width>
|
||||
<height>20%</height>
|
||||
</dimensions>
|
||||
<opacity>188</opacity>
|
||||
</texture>
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
</position>
|
||||
</image_frame>
|
||||
|
||||
<label id="heading">
|
||||
<label id="music_heading">
|
||||
<font id="font">
|
||||
<face>Tahoma</face>
|
||||
<size id="default">30</size>
|
||||
|
|
|
@ -12,10 +12,16 @@
|
|||
</texture>
|
||||
|
||||
<texture id="tv_osd_box">
|
||||
<image>osd/splash_box.png</image>
|
||||
<rounded_rectangle>
|
||||
<colour id="rect_colour">
|
||||
<r>100</r>
|
||||
<g>100</g>
|
||||
<b>100</b>
|
||||
</colour>
|
||||
</rounded_rectangle>
|
||||
<dimensions type="relativeToStage">
|
||||
<width>50%</width>
|
||||
<height>30%</height>
|
||||
<width>70%</width>
|
||||
<height>20%</height>
|
||||
</dimensions>
|
||||
<opacity>188</opacity>
|
||||
</texture>
|
||||
|
|
|
@ -3,6 +3,7 @@ import clutter
|
|||
import pygtk
|
||||
import gtk
|
||||
from ui_elements.image_frame import ImageFrame
|
||||
from ui_elements.rounded_rectangle import RoundedRectangle
|
||||
from xml.dom import minidom
|
||||
|
||||
class ThemeMgr:
|
||||
|
@ -315,16 +316,22 @@ class ThemeMgr:
|
|||
|
||||
#Setup the pixbuf
|
||||
src = self.find_child_value(element, "image")
|
||||
rect = self.find_child_value(element, "rounded_rectangle")
|
||||
#Special case to handle no image
|
||||
if src == "None":
|
||||
return texture
|
||||
if src is None:
|
||||
elif not src is None:
|
||||
src = self.theme_dir + self.currentTheme + "/" + src
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file(src)
|
||||
texture.set_pixbuf(pixbuf)
|
||||
elif not rect is None:
|
||||
colour_element = self.search_docs("texture", name).getElementsByTagName("texture")
|
||||
colour_element = self.find_element(colour_element, "id", "rect_colour")
|
||||
colour = self.get_colour(colour_element, "rect_colour", False)
|
||||
texture = RoundedRectangle(20, 20, colour)
|
||||
elif (src is None) and (rect is None):
|
||||
return None
|
||||
|
||||
src = self.theme_dir + self.currentTheme + "/" + src
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file(src)
|
||||
texture.set_pixbuf(pixbuf)
|
||||
|
||||
#Setup general actor properties
|
||||
self.setup_actor(texture, element, parent)
|
||||
|
||||
|
|
Loading…
Reference in New Issue