Ignore:
Timestamp:
07/04/19 17:29:58 (5 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Removed conditions on pygobject (re #347)

File:
1 edited

Legend:

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

    r988 r994  
    5959        self.show_all()
    6060
    61         if pygobject:
    62             styleContext = self.get_style_context()
    63             color = styleContext.get_background_color(gtk.StateFlags.NORMAL)
    64             fault.override_background_color(0, color)
    65         else:
    66             style = self.rc_get_style()
    67             fault.modify_base(0, style.bg[0])
     61        styleContext = self.get_style_context()
     62        color = styleContext.get_background_color(gtk.StateFlags.NORMAL)
     63        fault.override_background_color(0, color)
    6864
    6965        self._hasExplanation = False
     
    285281        not."""
    286282        allExplained = self._numExplanations >= self._numFaults
    287         if pygobject:
    288             styleContext = self.get_style_context()
    289             if allExplained:
    290                 outerColour = innerColour = gdk.RGBA(red = 0.0, green=0.0,
    291                                                      blue=0.0, alpha=0.0)
    292             else:
    293                 outerColour = \
    294                   styleContext.get_border_color(gtk.StateFlags.DROP_ACTIVE)
    295                 innerColour = self._gui.backgroundColour
    296 
    297             self._outerBox.override_background_color(gtk.StateFlags.NORMAL,
    298                                                      outerColour)
    299             self._innerBox.override_background_color(gtk.StateFlags.NORMAL,
    300                                                      innerColour)
     283        styleContext = self.get_style_context()
     284        if allExplained:
     285            outerColour = innerColour = gdk.RGBA(red = 0.0, green=0.0,
     286                                                 blue=0.0, alpha=0.0)
    301287        else:
    302             style = self.rc_get_style()
    303             self._outerBox.modify_bg(0, style.bg[0 if allExplained else 3])
     288            outerColour = \
     289                styleContext.get_border_color(gtk.StateFlags.DROP_ACTIVE)
     290            innerColour = self._gui.backgroundColour
     291
     292        self._outerBox.override_background_color(gtk.StateFlags.NORMAL,
     293                                                 outerColour)
     294        self._innerBox.override_background_color(gtk.StateFlags.NORMAL,
     295                                                 innerColour)
    304296
    305297#-------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.