Changeset 413:a92e4af2c181


Ignore:
Timestamp:
01/05/13 10:13:21 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Updated to work correctly with the latest Gtk3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/flight.py

    r402 r413  
    185185    def setStyle(self):
    186186        """Set the styles of some of the items on the page."""
    187         style = self.get_style() if pygobject else self.rc_get_style()
    188 
    189         self._titleEventBox.modify_bg(0, style.bg[3])
    190         self._titleLabel.modify_fg(0, style.fg[3])
     187        if pygobject:
     188            context = self.get_style_context()
     189            color = context.get_background_color(gtk.StateFlags.SELECTED)
     190            self._titleEventBox.modify_bg(0, color.to_color())
     191            color = context.get_color(gtk.StateFlags.SELECTED)
     192            self._titleLabel.modify_fg(0, color.to_color())
     193        else:
     194            style = self.rc_get_style()
     195            self._titleEventBox.modify_bg(0, style.bg[3])
     196            self._titleLabel.modify_fg(0, style.fg[3])
    191197
    192198    def initialize(self):
Note: See TracChangeset for help on using the changeset viewer.