Exemplo n.º 1
0
 def _on_value_changed(self, adj):
     """
         Update scroll value and check for lazy queue
         @param adj as Gtk.Adjustment
     """
     ArtistAlbumsView._on_value_changed(self, adj)
     if adj.get_value() == adj.get_lower():
         self._artwork.show()
     else:
         self._artwork.hide()
Exemplo n.º 2
0
 def _on_value_changed(self, adj):
     """
         Update scroll value and check for lazy queue
         @param adj as Gtk.Adjustment
     """
     ArtistAlbumsView._on_value_changed(self, adj)
     if adj.get_value() == adj.get_lower():
         if Lp().settings.get_value("artist-artwork"):
             self._artwork.show()
             self._artwork_box.show()
         self._grid.get_style_context().remove_class("header-borders")
         self._grid.get_style_context().add_class("header")
         self._grid.set_property("valign", Gtk.Align.CENTER)
     else:
         self._artwork.hide()
         self._artwork_box.hide()
         self._grid.get_style_context().add_class("header-borders")
         self._grid.get_style_context().remove_class("header")
         self._grid.set_property("valign", Gtk.Align.START)
Exemplo n.º 3
0
 def _on_value_changed(self, adj):
     """
         Update scroll value and check for lazy queue
         @param adj as Gtk.Adjustment
     """
     ArtistAlbumsView._on_value_changed(self, adj)
     if adj.get_value() == adj.get_lower():
         if self.__artwork.props.surface is not None or\
                 self.__artwork.get_pixbuf() is not None:
             self.__artwork.show()
             self.__artwork_box.show()
         self.__grid.get_style_context().remove_class('header-borders')
         self.__grid.get_style_context().add_class('header')
     else:
         if self.__artwork.props.surface is not None or\
                 self.__artwork.get_pixbuf() is not None:
             self.__artwork.hide()
             self.__artwork_box.hide()
         self.__grid.get_style_context().add_class('header-borders')
         self.__grid.get_style_context().remove_class('header')
Exemplo n.º 4
0
 def _on_value_changed(self, adj):
     """
         Update scroll value and check for lazy queue
         @param adj as Gtk.Adjustment
     """
     ArtistAlbumsView._on_value_changed(self, adj)
     if adj.get_value() == adj.get_lower():
         if self.__artwork.props.surface is not None or\
                 self.__artwork.get_pixbuf() is not None:
             self.__artwork.show()
             self.__artwork_box.show()
         self.__grid.get_style_context().remove_class('header-borders')
         self.__grid.get_style_context().add_class('header')
     else:
         if self.__artwork.props.surface is not None or\
                 self.__artwork.get_pixbuf() is not None:
             self.__artwork.hide()
             self.__artwork_box.hide()
         self.__grid.get_style_context().add_class('header-borders')
         self.__grid.get_style_context().remove_class('header')
Exemplo n.º 5
0
 def _on_value_changed(self, adj):
     """
         Update scroll value and check for lazy queue
         @param adj as Gtk.Adjustment
     """
     ArtistAlbumsView._on_value_changed(self, adj)
     title_style_context = self._title_label.get_style_context()
     if adj.get_value() == adj.get_lower() and self.__show_artwork:
         height = self._banner.default_height
         self._artwork.show()
         title_style_context.remove_class("text-x-large")
         title_style_context.add_class("text-xx-large")
     else:
         height = self._banner.default_height // 3
         self._artwork.hide()
         title_style_context.remove_class("text-xx-large")
         title_style_context.add_class("text-x-large")
     # Make grid cover artwork
     # No idea why...
     self._banner.set_height(height)
     self._scrolled.get_vscrollbar().set_margin_top(height)
     self._buttons.set_size_request(-1, height + 1)