Ignore:
Timestamp:
06/27/19 17:32:42 (5 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

The fault display in the explanation widget is of the correct size initially as well (re #347).

File:
1 edited

Legend:

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

    r970 r988  
    3232        vbox = gtk.VBox()
    3333
    34         self._fault = fault = gtk.TextView()
    35         fault.set_editable(False)
    36         fault.set_can_focus(False)
    37         fault.set_wrap_mode(WRAP_WORD)
    38 
    39         buffer = fault.get_buffer()
    40         self._faultTag  = buffer.create_tag("fault", weight=WEIGHT_BOLD)
     34        self._fault = fault = gtk.Label()
     35        fault.set_xalign(0.0)
     36        fault.set_justify(JUSTIFY_LEFT)
     37        fault.set_line_wrap(True)
    4138
    4239        self.faultText = faultText
     
    8178        """Update the text of the fault."""
    8279        self._faultText = faultText
    83 
    84         buffer = self._fault.get_buffer()
    85         buffer.set_text(faultText)
    86         buffer.apply_tag(self._faultTag,
    87                          buffer.get_start_iter(), buffer.get_end_iter())
     80        self._fault.set_markup("<b>" + faultText + "</b>")
    8881
    8982    @property
     
    169162        self._faults = gtk.VBox()
    170163        self._faults.set_homogeneous(False)
    171         scroller.add_with_viewport(self._faults)
     164        scroller.add(self._faults)
    172165
    173166        alignment.add(scroller)
Note: See TracChangeset for help on using the changeset viewer.